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 30 - AppleTalk Reference / AppleTalk Addressing Reference
AppleTalk Utility Functions /


OTSetNBPEntityFromAddress

Parses and stores an NBP address ("NBP Address" or "DDPNBPAddress") into an NBP entity.

C INTERFACE
Boolean OTSetNBPEntityFromAddress(NBPEntity* entity, 
                                         const UInt8* addrBuf, 
                                         size_t in
C++ INTERFACE
None. C++ applications use the C interface to this function.

PARAMETERS
nbpEntity
A pointer to the NBP entity in which you wish to store the address.
addrBuf
A pointer to the address buffer from which to get the NBP name string.
len
The number of characters in the address buffer
function result
A value of true means the function succeeded. See Discussion.
DISCUSSION
The OTSetNBPEntityFromAddress function parses the string part of an NBP address or a combined DDP-NBP address into the NBP name's constituent parts (name, type, and zone) and stores the result in an NBP entity. The function ignores the DDP address part of a combined DDP-NBP address. From the NBP entity, each of the constituent parts of the name can later be retrieved or changed.

This function returns true if it worked successfully; it returns false if it had to truncate any data--that is, if the address had data that was too long in one of the fields, each of which only holds 32 characters of data. When this occurs, the function still stores the data, but in a truncated form.

To copy the contents of an NBP entity into an NBP address structure, use the OTSetAddressFromNBPEntity function.

To determine the appropriate buffer size for an NBP entity, use the OTGetNBPEntityLengthAsAddress function.

To store the NBP name in an NBP entity, use the OTSetNBPName function ; to store the NBP type, use the OTSetNBPType function; and to store the NBP zone, use the OTSetNBPZone function.

To extract the name portion of an NBP name from an NBP entity, use the OTExtractNBPName function; to extract the type portion of an NBP name, use the OTExtractNBPType function; and to extract the zone portion, use the OTExtractNBPZone function.

SEE ALSO
"The NBP Address Structure".

"The Combined DDP-NBP Address Structure".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998