Stream position is no longer tracked for DUAL-CHANNEL-GRAY-STREAM.
[iolib.git] / sockets / defpackage.lisp
blobd483bdc1a26b02e22d973d8cc967ee6f10faf135
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 #-(or sbcl cmu openmcl clisp allegro)
25 (error "Your CL implementation is not suported.")
27 (defpackage :net.sockets
28 (:nicknames #:sockets)
29 (:use #:common-lisp #:cffi #:split-sequence
30 #:iolib-utils #:io.encodings)
31 (:import-from #:iolib-posix
32 #:system-error #:unix-error #:message)
33 #+(or sbcl cmu openmcl clisp allegro)
34 (:import-from #+sbcl #:sb-gray
35 #+cmu #:ext
36 #+openmcl #:ccl
37 #+clisp #:gray
38 #+allegro #:excl
39 #:fundamental-binary-input-stream #:fundamental-binary-output-stream
40 #:fundamental-character-input-stream #:fundamental-character-output-stream
41 #:stream-clear-input #:stream-clear-output
42 #:stream-finish-output #:stream-force-output
43 #:stream-read-byte #:stream-write-byte
44 #:stream-peek-char #:stream-read-char #:stream-read-char-no-hang
45 #:stream-unread-char #:stream-read-line #:stream-listen
46 #-clisp #:stream-read-sequence
47 #+clisp #:stream-read-char-sequence #+clisp #:stream-read-byte-sequence
48 #-clisp #:stream-write-sequence
49 #+clisp #:stream-write-char-sequence #+clisp #:stream-write-byte-sequence
50 #:stream-advance-to-column #:stream-fresh-line
51 #:stream-line-column #:stream-start-line-p
52 #-clisp #:stream-line-length
53 #:stream-terpri #:stream-write-char #:stream-write-string)
54 (:export
55 ;; conditions
56 #:possible-bug
57 #:system-error #:unix-error #:resolver-error
58 #:unknown-interface #:unknown-protocol
59 #:invalid-address
60 ; condition accessors
61 #:bug-data
62 #:error-code #:error-identifier #:error-message
63 #:interface-name #:interface-index #:protocol-name #:protocol-number
64 #:address #:address-type
66 ;; low-level address conversion functions
67 #:vector-to-ipaddr #:ipaddr-to-vector #:ipaddr-to-dotted
68 #:dotted-to-ipaddr #:dotted-to-vector #:vector-to-dotted
69 #:colon-separated-to-vector #:vector-to-colon-separated
71 ;; addresses
72 #:sockaddr #:inetaddr #:ipv4addr #:ipv6addr #:localaddr
73 #:make-address #:sockaddr= #:sockaddr->presentation #:copy-sockaddr
74 #:name #:abstract-p
76 ;; well-known addresses and important values
77 #:+max-ipv4-value+
78 #:+ipv4-unspecified+ #:+ipv4-loopback+
79 #:+ipv6-unspecified+ #:+ipv6-loopback+
80 #:+ipv6-interface-local-all-nodes+ #:+ipv6-link-local-all-nodes+
81 #:+ipv6-interface-local-all-routers+ #:+ipv6-link-local-all-routers+
82 #:+ipv6-site-local-all-routers+
84 ;; address predicates
85 #:ipv4-address-p #:ipv6-address-p #:local-address-p
86 #:inetaddr-unspecified-p #:inetaddr-loopback-p
87 #:inetaddr-multicast-p #:inetaddr-unicast-p
88 #:ipv6-ipv4-mapped-p #:ipv6-interface-local-multicast-p
89 #:ipv6-link-local-multicast-p #:ipv6-admin-local-multicast-p
90 #:ipv6-site-local-multicast-p #:ipv6-organization-local-multicast-p
91 #:ipv6-global-multicast-p #:ipv6-reserved-multicast-p
92 #:ipv6-unassigned-multicast-p #:ipv6-transient-multicast-p
93 #:ipv6-solicited-node-multicast-p
94 #:ipv6-link-local-unicast-p #:ipv6-site-local-unicast-p
95 #:ipv6-global-unicast-p
96 #:ipv6-multicast-type #:inetaddr-type
98 ;; hostname, service and protocol lookup
99 #:*ipv6*
100 #:host #:make-host #:lookup-host #:random-address
101 #:host-truename #:host-aliases #:host-addresses
102 #:service #:make-service #:lookup-service
103 #:service-name #:service-port #:service-protocol
104 #:protocol #:make-protocol #:lookup-protocol
105 #:protocol-name #:protocol-aliases #:protocol-number
107 ;; network interface lookup
108 #:interface #:make-interface #:lookup-interface #:get-network-interfaces
109 #:interface-name #:interface-index
111 ;; socket classes
112 #:socket #:stream-socket #:datagram-socket
113 #:internet-socket #:local-socket
114 #:active-socket #:passive-socket
115 #:socket-stream-internet-active
116 #:socket-stream-internet-passive
117 #:socket-stream-local-active
118 #:socket-stream-local-passive
119 #:socket-datagram-local-active
120 #:socket-datagram-internet-active
122 ;; socket methods
123 #:socket-fd #:socket-address #:socket-family #:socket-protocol
124 #:external-format-of #:istream-pos-of #:ostream-pos-of
125 #:get-socket-option #:set-socket-option
126 #:socket-type #:make-socket #:socket-close #:socket-open-p
127 #:socket-non-blocking #:local-name #:remote-name
128 #:bind-address #:socket-listen #:accept-connection
129 #:connect #:unconnect #:socket-connected-p
130 #:shutdown #:socket-send #:socket-receive