Common Lisp Package: IOLIB.SOCKETS

README:

FUNCTION

Public

ADDRESS-EQUAL-P (ADDR1 ADDR2 &OPTIONAL (FAMILY INTERNET))

Returns T if both arguments are designators for the same socket address.

ADDRESS-TO-VECTOR (ADDRESS)

Convert any representation of an internet address to a vector. Allowed inputs are: unsigned 32-bit integers, strings, vectors and INET-ADDRESS objects. If the address is valid, two values are returned: the vector and the address type (:IPV4 or IPV6), otherwise NIL is returned.

ADDRESSP (ADDRESS)

Returns T if ADDRESS is an object of class ADDRESS. Does not return T for other low-level address representations.

COLON-SEPARATED-TO-VECTOR (STRING)

Convert a colon-separated IPv6 address to a (SIMPLE-ARRAY (UNSIGNED-BYTE 16) 8).

DOTTED-TO-INTEGER (ADDRESS)

Convert a dotted IPv4 address to an (UNSIGNED-BYTE 32).

DOTTED-TO-VECTOR (ADDRESS)

Convert a dotted IPv4 address to a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) 4).

ENSURE-ADDRESS (ADDRESS &KEY (FAMILY INTERNET) ABSTRACT (ERRORP T))

If FAMILY is :LOCAL, a LOCAL-ADDRESS is instantiated with ADDRESS as its NAME slot. If FAMILY is :INTERNET, an appropriate subtype of INET-ADDRESS is instantiated after guessing the address type through ADDRESS-TO-VECTOR. If the address is invalid and ERRORP is not NIL, then a CL:PARSE-ERROR is signalled, otherwise NIL is returned. When ADDRESS is already an instance of the ADDRESS class, a check is made to see if it matches the FAMILY argument and it is returned unmodified.

ENSURE-HOSTNAME (ADDRESS &KEY (IPV6 *IPV6*) (ERRORP T))

If ADDRESS is an inet-address designator, it is converted, if necessary, to an INET-ADDRESS object and returned. Otherwise it is assumed to be a host name which is then looked up in order to return its primary address as the first return value and the remaining address list as the second return value.

ENSURE-NETMASK (THING)

If THING is of type IPV4-ADDRESS it is returned as is; if keyword it must be one of :A, :B or :C otherwise it's treated as a CIDR suffix.

INET-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is an Inet address object.

INTEGER-TO-DOTTED (INTEGER)

Convert an (UNSIGNED-BYTE 32) IPv4 address to a dotted string.

INTEGER-TO-VECTOR (IPADDR)

Convert a 32-bit unsigned integer to a vector.

INTERFACE-INDEX (INTERFACE)

Return the OS index of a network interface.

INTERFACE-NAME (INTERFACE)

Return the name of an network interface.

IPV4-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is an IPv4 address object.

IPV6-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is an IPv6 address object.

IPV6-ADMIN-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a admin-local multicast IPv6 address.

IPV6-GLOBAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a global multicast IPv6 address.

IPV6-GLOBAL-UNICAST-P (ADDRESS)

Returns T if ADDRESS is an global unicasst IPv6 address.

IPV6-INTERFACE-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an interface-local IPv6 address.

IPV6-IPV4-MAPPED-P (ADDRESS)

Returns T if ADDRESS is an IPv6 address representing an IPv4 mapped address.

IPV6-MULTICAST-TYPE (ADDRESS)

Returns the multicast type of ADDRESS or NIL if it's not a multicast address.

IPV6-ORGANIZATION-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an organization-local multicast IPv6 address.

IPV6-RESERVED-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a reserved multicast IPv6 address.

IPV6-SITE-LOCAL-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an site-local multicast IPv6 address.

IPV6-SITE-LOCAL-UNICAST-P (ADDRESS)

Returns T if ADDRESS is an site-local unicast IPv6 address.

IPV6-SOLICITED-NODE-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a solicited-node multicast IPv6 address.

IPV6-TRANSIENT-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is a transient multicast IPv6 address.

IPV6-UNASSIGNED-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an unassigned multicast IPv6 address.

IPV6-UNICAST-TYPE (ADDRESS)

Returns the unicast type of ADDRESS or NIL if it's not a unicast address.

LIST-NETWORK-INTERFACES

Returns a list of network interfaces currently available.

LOCAL-ADDRESS-P (ADDRESS)

Returns T if ADDRESS is a local address object.

LOOKUP-HOSTNAME (HOST &KEY (IPV6 *IPV6*))

Looks up a host by name or address. IPV6 determines the IPv6 behaviour, defaults to *IPV6*. Returns 4 values: * an address * a list of additional addresses(if existent) * the canonical name of the host * an alist of all the host's names with their respective addresses

LOOKUP-INTERFACE (INTERFACE)

Lookup an interface by name or index. UNKNOWN-INTERFACE is signalled if an interface is not found.

LOOKUP-PROTOCOL (PROTOCOL)

Lookup a protocol by name or number. Signals an UNKNOWN-PROTOCOL error if no protocol is found.

LOOKUP-SERVICE (SERVICE &OPTIONAL (PROTOCOL TCP))

Lookup a service by port or name. PROTOCOL should be one of :TCP, :UDP or :ANY.

MAKE-ADDRESS (NAME)

Constructs an ADDRESS object. NAME should be of type IPV4-ARRAY, IPV6-ARRAY or STRING in which case an instance of IPV4-ADDRESS, IPV6-ADDRESS or LOCAL-ADDRESS, respectively, will be created. Otherwise, a TYPE-ERROR is signalled. See also ENSURE-ADDRESS.

MAKE-INTERFACE (NAME INDEX)

Constructor for INTERFACE objects.

MAKE-NETMASK (&KEY CIDR CLASS)

Create a subnet mask by specifying either its class(:A, :B or :C) or a CIDR suffix(a number between 0 and 32).

MAP-IPV4-ADDRESS-TO-IPV6 (ADDRESS)

Returns an IPv6 address by mapping ADDRESS onto it.

MAP-IPV6-ADDRESS-TO-IPV4 (ADDRESS)

Extracts the IPv4 part of an IPv6-mapped IPv4 address. Signals an error if ADDRESS is not an IPv6-mapped IPv4 address.

SOCKET-IPV6-P (SOCKET)

Return T if SOCKET is an AF_INET6 socket.

STRING-ADDRESS-TO-VECTOR (ADDRESS)

Convert a string address (dotted or colon-separated) to a vector address. If the string is not a valid address, return NIL.

VECTOR-TO-COLON-SEPARATED (VECTOR &OPTIONAL (CASE DOWNCASE))

Convert an (SIMPLE-ARRAY (UNSIGNED-BYTE 16) 8) to a colon-separated IPv6 address. CASE may be :DOWNCASE or :UPCASE.

VECTOR-TO-DOTTED (VECTOR)

Convert an 4-element vector to a dotted string.

VECTOR-TO-INTEGER (VECTOR)

Convert a vector to a 32-bit unsigned integer.

Undocumented

IPV6-SOCKET-P (&REST ARGS)

LOOKUP-HOST (&REST ARGS)

Private

MAKE-HOST (TRUENAME ADDRESSES &OPTIONAL ALIASES)

Instantiates a HOST object.

MAKE-PROTOCOL (NAME NUMBER &OPTIONAL ALIASES)

Constructor for PROTOCOL objects.

MAKE-SERVICE (NAME PORT PROTOCOL)

Constructor for SERVICE objects.

Undocumented

%%INIT-INTERNET-DATAGRAM-ACTIVE-SOCKET (SOCKET BROADCAST INTERFACE REUSE-ADDRESS LOCAL-HOST LOCAL-PORT REMOTE-HOST REMOTE-PORT)

