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 7 - Datagram Delivery Protocol (DDP) / About DDP


Obtaining Data From the Network

DDP supports a number of client protocols that are built on top of it, and DDP itself is a client protocol of the underlying data-link protocol. DDP has its own protocol handler that the link-access protocol calls when it receives a DDP packet. A protocol handler
is a process that receives packets for a specific protocol type much like a socket listener receives packets for a specific socket. A DDP packet or datagram is sent from its source socket through one or more AppleTalk networks to its destination network.

A datagram is sent across the network enclosed in a frame. The frame contains addi-
tional information that the link-access protocol requires, such as addressing information that identifies the node and the socket number for which the frame is meant. The frame addressing information is contained in the frame's header, which is followed by the datagram. The frame header also identifies the protocol type of the enclosed packet. In addition to a header, a frame also contains a trailer that follows the datagram. The frame trailer contains a frame check sequence number that the AppleTalk hardware generates and uses to detect transmission errors.

The link-access protocol in the destination network delivers the frame to the node containing the destination socket. When a frame addressed to a particular node arrives at that node, the node's CPU is interrupted and the .MPP driver's interrupt handler gets control to service the interrupt. As the frame's first 3 bytes are read into the first-in first-out (FIFO) buffer, the .MPP driver's interrupt handler moves these bytes into its own internal buffer.

If the frame is a data frame containing a packet intended for a higher-level protocol, the .MPP driver's interrupt handler passes control to the protocol handler for the protocol type specified in the frame's header. For example, when a frame whose header specifies the DDP protocol type is delivered to a node, the link-access protocol passes control to the .MPP driver. The .MPP driver then calls the DDP protocol handler. DDP, which is implemented by the .MPP driver, determines for which socket the packet is meant and calls the socket listener that is associated with the socket. The socket listener, in turn, actually reads in the packet.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996