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
Constants and Data Types


Basic Constants

You use the constants in this section to define the length of AppleTalk addresses and NBP name strings and to identify wildcards used in NBP names.

The constant kNBPEntityBufferSize specifies the maximum size of the NBP name buffer, currently defined to be 105 bytes. This permits an NBP name string whose name, type, and zone fields each contain the maximum 32 characters, plus 2 bytes for the separator characters (: and @) and 7 bytes for an optional pad byte and 6 escape characters, which are indicated by the backslash (\) followed by a colon (:), at sign (@), or another backslash. See "The NBP Address Structure" and "The Combined DDP-NBP Address Structure" for examples of its use.

enum {
   kNBPMaxNameLength       = 32,
   kNBPMaxTypeLength       = 32,
   kNBPMaxZoneLength       = 32,
   kNBPSlushLength         = 9,  /* Extra space for @,:,escape chars */
   kNBPMaxEntityLength     = (kNBPMaxNameLength + kNBPMaxTypeLength +
                           kNBPMaxZoneLength + 3),
   kNBPEntityBufferSize    = (kNBPMaxNameLength + kNBPMaxTypeLength +
                           kNBPMaxZoneLength + kNBPSlushLength),
   kNBPWildCard            = 0x3D,/* NBP name and type match anything '=' */
   kNBPImbeddedWildCard    = 0xC5,/* NBP name and type match some '\x89' */
   kNBPDefaultZone         = 0x2A,/* NBP default zone '*' */

   kZIPMaxZoneLength       = kNBPMaxZoneLength,

   kDDPAddressLength       = sizeof(DDPAddress),
   kNBPAddressLength       = kNBPEntityBufferSize,
   kAppleTalkAddressLength = kDDPAddressLength + kNBPEntityBufferSize
};

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998