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 /
Chapter 3 - Name-Binding Protocol (NBP) / NBP Reference
Routines / Handling Name and Address Requests


NBPExtract

The NBPExtract function returns one tuple (entity name and internet address) from the list of tuples placed in a buffer by the PLookupName function.

FUNCTION NBPExtract (theBuffer: Ptr; numInBuf: Integer;
                     whichOne: Integer; 
                     VAR abEntity: EntityName; 
                     VAR address: AddrBlock): OSErr;
theBuffer
A pointer to the buffer containing the tuples returned by the PLookupName function.
numInBuf
The number of tuples returned by the PLookupName function in the numGotten parameter.
whichOne
The sequence number of the tuple that you want the function to return. This parameter can be any integer in the range 1 through numInBuf.
abEntity
A pointer to a buffer that you provide to hold the name returned by the function. This buffer must be at least 102 bytes long.
address
A pointer to a buffer that you provide to hold the address returned by the function. The buffer must be at least 4 bytes long.
DESCRIPTION
The NBPExtract function extracts a name and address pair from the list of tuples that the PLookupName function returns. The PLookupName function returns the names of network-visible entities in a packed format that you cannot read from Pascal. Use the NBPExtract function in a loop that varies the value of the whichOne parameter from 1 to the total number of tuples in the list to extract all the names in the list.

ASSEMBLY-LANGUAGE INFORMATION
The NBPExtract function is implemented entirely in the MPW interface files. There is no assembly-language equivalent to this procedure.

RESULT CODES
noErr0No error
extractErr-3104Can't find tuple in buffer
SEE ALSO
To look up the name and address of an entity registered with NBP, use the PLookupName function, described on page 3-28.

For a description of the EntityName data type, see "Entity Name Record" on page 3-20.

For a description of the AddrBlock data type, see "Address Block Record" on page 3-19.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996