# Networking reference

Address

The `Address` class is the Internet address manipulation class. The class can be used to perform the conversion between a host name and an IP address. The opposite is also possible. Finally, the class supports both IP version 4 and IP version 6 address formats.

address-p
Object
Address
String

The `Address` constructor create an IP address object by name. The name argument is a string of a host name or a valid IP address representation.

Address
String Boolean

The `Address` constructor create an IP address object by name and force the reverse lookup resolution depending on the boolean flag value. The first argument is a string of a host name or a valid IP address representation. The second argument is a boolean flag that indicates whether or not reverse lookup must occur during the construction.

==
Boolean
Address

The `==` operator returns true if the calling object is equal to the address argument.

!=
Boolean
Address

The `!=` operator returns true if the calling object is not equal to the address argument.

<
Boolean
Address

The `<` operator returns true if the calling address is less than the address object.

<=
Boolean
Address

The `<=` operator returns true if the calling address is less equal than the address object.

>
Boolean
Address

The `>` operator returns true if the calling address is greater than the address object.

>=
Boolean
Address

The `<=` operator returns true if the calling address is greater equal than the address object.

++
Address
Address

The `++` operator increments the calling address by one position.

resolve
String Boolean
none

The `resolve` method resolves an host name and eventually performs a reverse lookup. The first argument is a string of a host name or a valid IP address representation. The second argument is a boolean flag that indicates whether or not reverse lookup must occur during the resolution.

get-name
String
none

The `get-name` method returns the original name used during the object construction.

get-address
String
none

The `get-address` method returns a string representation of the IP address. The string representation follows the IP version 4 or IP version 6 preferred formats, depending on the internal representation.

get-vector
Vector
none

The `get-vector` method returns a vector representation of the IP address. The vector result follows the IP version 4 or IP version 6 preferred format, depending on the internal representation.

get-canonical-name
String
none

The `get-canonical-name` method returns a fully qualified name of the address. The resulting name is obtained by performing a reverse lookup. Note that the name can be different from the original name.

get-alias-size
Integer
none

The `get-alias-size` method returns the number of aliases for the address. The number of aliases includes as well the primary resolved name which is located at index 0.

get-alias-name
String
Integer

The `get-alias-name` method returns a fully qualified name of the address alias by index. The first argument is the alias index number which must be in the alias index range. The resulting name is obtained by performing a reverse lookup. Note that the name can be different from the original name. Using index 0 is equivalent to call `get-canonical-name`.

get-alias-address
String
Integer

The `get-alias-address` method returns a string representation of the IP address alias by index. The first argument is the alias index number which must be in the alias index range. The string representation follows the IP version 4 or IP version 6 preferred formats, depending on the internal representation. Using index 0 is equivalent to call `get-address`.

get-alias-vector
Vector
Integer

The `get-alias-vector` method returns a vector representation of the IP address alias by index. The first argument is the alias index number which must be in the alias index range. The vector result follows the IP version 4 or IP version 6 preferred format, depending on the internal representation. Using index 0 is equivalent to call `get-vector`.

get-loopback
String
none

The `get-loopback` function returns the name of the machine loopback. On a UNIX system, that name is localhost.

get-tcp-service
String
Integer

The `get-tcp-service` function returns the name of the tcp service given its port number. For example, the tcp service at port 13 is the daytime server.

get-udp-service
String
Integer

The `get-udp-service` function returns the name of the udp service given its port number. For example, the udp service at port 19 is the chargen server.