Renamed socket-non-blocking-mode to socket-non-blocking and fixed it.
[iolib.git] / sockets / defpackage.lisp
blob563393c6de7523e2719406979b40a00021f16233
1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4 ; Copyright (C) 2006 by Stelian Ionescu ;
5 ; ;
6 ; This program is free software; you can redistribute it and/or modify ;
7 ; it under the terms of the GNU General Public License as published by ;
8 ; the Free Software Foundation; either version 2 of the License, or ;
9 ; (at your option) any later version. ;
10 ; ;
11 ; This program is distributed in the hope that it will be useful, ;
12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of ;
13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;
14 ; GNU General Public License for more details. ;
15 ; ;
16 ; You should have received a copy of the GNU General Public License ;
17 ; along with this program; if not, write to the ;
18 ; Free Software Foundation, Inc., ;
19 ; 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ;
20 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 (in-package :common-lisp-user)
24 (defpackage :net.sockets
25 (:nicknames #:sockets)
26 (:use #:common-lisp #:cffi #:split-sequence #:iolib-utils)
27 (:import-from #:iolib-alien-ng
28 #:system-error #:unix-error #:message)
29 (:export
30 ;; conditions
31 #:possible-bug
32 #:system-error #:unix-error #:resolver-error
33 #:unknown-interface #:unknown-protocol
34 #:invalid-address
35 ; condition accessors
36 #:bug-data
37 #:error-code #:error-identifier #:error-message
38 #:interface-name #:interface-index #:protocol-name #:protocol-number
39 #:address #:address-type
41 ;; low-level address conversion functions
42 #:vector-to-ipaddr #:ipaddr-to-vector #:ipaddr-to-dotted
43 #:dotted-to-ipaddr #:dotted-to-vector #:vector-to-dotted
44 #:colon-separated-to-vector #:vector-to-colon-separated
46 ;; addresses
47 #:sockaddr #:inetaddr #:ipv4addr #:ipv6addr #:localaddr
48 #:make-address #:sockaddr= #:sockaddr->presentation #:copy-sockaddr
49 #:name #:abstract-p
51 ;; well-known addresses and important values
52 #:+max-ipv4-value+
53 #:+ipv4-unspecified+ #:+ipv4-loopback+
54 #:+ipv6-unspecified+ #:+ipv6-loopback+
55 #:+ipv6-interface-local-all-nodes+ #:+ipv6-link-local-all-nodes+
56 #:+ipv6-interface-local-all-routers+ #:+ipv6-link-local-all-routers+
57 #:+ipv6-site-local-all-routers+
59 ;; address predicates
60 #:ipv4-address-p #:ipv6-address-p #:local-address-p
61 #:inetaddr-unspecified-p #:inetaddr-loopback-p
62 #:inetaddr-multicast-p #:inetaddr-unicast-p
63 #:ipv6-ipv4-mapped-p #:ipv6-interface-local-multicast-p
64 #:ipv6-link-local-multicast-p #:ipv6-admin-local-multicast-p
65 #:ipv6-site-local-multicast-p #:ipv6-organization-local-multicast-p
66 #:ipv6-global-multicast-p #:ipv6-reserved-multicast-p
67 #:ipv6-unassigned-multicast-p #:ipv6-transient-multicast-p
68 #:ipv6-solicited-node-multicast-p
69 #:ipv6-link-local-unicast-p #:ipv6-site-local-unicast-p
70 #:ipv6-global-unicast-p
71 #:ipv6-multicast-type #:inetaddr-type
73 ;; hostname, service and protocol lookup
74 #:*ipv6*
75 #:host #:make-host #:lookup-host #:random-address
76 #:host-truename #:host-aliases #:host-addresses
77 #:service #:make-service #:lookup-service
78 #:service-name #:service-port #:service-protocol
79 #:protocol #:make-protocol #:lookup-protocol
80 #:protocol-name #:protocol-aliases #:protocol-number
82 ;; network interface lookup
83 #:interface #:make-interface #:lookup-interface #:get-network-interfaces
84 #:interface-name #:interface-index
86 ;; socket classes
87 #:socket #:stream-socket #:datagram-socket
88 #:internet-socket #:local-socket
89 #:active-socket #:passive-socket
90 #:socket-stream-internet-active
91 #:socket-stream-internet-passive
92 #:socket-stream-local-active
93 #:socket-stream-local-passive
94 #:socket-datagram-local-active
95 #:socket-datagram-internet-active
97 ;; socket methods
98 #:socket-fd #:socket-address #:socket-family #:socket-protocol
99 #:socket-lisp-stream #:get-socket-option #:set-socket-option
100 #:socket-type #:make-socket #:socket-close #:socket-open-p
101 #:socket-non-blocking #:local-name #:remote-name
102 #:bind-address #:socket-listen #:accept-connection
103 #:connect #:unconnect #:socket-connected-p
104 #:shutdown #:socket-send #:socket-receive