%%INIT-INTERNET-STREAM-ACTIVE-SOCKET (SOCKET KEEPALIVE NODELAY REUSE-ADDRESS LOCAL-HOST LOCAL-PORT REMOTE-HOST REMOTE-PORT)

%%INIT-INTERNET-STREAM-PASSIVE-SOCKET (SOCKET INTERFACE REUSE-ADDRESS LOCAL-HOST LOCAL-PORT BACKLOG)

%%INIT-LOCAL-DATAGRAM-ACTIVE-SOCKET (SOCKET LOCAL-FILENAME REMOTE-FILENAME)

%%INIT-LOCAL-STREAM-ACTIVE-SOCKET (SOCKET LOCAL-FILENAME REMOTE-FILENAME)

%%INIT-LOCAL-STREAM-PASSIVE-SOCKET (SOCKET LOCAL-FILENAME REUSE-ADDRESS BACKLOG)

%%MAKE-INTERNET-DATAGRAM-ACTIVE-SOCKET (FAMILY EF BROADCAST INTERFACE REUSE-ADDRESS LOCAL-HOST LOCAL-PORT REMOTE-HOST REMOTE-PORT)

%%MAKE-INTERNET-STREAM-ACTIVE-SOCKET (FAMILY EF KEEPALIVE NODELAY REUSE-ADDRESS LOCAL-HOST LOCAL-PORT REMOTE-HOST REMOTE-PORT INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE)

%%MAKE-INTERNET-STREAM-PASSIVE-SOCKET (FAMILY EF INTERFACE REUSE-ADDRESS LOCAL-HOST LOCAL-PORT BACKLOG)

%%MAKE-LOCAL-DATAGRAM-ACTIVE-SOCKET (FAMILY EF LOCAL-FILENAME REMOTE-FILENAME)

%%MAKE-LOCAL-STREAM-ACTIVE-SOCKET (FAMILY EF LOCAL-FILENAME REMOTE-FILENAME INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE)

%%MAKE-LOCAL-STREAM-PASSIVE-SOCKET (FAMILY EF LOCAL-FILENAME REUSE-ADDRESS BACKLOG)

%%RECEIVE-FROM (FD SS SIZE BUFFER START LENGTH FLAGS)

%%SEND-TO (FD SS GOT-PEER BUFFER START LENGTH FLAGS)

%%SOCKETPAIR (DOMAIN TYPE PROTOCOL FILEDES)

%ACCEPT (SOCKET ADDRESS ADDRLEN)

%BIND (SOCKET ADDRESS ADDRLEN)

%CONNECT (SOCKET ADDRESS ADDRLEN)

%GETPEERNAME (SOCKET ADDRESS ADDRLEN)

%GETSOCKNAME (SOCKET ADDRESS ADDRLEN)

%GETSOCKOPT (SOCKET LEVEL OPTNAME OPTVAL OPTLEN)

%IF-FREENAMEINDEX (PTR)

%IF-INDEXTONAME (IFINDEX IFNAME)

%IF-NAMEINDEX

%IF-NAMETOINDEX (IFNAME)

%LISTEN (SOCKET BACKLOG)

%LOCAL-NAME (SOCKET)

%MAKE-INTERNET-DATAGRAM-ACTIVE-SOCKET (ARGUMENTS FAMILY EF)

%MAKE-INTERNET-STREAM-ACTIVE-SOCKET (ARGUMENTS FAMILY EF)

%MAKE-INTERNET-STREAM-PASSIVE-SOCKET (ARGUMENTS FAMILY EF)

%MAKE-LOCAL-DATAGRAM-ACTIVE-SOCKET (ARGUMENTS FAMILY EF)

%MAKE-LOCAL-STREAM-ACTIVE-SOCKET (ARGUMENTS FAMILY EF)

%MAKE-LOCAL-STREAM-PASSIVE-SOCKET (ARGUMENTS FAMILY EF)

%RECEIVE-FROM (FD SS SIZE BUFFER START END FLAGS)

%RECVFROM (SOCKET BUFFER LENGTH FLAGS ADDRESS ADDRLEN)

%RECVMSG (SOCKET MESSAGE FLAGS)

%REMOTE-NAME (SOCKET)

%SEND-TO (FD SS GOT-PEER BUFFER START END FLAGS)

%SENDMSG (SOCKET MESSAGE FLAGS)

%SENDTO (SOCKET BUFFER LENGTH FLAGS DESTADDR DESTLEN)

%SETSOCKOPT (SOCKET LEVEL OPTNAME OPTVAL OPTLEN)

%SHUTDOWN (SOCKET HOW)

%SIGNAL-SOCKET-ERROR (ERRNO SYSCALL FD FD2)

%SOCKET (DOMAIN TYPE PROTOCOL)

%SOCKETPAIR (DOMAIN TYPE PROTOCOL)

ACTUAL-SIZE-OF-SOCKADDR-UN (SUN)

BIND-IPV4-ADDRESS (FD ADDRESS PORT)

BIND-IPV6-ADDRESS (FD ADDRESS PORT)

CALL-WITH-BUFFERS-FOR-FD-PASSING (FN)

CALL-WITH-SOCKET-TO-WAIT-CONNECT (SOCKET THUNK WAIT)

CHECK-IF-ENOUGH-BYTES (BUFFER LENGTH)

CHECK-REPLY-FOR-ERRORS (REPLY HOST QUERY-TYPE)

COMPUTE-CIDR-PREFIX-FROM-NETMASK (NETMASK)

COMPUTE-FLAGS (FLAGS ARGS &OPTIONAL ENV)

COPY-SIMPLE-ARRAY-UB16-TO-ALIEN-VECTOR (LISP-VEC ALIEN-VEC)

CREATE-SOCKET (FAMILY TYPE CONNECT EXTERNAL-FORMAT &KEY FD INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE)

DECODE-A-OR-AAAA-RESPONSE (MSG)

DECODE-RESPONSE (MESSAGE)

DECODE-RR (RR)

DECODE-TIMEOUT (TIMEOUT)

DNS-LOOKUP-HOST-BY-ADDRESS (ADDRESS)

DNS-LOOKUP-HOST-BY-NAME (HOST IPV6)

DNS-LOOKUP-HOST-IN-A-AND-AAAA (HOST)

DNS-LOOKUP-HOST-IN-ONE-DOMAIN (HOST QUERY-TYPE)

DNS-PTR-NAME (ADDRESS)

DNS-QUERY (NAME &KEY (TYPE A) (SEARCH *DNS-SEARCH-DOMAIN*) (NAMESERVERS *DNS-NAMESERVERS*) DECODE (REPEAT *DNS-REPEAT*) (TIMEOUT *DNS-TIMEOUT*))

DNS-QUERY/TCP (BUFFER LENGTH NAMESERVER TIMEOUT)

DNS-QUERY/UDP (BUFFER LENGTH NAMESERVER TIMEOUT)

DNS-RECORD-TYPE-P (ID)

DO-ONE-DNS-QUERY (NAME TYPE SEARCH NS REPEAT TIMEOUT)

DOMAIN-NAME-TO-DNS-FORMAT (DOMAIN-NAME)

ENSURE-NUMBER (VALUE &KEY (START 0) END (RADIX 10) (TYPE T) (ERRORP T))

ENSURE-NUMERICAL-SERVICE (SERVICE &OPTIONAL (PROTOCOL TCP))

ENSURE-STRING-OR-UNSIGNED-BYTE (THING &KEY (TYPE T) (RADIX 10) (ERRORP T))

FIND-CNAME (MSG)

FIND-PROTOCOL (THING CACHE-FN DISK-FN)

FIND-PROTOCOL-IN-PARSED-LINES (TOKENS PREDICATE)

