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 /


OTInitInetAddress

Fills in an InetAddress structure with the data you provide.

C INTERFACE
void OTInitInetAddress (InetAddress *addr,
                                         InetPort port,
                                         InetHost h
C++ INTERFACE
None. C++ clients use the C interface to this function.

PARAMETERS
addr
A pointer to an InetAddress structure that you allocate. The function fills in this structure.
port
The port number of the address.
host
The IP address of the host.
DISCUSSION
This function copies the host parameter to the fHost field of the InetAddress, and the port parameter to the fPort field.

This function also fills in the fAddressType field of the InetAddress structure with the value AF_INET. You use the InetAddress structure when providing a TCP or UDP address to the Open Transport functions OTConnect, OTSndURequest, and OTBind. You are not required to use the OTInitInetAddress function when creating an InetAddress structure; this function is provided for your convenience only.

SPECIAL CONSIDERATIONS
The OTInetInitInetAddress function cannot block and always runs synchronously. It does not use the services of the DNR.

SEE ALSO
The OTInetStringToHost function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998