AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YChart | YDAT | YWAIT | Byzgraf | FAQs
getInterfaceAddresses ([int version]) yoix.net
 
Returns a Dictionary that associates an Array of IP addresses (as Strings) with the name of each network interface on this machine, or NULL if no network interfaces were found. The optional version argument should be IPV4 or IPV6, which are defined in yoix.net, and is used to restrict the addresses returned in each array to Internet Protocol Version 4 or Internet Protocol Version 6. Omitting version means getInterfaceAddresses returns all addresses, but guarantees that the IPV4 addresses precede the IPV6 addresses.

Network interface names are short strings like, eth0 or lo, and every entry in the dictionary is guaranteed to be an array with at least one IP address.
 
 Example:   The program,
import yoix.*.*;

printf("%.2O\n", getInterfaceAddresses());
should dump the IP address information for all the network interfaces found on your machine.
 
 Return:   String
 
 See Also:   getAddress, getAllByName, getHostAddress, getHostName, getInterfaceAddress, isAnyLocalAddress, isLinkLocalAddress, isLoopbackAddress, isMCGlobal, isMCLinkLocal, isMCNodeLocal, isMCOrgLocal, isMCSiteLocal, isMulticastAddress, isReachable, isSiteLocalAddress

 

Yoix is a registered trademark of AT&T Inc.