1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;; Copyright (C) 2006, 2007 Stelian Ionescu
5 ;; This code is free software; you can redistribute it and/or
6 ;; modify it under the terms of the version 2.1 of
7 ;; the GNU Lesser General Public License as published by
8 ;; the Free Software Foundation, as clarified by the
9 ;; preamble found here:
10 ;; http://opensource.franz.com/preamble.html
12 ;; This program is distributed in the hope that it will be useful,
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;; GNU General Public License for more details.
17 ;; You should have received a copy of the GNU Lesser General
18 ;; Public License along with this library; if not, write to the
19 ;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 ;; Boston, MA 02110-1301, USA
22 (in-package :common-lisp-user
)
24 (defpackage :net.sockets
25 (:nicknames
#:sockets
)
26 (:use
#:common-lisp
#:cffi
#:split-sequence
27 #:iolib-utils
#:io.encodings
#:io.streams
)
28 (:import-from
#:iolib-posix
29 #:system-error
#:unix-error
#:message
)
33 #:system-error
#:unix-error
#:resolver-error
34 #:unknown-interface
#:unknown-protocol
38 #:error-code
#:error-identifier
#:error-message
39 #:interface-name
#:interface-index
#:protocol-name
#:protocol-number
40 #:address
#:address-type
42 ;; low-level address conversion functions
43 #:vector-to-ipaddr
#:ipaddr-to-vector
#:ipaddr-to-dotted
44 #:dotted-to-ipaddr
#:dotted-to-vector
#:vector-to-dotted
45 #:colon-separated-to-vector
#:vector-to-colon-separated
48 #:sockaddr
#:inetaddr
#:ipv4addr
#:ipv6addr
#:localaddr
49 #:make-address
#:ensure-address
50 #:sockaddr
= #:sockaddr-
>presentation
#:copy-sockaddr
53 ;; well-known addresses and important values
55 #:+ipv4-unspecified
+ #:+ipv4-loopback
+
56 #:+ipv6-unspecified
+ #:+ipv6-loopback
+
57 #:+ipv6-interface-local-all-nodes
+ #:+ipv6-link-local-all-nodes
+
58 #:+ipv6-interface-local-all-routers
+ #:+ipv6-link-local-all-routers
+
59 #:+ipv6-site-local-all-routers
+
63 #:ipv4-address-p
#:ipv6-address-p
#:local-address-p
64 #:inetaddr-unspecified-p
#:inetaddr-loopback-p
65 #:inetaddr-multicast-p
#:inetaddr-unicast-p
66 #:ipv6-ipv4-mapped-p
#:ipv6-interface-local-multicast-p
67 #:ipv6-link-local-multicast-p
#:ipv6-admin-local-multicast-p
68 #:ipv6-site-local-multicast-p
#:ipv6-organization-local-multicast-p
69 #:ipv6-global-multicast-p
#:ipv6-reserved-multicast-p
70 #:ipv6-unassigned-multicast-p
#:ipv6-transient-multicast-p
71 #:ipv6-solicited-node-multicast-p
72 #:ipv6-link-local-unicast-p
#:ipv6-site-local-unicast-p
73 #:ipv6-global-unicast-p
74 #:ipv6-multicast-type
#:inetaddr-type
76 ;; hostname, service and protocol lookup
78 #:host
#:make-host
#:lookup-host
#:random-address
79 #:host-truename
#:host-aliases
#:host-addresses
80 #:service
#:make-service
#:lookup-service
81 #:service-name
#:service-port
#:service-protocol
82 #:protocol
#:make-protocol
#:lookup-protocol
83 #:protocol-name
#:protocol-aliases
#:protocol-number
85 ;; network interface lookup
86 #:interface
#:make-interface
#:lookup-interface
#:get-network-interfaces
87 #:interface-name
#:interface-index
90 #:socket
#:stream-socket
#:datagram-socket
91 #:internet-socket
#:local-socket
92 #:active-socket
#:passive-socket
93 #:socket-stream-internet-active
94 #:socket-stream-internet-passive
95 #:socket-stream-local-active
96 #:socket-stream-local-passive
97 #:socket-datagram-local-active
98 #:socket-datagram-internet-active
101 #:socket-fd
#:socket-address
#:socket-family
#:socket-protocol
102 #:get-socket-option
#:set-socket-option
103 #:socket-type
#:make-socket
#:socket-close
#:socket-open-p
104 #:local-name
#:remote-name
105 #:bind-address
#:socket-listen
#:accept-connection
106 #:connect
#:unconnect
#:socket-connected-p
107 #:shutdown
#:socket-send
#:socket-receive
))