Moved the functions to get/set non-blocking state to IO.STREAMS .
[iolib.git] / sockets / pkgdcl.lisp
blobbb1718c0bae6d6beeb53bf3ebeea7ca4668e15c3
1 ;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*-
3 ;; Copyright (C) 2006, 2007 Stelian Ionescu
4 ;;
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)
30 (:export
31 ;; conditions
32 #:possible-bug
33 #:system-error #:unix-error #:resolver-error
34 #:unknown-interface #:unknown-protocol
35 #:invalid-address
36 ; condition accessors
37 #:bug-data
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
47 ;; addresses
48 #:sockaddr #:inetaddr #:ipv4addr #:ipv6addr #:localaddr
49 #:make-address #:sockaddr= #:sockaddr->presentation #:copy-sockaddr
50 #:name #:abstract-p
52 ;; well-known addresses and important values
53 #:+max-ipv4-value+
54 #:+ipv4-unspecified+ #:+ipv4-loopback+
55 #:+ipv6-unspecified+ #:+ipv6-loopback+
56 #:+ipv6-interface-local-all-nodes+ #:+ipv6-link-local-all-nodes+
57 #:+ipv6-interface-local-all-routers+ #:+ipv6-link-local-all-routers+
58 #:+ipv6-site-local-all-routers+
60 ;; address predicates
61 #:ipv4-address-p #:ipv6-address-p #:local-address-p
62 #:inetaddr-unspecified-p #:inetaddr-loopback-p
63 #:inetaddr-multicast-p #:inetaddr-unicast-p
64 #:ipv6-ipv4-mapped-p #:ipv6-interface-local-multicast-p
65 #:ipv6-link-local-multicast-p #:ipv6-admin-local-multicast-p
66 #:ipv6-site-local-multicast-p #:ipv6-organization-local-multicast-p
67 #:ipv6-global-multicast-p #:ipv6-reserved-multicast-p
68 #:ipv6-unassigned-multicast-p #:ipv6-transient-multicast-p
69 #:ipv6-solicited-node-multicast-p
70 #:ipv6-link-local-unicast-p #:ipv6-site-local-unicast-p
71 #:ipv6-global-unicast-p
72 #:ipv6-multicast-type #:inetaddr-type
74 ;; hostname, service and protocol lookup
75 #:*ipv6*
76 #:host #:make-host #:lookup-host #:random-address
77 #:host-truename #:host-aliases #:host-addresses
78 #:service #:make-service #:lookup-service
79 #:service-name #:service-port #:service-protocol
80 #:protocol #:make-protocol #:lookup-protocol
81 #:protocol-name #:protocol-aliases #:protocol-number
83 ;; network interface lookup
84 #:interface #:make-interface #:lookup-interface #:get-network-interfaces
85 #:interface-name #:interface-index
87 ;; socket classes
88 #:socket #:stream-socket #:datagram-socket
89 #:internet-socket #:local-socket
90 #:active-socket #:passive-socket
91 #:socket-stream-internet-active
92 #:socket-stream-internet-passive
93 #:socket-stream-local-active
94 #:socket-stream-local-passive
95 #:socket-datagram-local-active
96 #:socket-datagram-internet-active
98 ;; socket methods
99 #:socket-fd #:socket-address #:socket-family #:socket-protocol
100 #:get-socket-option #:set-socket-option
101 #:socket-type #:make-socket #:socket-close #:socket-open-p
102 #:local-name #:remote-name
103 #:bind-address #:socket-listen #:accept-connection
104 #:connect #:unconnect #:socket-connected-p
105 #:shutdown #:socket-send #:socket-receive))