Address - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Sockets

  

Address

  

perform hostname to IP address mappings

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

Address(who)

Parameters

who

-

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

Description

• 

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 www.maplesoft.com, 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 192.139·233.26, 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.)

Examples

withSockets:

Addresswww.maplesoft.com

10.102.2.2

(1)

Address127.0.0.1

localhost

(2)

Address10.10.10.169

rdsomantis.maplesoft.com

(3)

Addresslocalhost

127.0.0.1

(4)

Addressworld.std.com

192.74.137.5

(5)

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

AddressAddresswww.w3c.org

webredir.vip.gandi.net

(6)

References

  

Information Sciences Institute, "RFC 1700 Assigned Numbers," ISI Home Page, http://www.isi.edu/in-notes/rfc1700.txt; accessed 17 November 2005.

See Also

Sockets

type/string