p 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
q Tn ARA or .Tn PPP ). Currently, .Nx Ns 's AppleTalk implementation supports Ethernet.
p 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. .Sh ADDRESSING AppleTalk addresses are three byte quantities, stored in network byte order. The include file n netatalk/at.h defines the AppleTalk address format.
p Sockets in the AppleTalk protocol family use the following address structure: d -literal -offset indent 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; }; .Ed
p
The port of a socket may be set with
.Xr bind 2 .
The node for
.Xr bind 2
must always be
.Dv ATADDR_ANYNODE :
.Dq this node .
The net
may
must
be
.Dv ATADDR_ANYNET .
or
.Dv ATADDR_LATENET .
.Dv ATADDR_ANYNET
corresponds to the machine's
.Dq primary
address (the first configured).
.Dv ATADDR_LATENET
causes the address in outgoing packets to be determined when a packet
is sent, i.e. determined late.
.Dv ATADDR_LATENET
is equivalent to opening one socket for each network interface.
The port of a socket and
either
the primary address
or
.Dv ATADDR_LATENET
are returned with
.Xr getsockname 2 .
.Sh PROTOCOLS
The AppleTalk protocol family comprises the
.Tn DDP
datagram delivery protocol,
AppleTalk Data Stream Protocol
q Tn ADSP , AppleTalk Echo Protocol
q Tn AEP , AppleTalk Filing Protocol
q Tn AFP , AppleTalk Session Protocol
q Tn ASP , AppleTalk Transaction Protocol
q Tn ATP , Name Binding Protocol
q Tn NBP , Printer Access Protocol
q Tn PAP , and Zone Information Protocol
q Tn ZIP .
p
.Tn DDP
is implemented in the kernel as
.Dv SOCK_DGRAM
sockets in the
.Dv AF_APPLETALK
address family.
.Nx
implements all other
.Tn AppleTalk
protocols using the
.Tn Netatalk
package.
.Tn Netatalk
implements all functions except for
.Tn ADSP
and an
.Tn AFP
client.
.Tn AEP ,
.Tn NBP ,
and
.Tn ZIP
services are provided by the
.Tn atalkd
daemon.
.Tn ASP
and
.Tn ATP
services are provided by a user library.
.Tn PAP
and
.Tn AFP
services are provided by user programs and daemons.
.Sh SEE ALSO
.BR ddp (4P),
.BR atp (3N),
.BR asp (3N),
.Xr bind 2 ,
.Xr getsockname 2 ,
.Xr options 4
.Xr atalkd 8
.Rs
.%B Inside AppleTalk, second edition
.%A Gursharan S. Sidhu
.%A Richard F. Andrews
.%A Alan B. Oppenheimer
.Re