FIND-SERVICE (THING PROTOCOL CACHE-FN DISK-FN)

FIND-SERVICE-IN-PARSED-LINES (TOKENS PREDICATE)

FIND-SERVICE-NAME-IN-CACHE (THING PROTOCOL)

FIND-SERVICE-NUMBER-IN-CACHE (THING PROTOCOL)

GET-INTERFACE-BY-INDEX (INDEX)

GET-INTERFACE-BY-NAME (NAME)

GET-SOCKET-OPTION-BOOL (FD LEVEL OPTION)

GET-SOCKET-OPTION-INT (FD LEVEL OPTION)

GET-SOCKET-OPTION-LINGER (FD LEVEL OPTION)

GET-SOCKET-OPTION-TIMEVAL (FD LEVEL OPTION)

GET-TCP-QUERY-LENGTH (SOCKET TIMEOUT)

HTONL (LONG)

HTONS (SHORT)

IN6-ADDR-TO-IPV6-ARRAY (IN6-ADDR)

IPV4-CONNECT (FD ADDRESS PORT)

IPV4-DNS-PTR-NAME (ADDRESS)

IPV4-ON-IPV6-MAPPED-VECTOR-P (VECTOR)

IPV6-CONNECT (FD ADDRESS PORT)

IPV6-DNS-PTR-NAME (ADDRESS)

IPV6-VECTOR-TO-DOTTED (VECTOR)

LISP->C-BOOL (VAL)

LOOKUP-HOST-BY-ADDRESS (ADDRESS IPV6)

LOOKUP-HOST-BY-NAME (HOST IPV6)

LOOKUP-PROTOCOL-BY-NAME (PROTO)

LOOKUP-PROTOCOL-BY-NUMBER (PROTO)

LOOKUP-PROTOCOL-ON-DISK-BY-NAME (FILE PROTOCOL)

LOOKUP-PROTOCOL-ON-DISK-BY-NUMBER (FILE PROTOCOL)

LOOKUP-SERVICE-BY-NAME (THING PROTOCOL)

LOOKUP-SERVICE-BY-NUMBER (THING PROTOCOL)

LOOKUP-SERVICE-ON-DISK-BY-NAME (FILE SERVICE PROTOCOL)

LOOKUP-SERVICE-ON-DISK-BY-NUMBER (FILE SERVICE PROTOCOL)

LOOKUP-SOCKET-ERROR (ERRNO)

MAKE-FIRST-LEVEL-NAME (FAMILY TYPE CONNECT)

MAKE-QUERY (ID QUESTION &OPTIONAL RECURSION-DESIRED)

MAKE-QUESTION (QNAME QTYPE QCLASS)

MAKE-SOCKADDR-IN (SIN UB8-VECTOR &OPTIONAL (PORTNO 0))

MAKE-SOCKADDR-IN6 (SIN6 UB16-VECTOR &OPTIONAL (PORTNO 0))

MAKE-SOCKADDR-UN (SUN STRING ABSTRACT)

MAP-ETC-FILE (THUNK FILE)

MAP-IPV4-VECTOR-TO-IPV6 (ADDR)

MAP-IPV6-VECTOR-TO-IPV4 (ADDR)

MAYBE-GROW-BUFFER (BUFFER VECTOR)

MERGE-A-AND-AAAA-REPLIES (4-REPLY 6-REPLY)

MONITOR-OLDP (MONITOR)

NTOHL (LONG)

NTOHS (SHORT)

PARSE-/ETC/HOSTS (FILE)

PARSE-/ETC/RESOLV.CONF (FILE)

PARSE-UN-PATH (PATH)

PREPARE-QUERY (NAME TYPE)

PREPROCESS-DNS-NAME (NAME TYPE)

PRINC-IPV4-ON-IPV6-MAPPED-ADDRESS (VECTOR S)

PROCESS-ONE-REPLY (REPLY QUERY-TYPE)

PROTOCOL-COMPATIBLE-P (PROTOCOL THING)

PURGE-PROTOCOL-CACHE (&OPTIONAL FILE)

PURGE-SERVICE-CACHE (&OPTIONAL FILE)

QUERY-CLASS-ID (NUMBER)

QUERY-CLASS-NUMBER (ID)

QUERY-TYPE-ID (NUMBER)

QUERY-TYPE-NUMBER (ID)

RCODE-ID (NUMBER)

RCODE-NUMBER (ID)

READ-DNS-POINTER-RECURSIVELY (SEQUENCE POSITION &OPTIONAL (DEPTH 5))

READ-UB16 (BUFFER)

READ-UB16-FROM-VECTOR (VECTOR POSITION)

READ-UB32 (BUFFER)

READ-UB32-FROM-VECTOR (VECTOR POSITION)

READ-UB8 (BUFFER)

READ-VECTOR (BUFFER LENGTH)

RECEIVE-TCP-DNS-MESSAGE (SOCKET TIME-FN)

REMOVE-TRAILING-DOT (STRING)

REPLY-ERROR-CONDITION (REPLY QUERY-TYPE)

REVERSE-VECTOR (VECTOR)

SEARCH-HOST-BY-ADDRESS (ADDRESS)

SEARCH-HOST-BY-NAME (NAME IPV6)

SEEK-READ-CURSOR (BUFFER INDEX)

SELECT-SOCKET-CLASS (ADDRESS-FAMILY TYPE CONNECT PROTOCOL)

SEND-TCP-DNS-QUERY (SOCKET BUFFER LENGTH)

SET-FUNCTION-DOCSTRING (FUNCTION DOCSTRING)

SET-SOCKET-OPTION-BOOL (FD LEVEL OPTION VALUE)

SET-SOCKET-OPTION-IFREQ-NAME (FD LEVEL OPTION INTERFACE)

SET-SOCKET-OPTION-INT (FD LEVEL OPTION VALUE)

SET-SOCKET-OPTION-LINGER (FD LEVEL OPTION NEW-ONOFF NEW-LINGER)

SET-SOCKET-OPTION-TIMEVAL (FD LEVEL OPTION NEW-SEC)

SIGNAL-SOCKET-ERROR (ERRNO &OPTIONAL SYSCALL FD FD2)

SIGNAL-UNKNOWN-INTERFACE-ERROR (DATUM)

SOCK-FAM (SOCKET)

SOCKADDR->SOCKADDR-STORAGE (SS SOCKADDR &OPTIONAL (PORT 0))

SOCKADDR-IN->SOCKADDR (SIN)

SOCKADDR-IN6->SOCKADDR (SIN6)

SOCKADDR-SIZE (SS)

SOCKADDR-STORAGE->SOCKADDR (SS)

SOCKADDR-UN->SOCKADDR (SUN)

SOCKET-READ-FN (FD BUFFER NBYTES)

SOCKET-WRITE-FN (FD BUFFER NBYTES)

SOCKTYPE-ARGS (TYPE)

SOCKTYPE-GETTER (TYPE)

SOCKTYPE-SETTER (TYPE)

SPACE-CHAR-P (CHAR)

SPLIT-ETC-TOKENS (LINE)

SPLIT-PORT/PROTO (PORT/PROTO)

TRANSLATE-MAKE-SOCKET-KEYWORDS-TO-CONSTANTS (ADDRESS-FAMILY TYPE PROTOCOL)

UB16-TO-VECTOR (VALUE)

UB32-TO-VECTOR (VALUE)

UNREAD-BYTES (BUFFER)

UNSET-METHOD-DOCSTRING (GF QUALIFIERS SPECIALIZERS)

UPDATE-DNS-PARAMETERS (FILE)

UPDATE-HOSTS-LIST (FILE)

VECTOR-EQUAL (V1 V2)

WAIT->TIMEOUT (WAIT)

WAIT-UNTIL-SOCKET-CONNECTED (SOCKET TIMEOUT)

