Important: The information in this document is obsolete and should not be used for new development.
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 inC++ 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
TheOTSetNBPEntityFromAddress
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 returnsfalse
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 theOTSetNBPType
function; and to store the NBP zone, use theOTSetNBPZone
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 theOTExtractNBPType
function; and to extract the zone portion, use theOTExtractNBPZone
function.SEE ALSO
"The NBP Address Structure"."The Combined DDP-NBP Address Structure".