Important: The information in this document is obsolete and should not be used for new development.
The TLookupRequest Structure
You use theTLookupRequest
structure to specify the entity name to be looked up by theOTLookupName
function and to set additional values that the mapper provider uses to circumscribe the search.The
TLookupRequest
structure is defined by theTLookupRequest
data type.
struct TLookupRequest { TNetbuf name; TNetbuf addr; UInt32 maxcnt; OTTimeouttimeout; OTFlags flags; }; typedef struct TLookupRequest TLookupRequest;Field descriptions
name
- A
TNetbuf
structure specifying the location and size of a buffer that contains the name to be looked up. You must allocate a buffer that contains the name, set thename.buf
field to point to it, and set thename.len
field to the length of the name.
addr
- A
TNetbuf
structure describing the address of the node where you expect the names to be stored. You should normally supply 0 foraddr.len
. This causes the provider to use internal defaults for the starting point of the search. For a protocol family such as AppleTalk, in which every node has access to name and address information, this parameter is meaningless.
- Specifying an address has meaning for those protocols that use a dedicated server or other device to store name information. In such a case, the name specified would override the protocol's default address. To specify an address, you would need to allocate a buffer containing the address, set the
addr.buf
field to point to it, and set theaddr.len
field to the length of the address. Consult the documentation supplied with your protocol to determine whether you can or should specify an address.
maxcnt
- A long specifying the number of names you expect to be returned. Some protocols allow the use of wildcard characters in specifying a name. As a result, the
OTLookupName
function might find multiple names matching the specified name pattern. If you expect a specific number of replies for a particular name or do not expect to exceed a specific number, you should specify this number to obtain faster execution. Otherwise, set this field to0xffff ffff
; in this case, thetimeout
value will control the lookup.
timeout
- A long specifying the amount of time, in milliseconds, that should elapse before Open Transport gives up searching for a name. Specify 0 to leave the timeout value up to the underlying naming system.