WRITE-UB16 (BUFFER VALUE)

WRITE-UB32 (BUFFER VALUE)

WRITE-UB8 (BUFFER VALUE)

WRITE-VECTOR (BUFFER VECTOR)

MACRO

Public

WITH-ACCEPT-CONNECTION ((VAR PASSIVE-SOCKET &REST ARGS) &BODY BODY)

Bind VAR to a socket created by passing PASSIVE-SOCKET and ARGS to ACCEPT-CONNECTION and execute BODY as implicit PROGN. The socket is automatically closed upon exit.

WITH-OPEN-SOCKET ((VAR &REST ARGS) &BODY BODY)

Bind VAR to a socket created by passing ARGS to MAKE-SOCKET and execute BODY as implicit PROGN. The socket is automatically closed upon exit.

Private

WITH-CLOSE-ON-ERROR ((VAR VALUE) &BODY BODY)

Bind `VAR' to `VALUE' and execute `BODY' as implicit PROGN. If a non-local exit occurs during the execution of `BODY', call CLOSE with :ABORT T on `VAR'.

Undocumented

%CREATE-INTERNET-SOCKET (FAMILY &REST ARGS)

%DEFINE-DNS-FIELD-READER (NAME OFFSET TYPE LENGTH)

%DEFINE-DNS-FIELD-WRITER (NAME OFFSET TYPE LENGTH)

DEFINE-ADDRESS (NAME ADDRESS-STRING DOCSTRING)

DEFINE-DNS-FIELD (NAME OFFSET TYPE &KEY LENGTH)

DEFINE-GET-SOCKOPT (OS NAME TYPE LEVEL OPTNAME)

DEFINE-RESOLVER-ERROR (NAME FORMAT-STRING &OPTIONAL DOCUMENTATION)

DEFINE-SET-SOCKOPT (OS NAME TYPE LEVEL OPTNAME)

DEFINE-SOCKET-CALL (NAME RETURN-TYPE &BODY ARGS)

DEFINE-SOCKET-CREATION-CALL (NAME RETURN-TYPE &BODY ARGS)

DEFINE-SOCKET-CREATOR ((SOCKET-FAMILY SOCKET-TYPE SOCKET-CONNECT) (FAMILY EF KEY &REST ARGS) &BODY BODY)

DEFINE-SOCKET-ERROR (NAME IDENTIFIER &OPTIONAL DOCUMENTATION)

DEFINE-SOCKET-FLAG (PLACE NAME VALUE PLATFORM)

DEFINE-SOCKET-FLAGS (PLACE &BODY DEFINITIONS)

DEFINE-SOCKET-OPTION (NAME ACTION OPTNAME LEVEL ARGTYPE OS)

DEFINE-SOCKET-OPTION-HELPER (HELPER ARGS &BODY BODY)

DEFINE-SOCKET-OPTION-TYPE (NAME ARGS)

DEFINE-SOCKET-OPTIONS (ACTION LEVEL OS &BODY OPTIONS)

DEFSYSCALL (NAME-AND-OPTS RETURN-TYPE &BODY ARGS)

IGNORE-PARSE-ERRORS (&BODY BODY)

READ-UB-BE (VECTOR POSITION &OPTIONAL (LENGTH 1))

WITH-BUFFERS-FOR-FD-PASSING ((MSG-VAR CMSG-VAR) &BODY BODY)

WITH-GUARD-AGAINST-NON-LIST-ARGS-AND-DESTRUCTURING-BIND-ERRORS (FORM ARGS &BODY BODY)

WITH-SOCKADDR-IN ((VAR ADDRESS &OPTIONAL (PORT 0)) &BODY BODY)

WITH-SOCKADDR-IN6 ((VAR ADDRESS &OPTIONAL PORT) &BODY BODY)

WITH-SOCKADDR-STORAGE ((VAR) &BODY BODY)

WITH-SOCKADDR-STORAGE-AND-SOCKLEN ((SS-VAR SIZE-VAR) &BODY BODY)

WITH-SOCKADDR-UN ((VAR ADDRESS ABSTRACT) &BODY BODY)

WITH-SOCKET-TO-WAIT-CONNECT ((SOCKET WAIT) &BODY BODY)

WITH-SOCKLEN ((VAR VALUE) &BODY BODY)

GENERIC-FUNCTION

Public

ACCEPT-CONNECTION (PASSIVE-SOCKET &KEY (WAIT T) OUTPUT-BUFFER-SIZE INPUT-BUFFER-SIZE EXTERNAL-FORMAT &ALLOW-OTHER-KEYS)

Extracts the first connection from the queue of pending connections on SOCKET. WAIT specifies how long to wait for a connection: NIL means "return immediately", a non-negative real specifies a timeout in seconds and T means "wait forever". EXTERNAL-FORMAT optionally specifies the external format of the new socket - the default being that of SOCKET. Buffer sizes for the new socket can also be specified using INPUT-BUFFER-SIZE and OUTPUT-BUFFER-SIZE. If a connection is received, returns two values: the newly created socket and the remote host address.

ADDRESS-TO-STRING (ADDRESS)

Returns a textual presentation of ADDRESS.

ADDRESS-TYPE (ADDRESS)

Returns a keyword symbol denoting the kind of ADDRESS (:IPV4, :IPV6 or :LOCAL). If ADDRESS is not a known address object, NIL is returned.

ADDRESS= (ADDR1 ADDR2)

Returns T if both arguments are the same socket address.

BIND-ADDRESS (SOCKET ADDRESS &KEY (REUSE-ADDRESS T) (PORT 0) &ALLOW-OTHER-KEYS)

Sets the local address of SOCKET to ADDRESS(and PORT for INTERNET sockets). REUSE-ADDRESS sets the SO_REUSEADDR socket option on SOCKET.

CONNECT (SOCKET ADDRESS &KEY (WAIT T) (PORT 0) &ALLOW-OTHER-KEYS)

Connects SOCKET to ADDRESS. For INTERNET sockets you can specify the port to connect to using keyword argument PORT. The default value of PORT is 0, which usually means letting the OS choose a random port to connect to. WAIT specifies how long to wait for a connection: NIL means "return immediately", a non-negative real specifies a timeout in seconds and T means "wait forever".

COPY-ADDRESS (ADDRESS)

Returns a copy of ADDRESS which is ADDRESS= to the original.

DISCONNECT (SOCKET)

Disassociates SOCKET from any remote address. Works only on DATAGRAM sockets.

INET-ADDRESS-HOST-PORTION (ADDRESS NETMASK)

Apply network netmask NETMASK to ADDRESS in order to calculate the host part of ADDRESS.

INET-ADDRESS-IN-NETWORK-P (ADDRESS NETWORK)

Return T if ADDRESS is part of the subnet specified by NETWORK.

INET-ADDRESS-LOOPBACK-P (ADDRESS)

Returns T if ADDRESS is a loopback internet address.

INET-ADDRESS-MULTICAST-P (ADDRESS)

Returns T if ADDRESS is an multicast internet address.

INET-ADDRESS-NETWORK-CLASS (ADDRESS)

Return the network class of ADDRESS: one of :A, :B, :C, :D or :E .

INET-ADDRESS-NETWORK-PORTION (ADDRESS NETMASK)

Apply network netmask NETMASK to ADDRESS in order to calculate the network part of ADDRESS.

INET-ADDRESS-PRIVATE-P (ADDRESS)

Returns T if ADDRESS is in a private network range. Private IPv4 networks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. See http://en.wikipedia.org/wiki/Private_network for details.

INET-ADDRESS-TYPE (ADDRESS)

