Previous: Address Arithmetic, Up: Addresses


2.3.4 Low-level Address Manipulation

— Constant: sockets:+max-ipv4-value+

Integer denoting 255.255.255.255

— Function: sockets:dotted-to-integer address

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

— Function: sockets:integer-to-dotted integer

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

— Function: sockets:vector-to-integer vector

Convert a vector to a 32-bit unsigned integer.

— Function: sockets:integer-to-vector ipaddr

Convert a 32-bit unsigned integer to a vector.

— Function: sockets:dotted-to-vector address

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

— Function: sockets:vector-to-dotted vector

Convert an 4-element vector to a dotted string.

— Function: sockets:colon-separated-to-vector string

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

— Function: sockets:vector-to-colon-separated vector &optional case

Convert an (SIMPLE-ARRAY (UNSIGNED-BYTE 16) 8) to a colon-separated IPv6 address. case may be :downcase or :upcase.

— Function: sockets: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.

— Function: sockets:map-ipv4-address-to-ipv6 address

Returns an IPv6 address by mapping address onto it.

— Function: sockets: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.