Important: The information in this document is obsolete and should not be used for new development.
OTInetGetInterfaceInfo
Returns internet address information about internet interfaces on the local host.C INTERFACE
OSStatus OTInetGetInterfaceInfo (InetInterfaceInfo *info, SInt32 val);C++ INTERFACE
None. C++ clients use the C interface to this function.PARAMETERS
info- A pointer to an
InetInterfaceInfostructure. You must allocate this structure. The function fills in the structure for the internet interface indicated by thevalparameter.val- An index into the local host's array of configured IP interfaces. Specify 0 for information about the first interface. Specify
kDefaultInetInterfaceto get information about the primary interface.- function result
- A result code. See Appendix B for more information.
DISCUSSION
Because the architecture of Open Transport TCP/IP provides for multihoming, in principle a given host can receive packets simultaneously through more than one network interface. For each IP interface configured for the local host, theOTInetGetInterfaceInfofunction provides the internet address and subnet mask, a default router (that is, a router, if any exists, that can be used to route any packet to all destinations outside the locally connected subnet), and a domain name server, if any is known. The function also returns the version number of theOTInetGetInterfaceInfofunction and, if available, the broadcast address for each interface.SPECIAL CONSIDERATIONS
If Open Transport TCP/IP has not yet been loaded into memory, theOTInetGetInterfaceInfofunction returns no valid interfaces. Open Transport TCP/IP is not loaded until a TCP/IP application is running unless the user has deselected "load only when needed" in the TCP/IP control panel.The
OTInetGetInterfaceInfofunction always completes immediately.Open Transport does not currently support more than one IP interface.
SEE ALSO
TheOTBindfunction.