Returns the address type of ADDRESS as 2 values: * protocol, one of :IPV4 or :IPV6 * kind, one of :UNSPECIFIED, :LOOPBACK, :MULTICAST or :UNICAST For unicast or multicast IPv6 addresses, a third value is returned which corresponds to the return value of IPV6-UNICAST-TYPE or IPV6-MULTICAST-TYPE, respectively.

INET-ADDRESS-UNICAST-P (ADDRESS)

Returns T if ADDRESS is an unicast internet address.

INET-ADDRESS-UNSPECIFIED-P (ADDR)

Returns T if ADDR is an "unspecified" internet address.

INET-ADDRESSES-IN-SAME-NETWORK-P (ADDRESS1 ADDRESS2 NETWORK)

Return T if ADDRESS1 and ADDRESS2 are both part part of the subnet specified by NETWORK.

IPV4-NETWORK= (NET1 NET2)

Returns T if the addresses and the netmasks of the two arguments are respectively ADDRESS=.

LISTEN-ON (SOCKET &KEY BACKLOG &ALLOW-OTHER-KEYS)

Start allowing incoming connections on SOCKET. BACKLOG specifies the maximum length of the queue of pending connections.

LOCAL-FILENAME (SOCKET)

Returns the local filename of SOCKET. Works only on LOCAL sockets.

LOCAL-HOST (SOCKET)

Returns the local host of SOCKET. Works only on INTERNET sockets.

LOCAL-NAME (SOCKET)

For INTERNET sockets, returns two values: the local host and the local port. For LOCAL sockets, returns the local filename.

LOCAL-PORT (SOCKET)

Returns the local port of SOCKET - an (UNSIGNED-BYTE 16). Works only on INTERNET sockets.

MAKE-SOCKET (&KEY ADDRESS-FAMILY TYPE CONNECT IPV6 EXTERNAL-FORMAT (ADDRESS-FAMILY INTERNET) (TYPE STREAM) (CONNECT ACTIVE) (IPV6 *IPV6*) (EXTERNAL-FORMAT DEFAULT) &ALLOW-OTHER-KEYS)

Create an instance of a subclass of SOCKET. ADDRESS-FAMILY, TYPE, CONNECT and IPV6 are used to specify the kind of socket to create. * ADDRESS-FAMILY - :INTERNET or :LOCAL (or :FILE as synonim) * TYPE - :STREAM or :DATAGRAM * CONNECT - :ACTIVE or :PASSIVE * IPV6 - if NIL, create an IPv4 socket, otherwise an IPv6 socket. To initialize the socket, the following keyword arguments can be used depending on ADDRESS-FAMILY, TYPE and CONNECT: * :local-host - a hostname designator or NIL. If non-null the socket will be bound to this address * :local-port - a port designator or NIL. If LOCAL-HOST is non-null, bind the socket to this port. If NIL, choose a random port * :remote-host - a hostname designator or NIL. If non-null the socket will be connected to this address * :remote-port - a port designator. If REMOTE-HOST is non-null, connect the socket to this port * :local-filename - a string or NIL. If non-null the socket will be bound to this file * :remote-filename - a string or NIL. If non-null the socket will be connected to this file * :backlog - a positive integer or NIL. Specifies the length of the incomming connection queue and can't be larger than +MAX-BACKLOG-SIZE+. If NIL, default is *DEFAULT-BACKLOG-SIZE* * :reuse-address: a boolean(default T). set option SO_REUSEADDR if LOCAL-HOST is non-null * :keepalive - a boolean. set option SO_KEEPALIVE * :nodelay - a boolean. set option SO_NODELAY * :interface - a string. set option SO_BINDTODEVICE to this interface * :input-buffer-size - a positive integer. Create the stream input buffer of this size * :output-buffer-size - a positive integer. Create the stream output buffer of this size Glossary: * hostname designator: an instance of INET-ADDRESS or any object accepted by LOOKUP-HOST. IPV6 is passed to LOOKUP-HOST as is * port designator: any object accepted by LOOKUP-SERVICE :address-family :INTERNET :type :STREAM :connect :ACTIVE * Valid keyword args: :LOCAL-HOST, :LOCAL-PORT, :REMOTE-HOST, :REMOTE-PORT, :REUSE-ADDRESS, :KEEPALIVE, :NODELAY, :INPUT-BUFFER-SIZE and :OUTPUT-BUFFER-SIZE :address-family :INTERNET :type :STREAM :connect :PASSIVE * Valid keyword args: :LOCAL-HOST, :LOCAL-PORT, :BACKLOG, :REUSE-ADDRESS, :INTERFACE and :NODELAY :address-family :INTERNET :type :STREAM :connect :ACTIVE * Valid keyword args: :LOCAL-FILENAME, :REMOTE-FILENAME, :INPUT-BUFFER-SIZE and :OUTPUT-BUFFER-SIZE :address-family :INTERNET :type :STREAM :connect :PASSIVE * Valid keyword args: :LOCAL-FILENAME, :REMOTE-FILENAME, :BACKLOG and :REUSE-ADDRESS :address-family :INTERNET :type :DATAGRAM * Valid keyword args: :LOCAL-HOST, :LOCAL-PORT, :REMOTE-HOST, :REMOTE-PORT, :REUSE-ADDRESS, :INTERFACE and :BROADCAST :address-family :LOCAL :type :DATAGRAM * Valid keyword args: :LOCAL-FILENAME and :REMOTE-FILENAME

MAKE-SOCKET-FROM-FD (FD &KEY CONNECT EXTERNAL-FORMAT INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE (CONNECT ACTIVE) (EXTERNAL-FORMAT DEFAULT))

Create a socket instance of the appropriate subclass of SOCKET using FD. The connection type of the socket must be specified - :ACTIVE or :PASSIVE. The address family and type of the socket are automatically discovered using OS functions. Buffer sizes for the new socket can also be specified using INPUT-BUFFER-SIZE and OUTPUT-BUFFER-SIZE.

MAKE-SOCKET-PAIR (&KEY TYPE PROTOCOL EXTERNAL-FORMAT INPUT-BUFFER-SIZE OUTPUT-BUFFER-SIZE (TYPE STREAM) (PROTOCOL DEFAULT) (EXTERNAL-FORMAT DEFAULT))

Create a pair of sockets connected to each other. The socket type must be either :STREAM or :DATAGRAM. Currently OSes can only create :LOCAL sockets this way. Buffer sizes for the new sockets can also be specified using INPUT-BUFFER-SIZE and OUTPUT-BUFFER-SIZE.

RECEIVE-FILE-DESCRIPTOR (SOCKET)

Receive a file descriptor as ancillary data through SOCKET.

RECEIVE-FROM (SOCKET &REST ARGS &KEY FLAGS END START BUFFER SIZE &ALLOW-OTHER-KEYS)

Receives data from SOCKET. If BUFFER is specified START and END are used as bounding index. In that case BUFFER must be an array and its ARRAY-ELEMENT-TYPE be either (UNSIGNED-BYTE 8) or T. If BUFFER is not specified an (UNSIGNED-BYTE 8) buffer of size SIZE will be allocated. Some flags can also be passed to recvfrom(2): * :OUT-OF-BAND for receiving out-of-band data - only for STREAM sockets * :PEEK for keeping the returned data in the kernel buffers * :WAIT-ALL for waiting until the entire buffer can be filled * :DONT-WAIT for making only the current call non-blocking The first two values returned are the buffer and the number of elements that have been copied into the buffer. For INTERNET DATAGRAM sockets, two additional values are returned: the host and port of the remote peer from which the data was received. For LOCAL DATAGRAM sockets, one additional values is returned: the filename of the remote peer from which the data was received.

REMOTE-FILENAME (SOCKET)

Returns the remote filename of SOCKET. Works only on LOCAL sockets.

REMOTE-HOST (SOCKET)

