Important: The information in this document is obsolete and should not be used for new development.
About DDP
The protocol implementations at the physical and data-link layers of the AppleTalk protocol stack provide node-to-node delivery of data on the internet. DDP is a client
of the link-access protocol--whether LLAP, ELAP, TLAP, or FDDILAP--and it uses the node-to-node delivery services provided by the data link to send and receive data. DDP is responsible for delivering data from socket to socket over an AppleTalk internet.DDP is central to the process of sending and receiving data across an AppleTalk internet. Regardless of which data link is being used and which (if any) higher-level protocols are processing data, all AppleTalk data is carried in the form of DDP packets known as datagrams. (This chapter uses the terms datagram and DDP packet interchangeably.) A datagram consists of a header followed by data.
DDP lets you send and receive data a packet at a time. If you use DDP, you must address each data packet to the socket for which it is intended. A socket is a piece of software that serves as an addressable entity in a networked node. Sockets are numbered, and each application that uses DDP to transfer data is associated with a unique socket. You cannot open and maintain a session between two sockets using DDP, and for this reason, DDP is called a connectionless protocol.
To use DDP, you must provide a socket listener and a routine that reads packets from the socket listener code after it receives them. A socket listener is a process that receives packets addressed to the DDP socket associated with your application. Because the driver that implements DDP, the .MPP driver, uses registers not accessible from higher-
level languages such as Pascal to pass information to your socket listener, you must write the socket listener code in assembly language.DDP is said to provide a best-effort socket-to-socket delivery of datagrams over
the internet.
- Socket-to-socket delivery means that when the data link delivers a packet to a node,
the DDP implementation in that node determines the socket for which the packet
is intended and calls the socket listener for that socket.- Best-effort delivery means that DDP attempts to deliver any datagram that has a valid address to an open socket, as long as the length of the datagram received is the same as the length indicated by the header, the data is not longer than 586 bytes, and the datagram does not include an invalid checksum. DDP has no provision for requesting the sender to retransmit a lost or damaged datagram.
- Note
- You can send DDP packets to another socket in your own node if you have enabled the intranode delivery feature of AppleTalk. By default, intranode delivery is disabled; to turn it on, you use the
PSetSelfSend
function, which is described in the chapter "AppleTalk Utilities" in
this book.
Subtopics
- About Sockets and Socket Listeners
- Assigning Socket Numbers
- DDP Client Protocol Types
- Obtaining Data From the Network