Next: , Previous: Address Classes, Up: Address Objects Functions

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

— Generic Function: sockets:copy-address address

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

— Function: sockets:ensure-address address &key family abstract errorp

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.

— Generic Function: sockets:address-to-string address

Returns a textual presentation of address.

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