Returns the remote host of SOCKET. Works only on INTERNET sockets.

REMOTE-NAME (SOCKET)

For INTERNET sockets, returns two values: the remote host and the remote port. For REMOTE sockets, returns the remote filename.

REMOTE-PORT (SOCKET)

Returns the remote port of SOCKET - an (UNSIGNED-BYTE 16). Works only on INTERNET sockets.

RESOLVER-ERROR-DATUM (CONDITION)

Return the datum that caused the signalling of a RESOLVER-ERROR condition.

SEND-FILE-DESCRIPTOR (SOCKET FILE-DESCRIPTOR)

Send FILE-DESCRIPTOR through SOCKET. The receiving process must use RECEIVE-FILE-DESCRIPTOR to receive the file descriptor in order for it to be valid in the receiving process.

SEND-TO (SOCKET BUFFER &REST ARGS &KEY (START 0) END REMOTE-FILENAME FLAGS REMOTE-HOST (REMOTE-PORT 0) (IPV6 *IPV6*) &ALLOW-OTHER-KEYS)

Send the contents of BUFFER to SOCKET. BUFFER must be a vector that can be coerced to a (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). START and END are used a bounding index on BUFFER. For disconnected datagram sockets, REMOTE-HOST and REMOTE-PORT or REMOTE-FILENAME are used as destination for the data. Some flags can also be passed to sendto(2): * :OUT-OF-BAND for receiving out-of-band data - only for stream sockets * :DONT-WAIT for making only the current call non-blocking * :DONT-ROUTE for sending only to hosts on directly connected networks, not using gateways * :CONFIRM for signalling progress on the link layer - only available on Linux and only with DATAGRAM sockets * :MORE for telling the kernel that there is more data to send - only available on Linux Returns the number of bytes sent.

SHUTDOWN (SOCKET &KEY READ WRITE)

Shut down all or part of a connection. If READ it non-NIL, further receptions are disallowed; if WRITE is non-NIL, further transmissions are disallowed. CLOSE must still be called on SOCKET in order to release OS resources.

SOCKET-CONNECTED-P (SOCKET)

Returns a boolean specifying whether or not SOCKET is connected.

SOCKET-OPEN-P (SOCKET)

Returns a boolean indicating whether or not the file descriptor of SOCKET is open.

SOCKET-OPTION (SOCKET OPTION-NAME)

Returns the value(s) of OS option OPTION-NAME on SOCKET. For a complete list of supported options see src/sockets/socket-options.lisp.

SOCKET-OS-FD (SOCKET)

Returns the OS file descriptor of SOCKET.

SOCKET-TYPE (SOCKET)

Returns the socket type of SOCKET - :STREAM or :DATAGRAM.

UNKNOWN-INTERFACE-DATUM (CONDITION)

Return the datum that caused the signalling of an UNKNOWN-INTERFACE condition.

UNKNOWN-PROTOCOL-DATUM (CONDITION)

Return the datum that caused the signalling of an UNKNOWN-PROTOCOL condition.

UNKNOWN-SERVICE-DATUM (CONDITION)

Return the datum that caused the signalling of an UNKNOWN-SERVICE condition.

Undocumented

ERROR-CODE (ERR)

ERROR-IDENTIFIER (ERR)

ERROR-MESSAGE (ERR)

Private

Undocumented

%DECODE-RESPONSE (DNS-MESSAGE QUESTION-TYPE)

%DECODE-RR (RR TYPE CLASS)

ADD-ADDITIONAL-RR (MESSAGE RECORD)

ADD-ANSWER-RR (MESSAGE RECORD)

ADD-AUTHORITY-RR (MESSAGE RECORD)

ADD-QUESTION (MESSAGE QUESTION)

AUTHORITATIVE-FIELD (MESSAGE)

SETFAUTHORITATIVE-FIELD (VALUE MESSAGE)

BUFFER-OF (CONDITION)

DECODE-FLAGS (MESSAGE)

DNS-DOMAIN-NAME-TO-STRING (BUFFER)

DNS-FLAG-P (MESSAGE FLAG)

INDEX-OF (CONDITION)

OCTETS-REMAINING-OF (CONDITION)

OCTETS-REQUESTED-OF (CONDITION)

OPCODE-FIELD (MESSAGE)

SETFOPCODE-FIELD (VALUE MESSAGE)

RCODE-FIELD (MESSAGE)

SETFRCODE-FIELD (VALUE MESSAGE)

READ-DNS-MESSAGE (BUFFER)

READ-DNS-RR (BUFFER)

READ-DNS-STRING (BUFFER)

READ-DOMAIN-NAME (BUFFER)

READ-MESSAGE-HEADER (BUFFER)

READ-QUESTION (BUFFER)

READ-RR-DATA (BUFFER TYPE CLASS LENGTH)

RECURSION-AVAILABLE-FIELD (MESSAGE)

SETFRECURSION-AVAILABLE-FIELD (VALUE MESSAGE)

RECURSION-DESIRED-FIELD (MESSAGE)

SETFRECURSION-DESIRED-FIELD (VALUE MESSAGE)

RESPONSE-FIELD (MESSAGE)

SETFRESPONSE-FIELD (VALUE MESSAGE)

SIZE-OF (BUFFER)

TRUNCATED-FIELD (MESSAGE)

SETFTRUNCATED-FIELD (VALUE MESSAGE)

UPDATE-MONITOR (MONITOR)

WRITE-DNS-MESSAGE (MESSAGE)

WRITE-DNS-STRING (BUFFER STRING)

WRITE-DOMAIN-NAME (BUFFER NAME)

WRITE-MESSAGE-HEADER (BUFFER MESSAGE)

WRITE-RECORD (BUFFER RECORD)

SLOT-ACCESSOR

Public

Undocumented

ABSTRACT-ADDRESS-P (OBJECT)

ADDRESS-NAME (OBJECT)

SOCKET-ADDRESS-FAMILY (OBJECT)

SETFSOCKET-ADDRESS-FAMILY (NEW-VALUE OBJECT)

SOCKET-PROTOCOL (OBJECT)

SETFSOCKET-PROTOCOL (NEW-VALUE OBJECT)

Private

HOST-ADDRESSES (OBJECT)

A list of addresses.

SETFHOST-ADDRESSES (NEW-VALUE OBJECT)

A list of addresses.

HOST-ALIASES (OBJECT)

A list of aliases.

SETFHOST-ALIASES (NEW-VALUE OBJECT)

A list of aliases.

HOST-TRUENAME (OBJECT)

The name of the host.

SETFHOST-TRUENAME (NEW-VALUE OBJECT)

The name of the host.

PROTOCOL-ALIASES (OBJECT)

A list of aliases for this protocol.

PROTOCOL-NAME (OBJECT)

The protocol's primary name.

PROTOCOL-NUMBER (OBJECT)

The protocol number.

SERVICE-NAME (OBJECT)

The service name.

SERVICE-PORT (OBJECT)

The service's default port.

SERVICE-PROTOCOL (OBJECT)

The service's protocol, :TCP or :UDP.

Undocumented

ACTIVE-CLASS (OBJECT)

ADDRESS-OF (OBJECT)

SETFADDRESS-OF (NEW-VALUE OBJECT)

CIDR-OF (OBJECT)

SETFCIDR-OF (NEW-VALUE OBJECT)

DNS-MESSAGE-ADDITIONAL (OBJECT)

SETFDNS-MESSAGE-ADDITIONAL (NEW-VALUE OBJECT)

DNS-MESSAGE-ADDITIONAL-COUNT (OBJECT)

SETFDNS-MESSAGE-ADDITIONAL-COUNT (NEW-VALUE OBJECT)

DNS-MESSAGE-ANSWER (OBJECT)

