ddp(7)
๐ ddp(7) โ the manual page ๐
okay so bestie, gather round, because today we're talking about ddp, and that's the Linux AppleTalk protocol implementation, section 7 of the manual (yes, ddp(7), you got it). if you've never touched AppleTalk in your life, don't worry, I got you, we're gonna get through this together. โจ
๐ธ NAME ๐ธ
ddp โ Linux AppleTalk protocol implementation ๐
๐ SYNOPSIS ๐
#include <sys/socket.h>
#include <netatalk/at.h>
ddp_socket = socket(AF_APPLETALK, SOCK_DGRAM, 0);
raw_socket = socket(AF_APPLETALK, SOCK_RAW, protocol);
literally just two ways to open a socket, two lines, we love a compact queen. ๐
๐ฆ DESCRIPTION ๐ฆ
Linux implements the AppleTalk protocols described in Inside AppleTalk. and here's the tea: only the DDP layer and AARP are actually present in the kernel. they're designed to be used via the netatalk protocol libraries. this page documents the interface for those who wish โ or need โ to use the DDP layer directly. main character energy, honestly. ๐
the communication between AppleTalk and your user program works using a BSD-compatible socket interface. for more on sockets in general, go read socket(7). ๐ซถ
an AppleTalk socket gets created by calling the socket(2) function with an AF_APPLETALK socket family argument. valid socket types are:
SOCK_DGRAMโ opens a ddp socketSOCK_RAWโ opens a raw socket
protocol is the AppleTalk protocol to be received or sent. and heads up: for SOCK_RAW you must specify ATPROTO_DDP. no cap.
raw sockets may be opened only by a process with effective user ID 0, or when the process has the CAP_NET_RAW capability. so like, know your permissions bestie. ๐ฅ
๐ Address format ๐
an AppleTalk socket address is defined as a combination of a network number, a node number, and a port number. the holy trinity, if you will. ๐
struct at_addr {
unsigned short s_net;
unsigned char s_node;
};
struct sockaddr_atalk {
sa_family_t sat_family; /* address family */
unsigned char sat_port; /* port */
struct at_addr sat_addr; /* net/node */
};
sat_family is always set to AF_APPLETALK. sat_port contains the port. the port numbers below 129 are known as reserved ports. only processes with the effective user ID 0 or the CAP_NET_BIND_SERVICE capability may bind(2) to these sockets โ so like, hands off unless you're built for it. ๐
sat_addr is the host address. the net member of struct at_addr contains the host network in network byte order. the value of AT_ANYNET is a wildcard and also implies "this network." the node member of struct at_addr contains the host node number. the value of AT_ANYNODE is a wildcard and also implies "this node." and the value of ATADDR_BCAST is a link local broadcast address. iconic little wildcard family. โจ
๐ง Socket options ๐ง
No protocol-specific socket options are supported.
that's it. that's the whole section. she's low maintenance. ๐
๐ /proc interfaces ๐
okay so IP supports a set of /proc interfaces to configure some global AppleTalk parameters. the parameters can be accessed by reading or writing files in the directory /proc/sys/net/atalk/. (yes, the page literally says IP there, we're just rolling with it bestie, I don't make the rules ๐)
aarp-expiry-timeโ the time interval (in seconds) before an AARP cache entry expires.aarp-resolve-timeโ the time interval (in seconds) before an AARP cache entry is resolved.aarp-retransmit-limitโ the number of retransmissions of an AARP query before the node is declared dead. ๐aarp-tick-timeโ the timer rate (in seconds) for the timer driving AARP.
the default values match the specification and should never need to be changed. so like, leave them alone, they're thriving. ๐
๐ Ioctls ๐
All ioctls described in socket(7) apply to DDP. every single one. periodt. โญ
๐ญ ERRORS ๐ญ
EACCESโ the user tried to execute an operation without the necessary permissions. these include sending to a broadcast address without having the broadcast flag set, and trying to bind to a reserved port without effective user ID 0 orCAP_NET_BIND_SERVICE.EADDRINUSEโ tried to bind to an address already in use.EADDRNOTAVAILโ a nonexistent interface was requested or the requested source address was not local.EAGAINโ operation on a nonblocking socket would block.EALREADYโ a connection operation on a nonblocking socket is already in progress.ECONNABORTEDโ a connection was closed during anaccept(2).EHOSTUNREACHโ no routing table entry matches the destination address.EINVALโ invalid argument passed.EISCONNโconnect(2)was called on an already connected socket.EMSGSIZEโ datagram is bigger than the DDP MTU.ENODEVโ network device not available or not capable of sending IP.ENOENTโSIOCGSTAMPwas called on a socket where no packet arrived.ENOMEM,ENOBUFSโ not enough memory available.ENOPKGโ a kernel subsystem was not configured.ENOPROTOOPT,EOPNOTSUPPโ invalid socket option passed.ENOTCONNโ the operation is defined only on a connected socket, but the socket wasn't connected. ๐ญEPERMโ user doesn't have permission to set high priority, make a configuration change, or send signals to the requested process or group.EPIPEโ the connection was unexpectedly closed or shut down by the other end.ESOCKTNOSUPPORTโ the socket was unconfigured, or an unknown socket type was requested.
๐ VERSIONS ๐
AppleTalk is supported by Linux 2.0 or higher. the /proc interfaces exist since Linux 2.2. glow-up timeline fr fr. โจ
๐ซถ NOTES ๐ซถ
be very careful with the SO_BROADCAST option โ it is not privileged in Linux. it is easy to overload the network with careless sending to broadcast addresses. like, genuinely, don't be reckless with this one bestie. ๐ฅ
๐ Compatibility ๐
the basic AppleTalk socket interface is compatible with netatalk on BSD-derived systems. many BSD systems fail to check SO_BROADCAST when sending broadcast frames; this can lead to compatibility problems. ๐
the raw socket mode is unique to Linux and exists to support the alternative CAP package and AppleTalk monitoring tools more easily. she's one of a kind. ๐
๐ BUGS ๐
- there are too many inconsistent error values. (ngl, it's giving chaos.)
- the ioctls used to configure routing tables, devices, AARP tables, and other devices are not yet described.
๐ SEE ALSO ๐
recvmsg(2), sendmsg(2), capabilities(7), socket(7)
and that's the whole page, bestie!! ๐ no gatekeeping here. this one came from Linux man-pages 6.20, dated 2026-02-08, for ddp(7) โ slay, go forth and socket responsibly ๐โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: Linux-man-pages-copyleft
- Copyright 1998, Alan Cox <A.Cox@swansea.ac.uk>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms