NBPLookup
ATNBPRecHandle abRecord; handle to an ATNBPRec Boolean async; 0=await completion; 1=immediate return NBPLookup is part of the AppleTalk alternate interface. It is recommended NBPLookup returns the addresses of all entities with a specified name. abRecord is a handle to an ATNBPRec structure. The relevant fields are as follows:
¨ abResult short 2 2 Result code
Æ abUserReference long 4 4 For your use
Æ nbpEntityPtr Ptr 4 0 Pointer to entity name Æ nbpBufPtr Ptr 4 4 Pointer to buffer Æ nbpBufSize short 2 8 Buffersize in bytes
ÆnbpDataField short 2 10 Number of addresses received
async is a Boolean value. Use FALSE for normal ( synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
nbpBufOvr (-1024) Buffer overflow
Notes: NBPLookup returns the addresses of all entities with a specified name. NBPEntityPtr points to a variable of type EntityName containing the name of the entity whose address should be returned. (Meta- characters are
allowed in the entity name.) NBPBufPtr and nbpBufSize contain the location
and size of an area of memory in which the entity names and their
corresponding addresses should be returned. NBPDataField indicates the
maximum number of matching names to find addresses for; the actual
number of addresses found is returned in nbpDataField. NBPRetransmitInfo
contains the retry interval and the retry count.
When specifying nbpBufSize, for each NBP tuple expected, allow space for
the actual characters of the name, the address, and four bytes for use by
NBP.