perform hostname to IP address mappings - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Connectivity : Web Features : Network Communication : Sockets Package : Sockets/Address

Sockets[Address] - perform hostname to IP address mappings

Calling Sequence





Maple string; contains a symbolic hostname or an IP address in base 256 notation



The procedure Address can be used to map symbolic, human-readable hostnames to numeric IP addresses written in "dotted quad" or "base 256" notation. In all cases, the argument who must be of type string.


Given a symbolic hostname, such as, Address returns its numeric IP address in base 256 notation in the form of a string. This is a sequence of four numbers, each between 0 and 255, and separated by dots that represents the internet address of the named host. The details of IP number structure and special case assignments are specified in RFC 1700 Assigned Numbers.


Conversely, given a numeric IP address in base 256 notation, such as, Address returns a symbolic, human-readable hostname in the form of a string. Since a given node on a network may have multiple hostnames, it is the "canonical" hostname that is returned. (Thus, Address is not quite an involution.)












Get the canonical hostname from any given hostname by applying Address to its own output.


See Also

Sockets, type/string



Information Sciences Institute, "RFC 1700 Assigned Numbers," ISI Home Page,; accessed 17 November 2005.

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam