OTResolveAddress
Returns the protocol address that corresponds to the name of an endpoint.C INTERFACE
OSStatus OTResolveAddress(EndpointRef ref, TBind* req, TBind* ret);C++ INTERFACE
OSStatus TEndpoint::ResolveAddress(TBind* req, TBind* ret);PARAMETERS
ref- The endpoint reference of the endpoint whose address is sought.
req- A pointer to a
TBindstructure (page 3-51). Thereq->addr.buffield points to a buffer containing the name of the endpoint, which must be in an appropriate format for the protocol family. For example, for AppleTalk this must be an NBP address.ret- A pointer to a
TBindstructure (page 3-51). Theret->addr.buffield points to a buffer containing the lowest-level address that corresponds to the address pointed to by thereq->addr.buffield of thereqparameter.DESCRIPTION
TheOTResolveAddressfunction returns the lowest-level address for your endpoint. Not all endpoints support this function. A value ofCAN_RESOLVE_ADDRin theflagsfield of theTEndpointInfostructure indicates that the endpoint does support this function. Using this function saves you the trouble of opening and closing a mapper provider if the only reason you have for opening the mapper is to look up the address corresponding to a specific endpoint name. You would still have to open the mapper if you needed to look up a name pattern--that is, if the name included any wildcard characters.You are responsible for initializing the buffers described by the
reqandretparameters required to hold the addresses. To determine how large these buffers should be, examine theaddrfield of theTEndpointInfostructure, which specifies the maximum amount of memory needed to store an address for the endpoint specified by therefparameter.If a notifier is not installed, it is not possible to determine when the
OTResolveAddressfunction completes.COMPLETION EVENT CODES
T_RESOLVEADDRCOMPLETE0x20000009 The OTResolveAddressfunction has completed. Thecookieparameter of the notifier function contains theresultparameter.VALID STATES
All states are valid exceptT_UNINT.SEE ALSO
For additional information about the format used to describe the address passed in theretparameter, please consult the documentation provided for the protocol you are using as the lowest-level protocol.The TBind structure (page 3-51) describes the address to which an endpoint
is bound.The
flagsfield (page 3-45) of theTEndpointInfostructure (page 3-48) indicates whether the endpoint supports this function.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help