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 26 - Ports Reference / Constants and Data Types


Port-Related Constants

These constants provide length and size values for modules, provider names, and slot IDs. These fields all end with a byte for the terminating zero. The constant kMaxProviderNameSize permits a length of 36 bytes: 31 bytes for the name, up to 4 bytes of extra characters (called minor numbers in STREAMS specifications, and currently not used), and a byte for the zero that terminates the string.

enum {
   kMaxModuleNameLength    = 31,
   kMaxModuleNameSize      = kMaxModuleNameLength + 1,
   kMaxProviderNameLength  = kMaxModuleNameLength + 4,
   kMaxProviderNameSize    = kMaxProviderNameLength + 1,
   kMaxSlotIDLength        = 7,
   kMaxSlotIDSize          = 8,
   kMaxResourceInfoLength  = 31,
   kMaxResourceInfoSize    = 32
   kMaxPortNameLength      = kMaxModuleNameLength + 4,
   kMaxPortNameSize        = kMaxPortNameLength + 1,
};

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998