Add and export macro WITH-ACCEPT-CONNECTION.
[iolib.git] / sockets / pkgdcl.lisp
blob934e1dbd39ac88a7dc00041b54d591b815a45fcb
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Indent-tabs-mode: NIL -*-
2 ;;;
3 ;;; package.lisp --- Package definition.
4 ;;;
5 ;;; Copyright (C) 2006-2007, Stelian Ionescu <sionescu@common-lisp.net>
6 ;;;
7 ;;; This code is free software; you can redistribute it and/or
8 ;;; modify it under the terms of the version 2.1 of
9 ;;; the GNU Lesser General Public License as published by
10 ;;; the Free Software Foundation, as clarified by the
11 ;;; preamble found here:
12 ;;; http://opensource.franz.com/preamble.html
13 ;;;
14 ;;; This program is distributed in the hope that it will be useful,
15 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU Lesser General
20 ;;; Public License along with this library; if not, write to the
21 ;;; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22 ;;; Boston, MA 02110-1301, USA
24 (in-package :common-lisp-user)
26 (defpackage :net.sockets
27 (:nicknames #:sockets)
28 (:use #:common-lisp :cffi :alexandria :split-sequence :io.streams :series)
29 (:import-from #:osicat-posix #:system-error #:posix-error
30 #:system-error-message #:errno-wrapper
31 #:pid #:gid #:uid #:size #:ssize #:bzero)
32 (:import-from #:osicat-sys #:size-of-int)
33 (:shadow #:listen)
34 (:export
35 ;; Conditions
36 #:posix-error
37 #:possible-bug
38 #:resolver-error
39 #:resolver-again-error
40 #:resolver-fail-error
41 #:resolver-no-name-error
42 #:resolver-unknown-error
43 #:socket-address-in-use-error
44 #:socket-address-not-available-error
45 #:socket-already-connected-error
46 #:socket-connection-aborted-error
47 #:socket-connection-refused-error
48 #:socket-connection-reset-error
49 #:socket-connection-timeout-error
50 #:socket-endpoint-shutdown-error
51 #:socket-error
52 #:socket-host-down-error
53 #:socket-host-unreachable-error
54 #:socket-network-down-error
55 #:socket-network-reset-error
56 #:socket-network-unreachable-error
57 #:socket-no-buffer-space-error
58 #:socket-no-network-error
59 #:socket-not-connected-error
60 #:socket-operation-not-supported-error
61 #:socket-option-not-supported-error
62 #:system-error
63 #:unknown-interface
64 #:unknown-protocol
65 #:unknown-service
66 #:unknown-socket-error
68 ;; Condition Accessors
69 #:address-type
70 #:bug-data
71 #:error-code
72 #:error-identifier
73 #:error-message
75 ;; Low-level Address Conversion
76 #:address-to-vector
77 #:colon-separated-to-vector
78 #:dotted-to-integer
79 #:dotted-to-vector
80 #:integer-to-dotted
81 #:integer-to-vector
82 #:string-address-to-vector
83 #:vector-to-colon-separated
84 #:vector-to-dotted
85 #:vector-to-integer
86 #:map-ipv4-address-to-ipv6
87 #:map-ipv6-address-to-ipv4
89 ;; Address Classes
90 #:address
91 #:inet-address
92 #:ipv4-address
93 #:ipv6-address
94 #:local-address
96 ;; Address Functions
97 #:address-equal-p
98 #:address-name
99 #:address-to-string
100 #:address=
101 #:copy-address
102 #:ensure-address
103 #:make-address
105 ;; Well-known Addresses
106 #:+ipv4-loopback+
107 #:+ipv4-unspecified+
108 #:+ipv6-interface-local-all-nodes+
109 #:+ipv6-interface-local-all-routers+
110 #:+ipv6-link-local-all-nodes+
111 #:+ipv6-link-local-all-routers+
112 #:+ipv6-loopback+
113 #:+ipv6-site-local-all-routers+
114 #:+ipv6-unspecified+
115 #:+max-ipv4-value+
117 ;; Address Predicates
118 #:abstract-address-p
119 #:addressp
120 #:inet-address-loopback-p
121 #:inet-address-multicast-p
122 #:inet-address-p
123 #:inet-address-type
124 #:inet-address-unicast-p
125 #:inet-address-unspecified-p
126 #:ipv4-address-p
127 #:ipv6-address-p
128 #:ipv6-admin-local-multicast-p
129 #:ipv6-global-multicast-p
130 #:ipv6-global-unicast-p
131 #:ipv6-interface-local-multicast-p
132 #:ipv6-ipv4-mapped-p
133 #:ipv6-link-local-multicast-p
134 #:ipv6-link-local-unicast-p
135 #:ipv6-multicast-type
136 #:ipv6-organization-local-multicast-p
137 #:ipv6-reserved-multicast-p
138 #:ipv6-site-local-multicast-p
139 #:ipv6-site-local-unicast-p
140 #:ipv6-solicited-node-multicast-p
141 #:ipv6-transient-multicast-p
142 #:ipv6-unassigned-multicast-p
143 #:ipv6-unicast-type
144 #:local-address-p
146 ;; Hostname, Service, and Protocol Lookups
147 #:convert-or-lookup-inet-address
148 #:host
149 #:host-addresses
150 #:host-aliases
151 #:host-truename
152 #:lookup-host
153 #:lookup-protocol
154 #:lookup-service
155 #:make-host
156 #:make-protocol
157 #:make-service
158 #:protocol
159 #:protocol-aliases
160 #:protocol-name
161 #:protocol-number
162 #:host-random-address
163 #:service
164 #:service-name
165 #:service-port
166 #:service-protocol
168 ;; Network Interface Lookup
169 #:list-network-interfaces
170 #:interface
171 #:interface-index
172 #:interface-name
173 #:lookup-interface
174 #:make-interface
176 ;; Socket Classes
177 #:active-socket
178 #:datagram-socket
179 #:internet-socket
180 #:local-socket
181 #:passive-socket
182 #:socket
183 #:socket-datagram-internet-active
184 #:socket-datagram-local-active
185 #:socket-stream-internet-active
186 #:socket-stream-internet-passive
187 #:socket-stream-local-active
188 #:socket-stream-local-passive
189 #:stream-socket
191 ;; Socket Methods
192 #:accept-connection
193 #:bind-address
194 #:connect
195 ;; #:create-socket
196 #:disconnect
197 #:get-socket-option
198 #:local-address
199 #:local-name
200 #:local-port
201 #:make-socket
202 #:remote-address
203 #:remote-name
204 #:remote-port
205 #:set-socket-option
206 #:shutdown
207 #:socket-connected-p
208 #:socket-family
209 #:socket-fd
210 #:socket-listen
211 #:socket-open-p
212 #:socket-option
213 #:socket-protocol
214 #:socket-receive
215 #:socket-send
216 #:socket-type
217 #:with-open-socket
218 #:with-accept-connection
220 ;; Specials
221 #:*default-backlog-size*
222 #:*ipv6*
223 #:*dns-nameservers*
224 #:*dns-domain*
225 #:*dns-search-domain*
228 (series::install)