NBPLookup
NBPLookup Find an entity's address
#include <AppleTalk.h> AppleTalk Manager
OSErr NBPLookup( abRecord, async);
ATNBPRecHandle abRecord; handle to an ATNBPRec
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
NBPLookup is part of the AppleTalk alternate interface. It is recommended
that you use the preferred call, PLookupName instead.
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:
Out-InName Type Size Offset Description
¨ abOpcode ABCallType 1 0 Always tNBPLookup
¨ 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
ÆnbpRetransmitInfo RetransType 2 16 Retransmission information
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.
Returns: an operating system Error Code. It will be one of:
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.