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


NBPSetEntity

The NBPSetEntity procedure puts an existing NBP name of a network-visible
entity into the packed-record format that the PLookupName, PConfirmName, and PRemoveName functions require.

PROCEDURE NBPSetEntity (buffer: Ptr;
                        nbpObject,nbpType,nbpZone: Str32);
buffer
A pointer to a buffer that you provide that is at least 99 bytes long. The NBPSetEntity procedure fills this buffer with the entity name you specify in the other three parameters.
nbpObject
The object part of the registered NBP name. You can specify wildcard characters in this part of the name only for use with the PLookupName function.
nbpType
The type part of the registered NBP name. You can use wildcard characters in this part of the name only for use with the PLookupName function.
nbpZone
The zone part of the registered NBP name. You can use wildcard characters in this part of the name only for use with the PLookupName function.
Table 3-1 on page 3-12 describes the wildcard characters that you can specify for the nbpObject, nbpType, and nbpZone fields for use with the PLookupName function.

DESCRIPTION
When you call the PRemoveName function to remove the name of a network-visible entity from the NBP names table, or call the PLookupName or PConfirmName function to look up network-visible entities, you must specify an entity name in the format shown in Figure 3-5 on page 3-11. (For PRemoveName, instead of creating the entity-name record, you can provide a pointer to the names table entry record that you used to register the name.)

The object, type, and zone names that constitute the entity name in this format are packed data and of arbitrary length. Therefore, you cannot create this record in Pascal (which requires you to declare the length of character strings when you define the record). Use the NBPSetEntity procedure to provide the entity name in the format
that NBP requires.

SPECIAL CONSIDERATIONS
The memory that you allocate for the entity name buffer belongs to NBP until the function completes execution. You can reuse it or dispose of it after the operation completes.

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

SEE ALSO
The PLookupName function is described next.

For a discussion of how to use NBPSetEntity, see "Preparing an Entity Name" beginning on page 3-11.

To confirm that an entity is still registered with NBP, use the PConfirmName function, described on page 3-32.

To remove a registered name from the NBP names table, use the PRemoveName function, described on page 3-35.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996