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 24 - Mappers Reference / Constants and Data Types


The TLookupRequest Structure

You use the TLookupRequest structure to specify the entity name to be looked up by the OTLookupName function and to set additional values that the mapper provider uses to circumscribe the search.

The TLookupRequest structure is defined by the TLookupRequest 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 the name.buf field to point to it, and set the name.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 for addr.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 the addr.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 to 0xffff ffff; in this case, the timeout 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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998