SETFDNS-MESSAGE-ANSWER (NEW-VALUE OBJECT)

DNS-MESSAGE-ANSWER-COUNT (OBJECT)

SETFDNS-MESSAGE-ANSWER-COUNT (NEW-VALUE OBJECT)

DNS-MESSAGE-AUTHORITY (OBJECT)

SETFDNS-MESSAGE-AUTHORITY (NEW-VALUE OBJECT)

DNS-MESSAGE-AUTHORITY-COUNT (OBJECT)

SETFDNS-MESSAGE-AUTHORITY-COUNT (NEW-VALUE OBJECT)

DNS-MESSAGE-DECODED-FLAGS (OBJECT)

SETFDNS-MESSAGE-DECODED-FLAGS (NEW-VALUE OBJECT)

DNS-MESSAGE-FLAGS (OBJECT)

SETFDNS-MESSAGE-FLAGS (NEW-VALUE OBJECT)

DNS-MESSAGE-ID (OBJECT)

SETFDNS-MESSAGE-ID (NEW-VALUE OBJECT)

DNS-MESSAGE-QUESTION (OBJECT)

SETFDNS-MESSAGE-QUESTION (NEW-VALUE OBJECT)

DNS-MESSAGE-QUESTION-COUNT (OBJECT)

SETFDNS-MESSAGE-QUESTION-COUNT (NEW-VALUE OBJECT)

DNS-RECORD-CLASS (OBJECT)

SETFDNS-RECORD-CLASS (NEW-VALUE OBJECT)

DNS-RECORD-NAME (OBJECT)

SETFDNS-RECORD-NAME (NEW-VALUE OBJECT)

DNS-RECORD-TYPE (OBJECT)

SETFDNS-RECORD-TYPE (NEW-VALUE OBJECT)

DNS-RR-DATA (OBJECT)

SETFDNS-RR-DATA (NEW-VALUE OBJECT)

DNS-RR-TTL (OBJECT)

SETFDNS-RR-TTL (NEW-VALUE OBJECT)

FILE-OF (OBJECT)

SETFFILE-OF (NEW-VALUE OBJECT)

LOCK-OF (OBJECT)

SETFLOCK-OF (NEW-VALUE OBJECT)

NETMASK-OF (OBJECT)

SETFNETMASK-OF (NEW-VALUE OBJECT)

READ-CURSOR-OF (OBJECT)

SETFREAD-CURSOR-OF (NEW-VALUE OBJECT)

SEQUENCE-OF (OBJECT)

SETFSEQUENCE-OF (NEW-VALUE OBJECT)

SOCKET-BOUND-P (OBJECT)

SOCKET-LISTENING-P (OBJECT)

TIMESTAMP-OF (OBJECT)

SETFTIMESTAMP-OF (NEW-VALUE OBJECT)

UPDATE-FN-OF (OBJECT)

SETFUPDATE-FN-OF (NEW-VALUE OBJECT)

WRITE-CURSOR-OF (OBJECT)

SETFWRITE-CURSOR-OF (NEW-VALUE OBJECT)

VARIABLE

Public

*DEFAULT-BACKLOG-SIZE*

Default length of the pending connections queue (soft limit).

*DEFAULT-LINGER-SECONDS*

Default linger timeout when enabling SO_LINGER option on a socket.

*DNS-DOMAIN*

The current machine's domain.

*DNS-NAMESERVERS*

List of the DNS nameservers to use.

*DNS-SEARCH-DOMAIN*

A domain name to be appended to the name to be searched when the latter does not contain dots.

*IPV6*

Specifies the default behaviour with respect to IPv6: - nil : Only IPv4 addresses are used. - :ipv6 : Only IPv6 addresses are used. - t : If both IPv4 and IPv6 addresses are found they are returned in the best order possible (see RFC 3484). Default value is NIL.

Private

*DNS-RECURSION-DESIRED*

Whether the "RECURSION-DESIRED" field should be set ot not.

*DNS-REPEAT*

The number of times a failed query will be retried.

*DNS-TIMEOUT*

Timeout for DNS queries in seconds.

Undocumented

*HOSTS-CACHE*

*HOSTS-CACHE-LOCK*

*HOSTS-FILE*

*HOSTS-MONITOR*

*PROTOCOL-CACHE-BY-NAME*

*PROTOCOL-CACHE-BY-NUMBER*

*PROTOCOL-CACHE-LOCK*

*PROTOCOLS-FILE*

*PROTOCOLS-MONITOR*

*RECVFROM-FLAGS*

*RESOLV.CONF-FILE*

*RESOLV.CONF-MONITOR*

*RESOLVCONF-LOCK*

*SENDTO-FLAGS*

*SERVICE-CACHE-LOCK*

*SERVICES-FILE*

*SERVICES-MONITOR*

*SET-SOCKET-OPTIONS*

*SOCKET-ERROR-MAP*

*SOCKET-OPTION-TYPES*

*SOCKET-TYPE-MAP*

*TCP-SERVICE-CACHE-BY-NAME*

*TCP-SERVICE-CACHE-BY-NUMBER*

*UDP-SERVICE-CACHE-BY-NAME*

*UDP-SERVICE-CACHE-BY-NUMBER*

CLASS

Public

ACTIVE-SOCKET

Mixin class for active(client) sockets.

ADDRESS

Base class for all socket address classes.

DATAGRAM-SOCKET

Mixin for sockets of type SOCK_DGRAM.

INET-ADDRESS

Base class for IPv4 and IPv6 addresses.

INTERNET-SOCKET

Mixin for sockets of domain AF_INET or AF_INET6.

IPV4-ADDRESS

IPv4 address. Its low-level representation can be accessed as vector of type IPV4-ARRAY through the ADDRESS-NAME reader.

IPV4-NETWORK

IPv4 network: an address plus a netmask.

IPV6-ADDRESS

IPv6 address. Its low-level representation can be accessed as vector of type IPV6-ARRAY through the ADDRESS-NAME reader.

LOCAL-ADDRESS

UNIX socket address.

LOCAL-SOCKET

Mixin for sockets of domain AF_LOCAL.

PASSIVE-SOCKET

Mixin class for PASSIVE(server) sockets.

SOCKET

Base class for sockets.

SOCKET-DATAGRAM-INTERNET-ACTIVE

Class representing active sockets of type SOCK_DGRAM and domain AF_INET or AF_INET6.

SOCKET-DATAGRAM-LOCAL-ACTIVE

Class representing active sockets of type SOCK_DGRAM and domain AF_LOCAL.

SOCKET-STREAM-INTERNET-ACTIVE

Class representing active sockets of type SOCK_STREAM and domain AF_INET or AF_INET6.

SOCKET-STREAM-INTERNET-PASSIVE

Class representing passive sockets of type SOCK_STREAM and domain AF_INET or AF_INET6.

SOCKET-STREAM-LOCAL-ACTIVE

Class representing active sockets of type SOCK_STREAM and domain AF_LOCAL.

SOCKET-STREAM-LOCAL-PASSIVE

Class representing passive sockets of type SOCK_STREAM and domain AF_LOCAL.

STREAM-SOCKET

Mixin for sockets of type SOCK_STREAM.

Private

HOST

Class representing a host: name, aliases and addresses.

PROTOCOL

Class representing a protocol.

SERVICE

Class representing a service.

Undocumented

CMSGHDR-TCLASS

DNS-MESSAGE

DNS-QUESTION

DNS-RECORD

DNS-RR

DYNAMIC-BUFFER

FILE-MONITOR

IF-NAMEINDEX-TCLASS

IFREQ-TCLASS

IN-ADDR-STRUCT-TCLASS

LINGER-TCLASS

MSGHDR-TCLASS

SOCKADDR-IN-TCLASS

SOCKADDR-IN6-TCLASS

