| ATALK(4) | Device Drivers Manual | ATALK(4) | 
atalk —
#include <sys/types.h>
#include <netatalk/at.h>
The AppleTalk Protocol Suite provides support for five kinds of physical media: LocalTalk (230kbps wire-or'd serial), Ethernet, FDDI, Token Ring, and asynchronous serial connections (using either AppleTalk Remote Access (ARA) or PPP ). Currently, NetBSD's AppleTalk implementation supports Ethernet.
AppleTalk packets are encapsulated on the Ethernet using the EtherTalk Link Access Protocol (ELAP). Local network address resolution is handled using the AppleTalk Address Resolution Protocol (AARP). Neither of these protocols is exposed to user-mode applications.
<netatalk/at.h>
  defines the AppleTalk address format.
Sockets in the AppleTalk protocol family use the following address structure:
struct sockaddr_at {
	uint8_t	sat_len;
	sa_family_t	sat_family;
	uint8_t	sat_port;
	struct at_addr	sat_addr;
	union {
		struct netrange r_netrange;
		char		r_zero[8];
	} sat_range;
};
The port of a socket may be set with
    bind(2). The node for
    bind(2) must always be
    ATADDR_ANYNODE: “this node”. The net
    must be ATADDR_ANYNET.
    ATADDR_ANYNET corresponds to the machine's
    “primary” address (the first configured). The port of a socket
    and the primary address are returned with
    getsockname(2).
DDP is implemented in the kernel as
    SOCK_DGRAM sockets in the
    AF_APPLETALK address family.
    NetBSD implements all other AppleTalk protocols
    using the Netatalk package. Netatalk implements all functions except for
    ADSP and an AFP client. AEP, NBP, and ZIP services are provided by the
    atalkd daemon. ASP and ATP services are provided by a user library. PAP and
    AFP services are provided by user programs and daemons.
Gursharan S. Sidhu, Richard F. Andrews, and Alan B. Oppenheimer, Inside AppleTalk, second edition.
| February 26, 2021 | NetBSD 10.1 |