Linux implements the Appletalk protocols described in Inside Appletalk.
Only the DDP layer and AARP are present in the kernel. They are 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.
The communication between Appletalk and the user program works using a
BSD-compatible socket interface. For more information on sockets, see
An AppleTalk socket is created by calling the socket(2) function with a
PF_APPLETALK socket family argument. Valid socket types are
SOCK_DGRAM to open a ddp socket or SOCK_RAW to open a
raw socket. protocol is the Appletalk protocol to be received or
sent. For SOCK_RAW you must specify ATPROTO_DDP.
Raw sockets may be only opened by a process with effective user id 0 or when the
process has the CAP_NET_RAW capability.
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. 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.” The value of
ATADDR_BCAST is a link local broadcast address.
The operation is only defined on a connected socket, but
the socket wasn't connected.
Invalid argument passed.
Datagram is bigger than the DDP MTU.
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 or CAP_NET_BIND_SERVICE.
Tried to bind to an address already in use.
ENOMEM and ENOBUFS
Not enough memory available.
ENOPROTOOPT and EOPNOTSUPP
Invalid socket option passed.
User doesn't have permission to set high priority, make a
configuration change, or send signals to the requested process or
A non-existent interface was requested or the requested
source address was not local.
Operation on a nonblocking socket would block.
The socket was unconfigured, or an unknown socket type was
connect(2) was called on an already connected
A connection operation on a non-blocking socket is already
A connection was closed during an accept(2).
The connection was unexpectedly closed or shut down by the
SIOCGSTAMP was called on a socket where no packet
No routing table entry matches the destination
Network device not available or not capable of sending
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.