SOCKADDR-STORAGE-TCLASS

SOCKADDR-TCLASS

SOCKADDR-UN-TCLASS

CONDITION

Public

RESOLVER-AGAIN-ERROR

Condition signaled when a temporary failure occurred.

RESOLVER-ERROR

Signaled when an error occurs while trying to resolve an address.

RESOLVER-FAIL-ERROR

Condition signaled when a non-recoverable error occurred.

RESOLVER-NO-NAME-ERROR

Condition signaled when a host or service was not found.

RESOLVER-UNKNOWN-ERROR

Condition signaled when an unknown error is signaled while resolving an address.

SOCKET-ADDRESS-IN-USE-ERROR

Address already in use

SOCKET-ADDRESS-NOT-AVAILABLE-ERROR

Cannot assign requested address

SOCKET-ALREADY-CONNECTED-ERROR

Transport endpoint is already connected

SOCKET-CONNECTION-ABORTED-ERROR

Software caused connection abort

SOCKET-CONNECTION-REFUSED-ERROR

Connection refused

SOCKET-CONNECTION-RESET-ERROR

Connection reset by peer

SOCKET-CONNECTION-TIMEOUT-ERROR

Connection timed out

SOCKET-ENDPOINT-SHUTDOWN-ERROR

Cannot send after transport endpoint shutdown

SOCKET-HOST-DOWN-ERROR

Host is down

SOCKET-HOST-UNREACHABLE-ERROR

No route to host

SOCKET-NETWORK-DOWN-ERROR

Network is down

SOCKET-NETWORK-RESET-ERROR

Network dropped connection on reset

SOCKET-NETWORK-UNREACHABLE-ERROR

Network is unreachable

SOCKET-NO-BUFFER-SPACE-ERROR

No buffer space available

SOCKET-NO-NETWORK-ERROR

Machine is not on the network

SOCKET-NOT-CONNECTED-ERROR

Transport endpoint is not connected

SOCKET-OPERATION-NOT-SUPPORTED-ERROR

Operation not supported

SOCKET-OPTION-NOT-SUPPORTED-ERROR

Protocol not available

UNKNOWN-INTERFACE

Condition raised when a network interface is not found.

UNKNOWN-PROTOCOL

Condition raised when a network protocol is not found.

UNKNOWN-SERVICE

Condition raised when a network service is not found.

Undocumented

SOCKET-ERROR

Private

DNS-MESSAGE-ERROR

Signaled when a format error is encountered while parsing a DNS message

DYNAMIC-BUFFER-EOF

Signals that an INPUT-BUFFER contains less unread bytes than requested.

DYNAMIC-BUFFER-INDEX-OUT-OF-BOUNDS

Signals that SEEK-READ-CURSOR on an INPUT-BUFFER was passed an invalid index.

SOCKET-CONNECTION-IN-PROGRESS-ERROR

Operation now in progress

UNKNOWN-SOCKET-ERROR

Error signalled upon finding an unknown socket error.

Undocumented

DYNAMIC-BUFFER-INPUT-ERROR

CONSTANT

Public

+IPV4-LOOPBACK+

Loopback IPv4 address. (127.0.0.1)

+IPV4-UNSPECIFIED+

Unspecified IPv4 address. (0.0.0.0)

+IPV6-INTERFACE-LOCAL-ALL-NODES+

Interface local all nodes address. (ff01::1)

+IPV6-INTERFACE-LOCAL-ALL-ROUTERS+

Interface local all routers address. (ff01::2)

+IPV6-LOOPBACK+

Loopback IPv6 address. (::1)

+IPV6-SITE-LOCAL-ALL-ROUTERS+

Site local all routers address. (ff05::2)

+IPV6-UNSPECIFIED+

Unspecified IPv6 address. (::)

+MAX-IPV4-VALUE+

Integer denoting 255.255.255.255

Private

+MAX-BACKLOG-SIZE+

Maximum length of the pending connections queue (hard limit).

AF-INET

IPv4 Protocol family

AF-INET6

IPv6 Protocol family

AF-LOCAL

File domain sockets

AF-PACKET

Raw packet access

AF-ROUTE

Routing sockets

SOCK-DGRAM

UDP

SOCK-RAW

Raw protocol access

SOCK-RDM

Reliable Unordered Datagram Protocol

SOCK-SEQPACKET

Reliable Sequenced Datagram Protocol

SOCK-STREAM

TCP

SOL-IP

get/setsockopt IP level constant.

SOL-RAW

get/setsockopt raw level constant.

SOL-SOCKET

get/setsockopt socket level constant.

SOL-TCP

get/setsockopt TCP level constant.

SOMAXCONN

Maximum listen() queue length

Undocumented

+DNS-MAX-DATAGRAM-SIZE+

+DNS-PORT+

+MAX-16-BITS+

+OPCODE-STANDARD+

+QUERY-CLASS-MAP+

+QUERY-TYPE-MAP+

+RCODE-MAP+

AF-KEY

AF-UNSPEC

IFNAMESIZE

IFNAMSIZ

INET-ADDRSTRLEN

INET6-ADDRSTRLEN

IPPROTO-ICMP

IPPROTO-ICMPV6

IPPROTO-IP

IPPROTO-IPV6

IPPROTO-RAW

IPPROTO-SCTP

IPPROTO-TCP

IPPROTO-UDP

IPV6-JOIN-GROUP

IPV6-LEAVE-GROUP

IPV6-MULTICAST-HOPS

IPV6-MULTICAST-IF

IPV6-MULTICAST-LOOP

IPV6-UNICAST-HOPS

IPV6-V6ONLY

MSG-CONFIRM

MSG-CTRUNC

MSG-DONTROUTE

MSG-DONTWAIT

MSG-EOR

MSG-ERRQUEUE

MSG-FIN

MSG-MORE

MSG-NOSIGNAL

MSG-OOB

MSG-PEEK

MSG-PROXY

MSG-SYN

MSG-TRUNC

MSG-WAITALL

SCM-RIGHTS

SHUT-RD

SHUT-RDWR

SHUT-WR

SIZE-OF-CMSGHDR

SIZE-OF-IF-NAMEINDEX

SIZE-OF-IFREQ

SIZE-OF-IN-ADDR-STRUCT

SIZE-OF-IN-ADDR-T

SIZE-OF-IN-PORT-T

SIZE-OF-INT

SIZE-OF-LINGER

SIZE-OF-MSGHDR

SIZE-OF-SA-FAMILY-T

SIZE-OF-SOCKADDR

SIZE-OF-SOCKADDR-IN

SIZE-OF-SOCKADDR-IN6

SIZE-OF-SOCKADDR-STORAGE

SIZE-OF-SOCKADDR-UN

SIZE-OF-SOCKLEN-T

SIZE-OF-TIMEVAL

SO-ACCEPTCONN

SO-BINDTODEVICE

SO-BROADCAST

SO-DEBUG

SO-DONTROUTE

SO-ERROR

SO-KEEPALIVE

SO-LINGER

SO-OOBINLINE

SO-PASSCRED

SO-PEERCRED

SO-PRIORITY

SO-RCVBUF

SO-RCVLOWAT

SO-RCVTIMEO

SO-REUSEADDR

SO-SNDBUF

SO-SNDLOWAT

SO-SNDTIMEO

SO-TIMESTAMP

SO-TYPE

TCP-CORK

TCP-DEFER-ACCEPT

TCP-INFO

TCP-KEEPCNT

TCP-KEEPIDLE

TCP-KEEPINTVL

TCP-LINGER2

TCP-MAXSEG

TCP-NODELAY

TCP-QUICKACK

TCP-SYNCNT

TCP-WINDOW

TCP-WINDOW-CLAMP

UNIX-PATH-MAX