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


The Combined DDP-NBP Address Structure

When you bind an endpoint you use the combined DDP-NBP address format, specified by the combined DDP-NBP address structure, to identify the socket address and the NBP name associated with your endpoint. The combined DDP-NBP address structure is defined by the DDPNBPAddress data type.

struct DDPNBPAddress
{
   OTAddressType  fAddressType;
   UInt16         fNetwork;
   UInt8          fNodeID;
   UInt8          fSocket;
   UInt8          fDDPType;
   UInt8          fPad;
   UInt8          fNBPNameBuffer[kNBPEntityBufferSize];
};
typedef struct DDPNBPAddress DDPNBPAddress;
FIELD DESCRIPTIONS
fAddressType
A number that specifies the format of the address. For a DDPNBPAddress, this is always the constant AF_ATALK_DDPNBP.
fNetwork
A 16-bit number in the range 0 to 65,534 that specifies the network number. The network number 65,535 (all bits set to 1) is reserved by Apple Computer, Inc. The network number 0 specifies the node's local network.
fNodeID
An 8-bit number in the range from 0 to 255 that specifies the node ID. A node ID of 255 is the broadcast address; a node ID of 0 specifies your own local node and is illegal other than at bind time. For other values, refer to Inside AppleTalk, second edition.
fSocket
An 8-bit number in the range of 1 through 254 that specifies a logical entity on your node. A socket number of 0 at bind time instructs Open Transport to dynamically assign a socket number. For other values, refer to Inside AppleTalk, second edition.
fDDPType
A number identifying the DDP type field. Unless you are using the DDP protocol directly, set this field to 0. For additional information see the chapter "Datagram Delivery Protocol (DDP)", and Inside AppleTalk, second edition.
fPad
Reserved. Set to 0.
fNBPNameBuffer
An array of chars that specifies the buffer that holds the NBP name string. The string specifies an endpoint name in the format name:type@zone and is not null terminated. You can precede colons (:), at signs (@), and backslash (\) characters with a backslash if you want to include them as part of the name.

The constant kNBPEntityBufferSize specifies the maximum size of the buffer, currently defined to be 105 bytes. This permits a 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 bytes and 6 escape characters, which are indicated by the backslash (\) followed by a colon (:), at sign (@), or another backslash.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998