(Make Network): Add IPv6 addresses and handling.

(Network Feature Testing): Mention (:family ipv6).
(Misc Network): Add IPv6 formats to format-network-address.
This commit is contained in:
Kim F. Storm 2006-01-04 00:20:08 +00:00
parent e1652a8612
commit b944a155cf

View file

@ -1782,8 +1782,10 @@ the system select an unused port number.
@item :family @var{family} @item :family @var{family}
@var{family} specifies the address (and protocol) family for @var{family} specifies the address (and protocol) family for
communication. @code{nil} stands for IPv4. @code{local} specifies a communication. @code{nil} stands for automatically determine a the
Unix socket, in which case @var{host} is ignored. proper address family for the given @var{host} and @var{service}.
@code{local} specifies a Unix socket, in which case @var{host} is ignored.
@code{ipv4} and @code{ipv6} specify to use IPv4 and IPv6 respectively.
@item :local @var{local-address} @item :local @var{local-address}
For a server process, @var{local-address} is the address to listen on. For a server process, @var{local-address} is the address to listen on.
@ -1803,9 +1805,18 @@ the address family:
@itemize - @itemize -
@item @item
An IPv4 address is represented as a vector of integers @code{[@var{a} An IPv4 address is represented as a five-element vector of four 8-bit
@var{b} @var{c} @var{d} @var{p}]} corresponding to numeric IP address integers and one 16-bit integer
@var{a}.@var{b}.@var{c}.@var{d} and port number @var{p}. @code{[@var{a} @var{b} @var{c} @var{d} @var{p}]} corresponding to
numeric IPv4 address @var{a}.@var{b}.@var{c}.@var{d} and port number
@var{p}.
@item
An IPv6 address is represented as a nine-element vector of 16-bit
integers @code{[@var{a} @var{b} @var{c} @var{d} @var{e} @var{f}
@var{g} @var{h} @var{p}]} corresponding to numeric IPv6 address
@var{a}:@var{b}:@var{c}:@var{d}:@var{e}:@var{f}:@var{g}:@var{h} and
port number @var{p}.
@item @item
A local address is represented as a string which specifies the address A local address is represented as a string which specifies the address
@ -1979,6 +1990,8 @@ Non-@code{nil} if non-blocking connect is supported.
Non-@code{nil} if datagrams are supported. Non-@code{nil} if datagrams are supported.
@item (:family local) @item (:family local)
Non-@code{nil} if local (aka ``UNIX domain'') sockets are supported. Non-@code{nil} if local (aka ``UNIX domain'') sockets are supported.
@item (:family ipv6)
Non-@code{nil} if IPv6 is supported.
@item (:service t) @item (:service t)
Non-@code{nil} if the system can select the port for a server. Non-@code{nil} if the system can select the port for a server.
@end table @end table
@ -2041,14 +2054,19 @@ The current flags of the interface.
@defun format-network-address address &optional omit-port @defun format-network-address address &optional omit-port
This function converts the Lisp representation of a network address to This function converts the Lisp representation of a network address to
a string. For example, a five-element vector @code{[@var{a} @var{b} a string.
@var{c} @var{d} @var{p}]} represents an IP address A five-element vector @code{[@var{a} @var{b}
@var{c} @var{d} @var{p}]} represents an IPv4 address
@var{a}.@var{b}.@var{c}.@var{d} and port number @var{p}. @var{a}.@var{b}.@var{c}.@var{d} and port number @var{p}.
@code{format-network-address} converts that to the string @code{format-network-address} converts that to the string
@code{"@var{a}.@var{b}.@var{c}.@var{d}:@var{p}"}. @code{"@var{a}.@var{b}.@var{c}.@var{d}:@var{p}"}.
A nine-element vector @code{[@var{a} @var{b} @var{c} @var{d} @var{e}
@var{f} @var{g} @var{h} @var{p}]} represents an IPv6 address and port
number. @code{format-network-address} converts that to the string
@code{"[@var{a}:@var{b}:@var{c}:@var{d}:@var{e}:@var{f}:@var{g}:@var{h}]:@var{p}"}.
If @var{omit-port} is non-@code{nil}, the value does not include If @var{omit-port} is non-@code{nil}, the value does not include
the port number. the port number, or the port number is ignored if it does.
@end defun @end defun
@node Byte Packing @node Byte Packing