Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 29 - TCP/IP Services Reference / Functions
Address Utilities /


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 InetInterfaceInfo structure. You must allocate this structure. The function fills in the structure for the internet interface indicated by the val parameter.
val
An index into the local host's array of configured IP interfaces. Specify 0 for information about the first interface. Specify kDefaultInetInterface to 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, the OTInetGetInterfaceInfo function 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 the OTInetGetInterfaceInfo function and, if available, the broadcast address for each interface.

SPECIAL CONSIDERATIONS
If Open Transport TCP/IP has not yet been loaded into memory, the OTInetGetInterfaceInfo function 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 OTInetGetInterfaceInfo function always completes immediately.

Open Transport does not currently support more than one IP interface.

SEE ALSO
The OTBind function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998