1.\" $NetBSD: atalk.4,v 1.15 2002/02/13 08:17:31 ross Exp $ 2.\" 3.\" This file is derived from the atalk.4 man page in the Netatalk 1.4b2 4.\" distribution. That distribution is covered by the following copyright: 5.\" 6.\" Copyright (c) 1990,1996 Regents of The University of Michigan. 7.\" All Rights Reserved. 8.\" 9.\" Permission to use, copy, modify, and distribute this software and 10.\" its documentation for any purpose and without fee is hereby granted, 11.\" provided that the above copyright notice appears in all copies and 12.\" that both that copyright notice and this permission notice appear 13.\" in supporting documentation, and that the name of The University 14.\" of Michigan not be used in advertising or publicity pertaining to 15.\" distribution of the software without specific, written prior 16.\" permission. This software is supplied as is without expressed or 17.\" implied warranties of any kind. 18.\" 19.\" This product includes software developed by the University of 20.\" California, Berkeley and its contributors. 21.\" 22.\" Research Systems Unix Group 23.\" The University of Michigan 24.\" c/o Wesley Craig 25.\" 535 W. William Street 26.\" Ann Arbor, Michigan 27.\" +1-313-764-2278 28.\" netatalk@umich.edu 29.\" 30.Dd November 14, 1997 31.Dt ATALK 4 32.Os 33.Sh NAME 34.Nm atalk 35.Nd AppleTalk Protocol Family 36.Sh SYNOPSIS 37.Fd #include \*[Lt]sys/types.h\*[Gt] 38.Fd #include \*[Lt]netatalk/at.h\*[Gt] 39.Sh DESCRIPTION 40The 41.Tn AppleTalk 42Protocol Family provides presentation layer support for the AppleTalk 43Datagram Delivery Protocol (DDP), using the SOCK_DGRAM socket type. 44In addition, access to in-kernel AppleTalk routing tables and network 45interface configurations is provided. 46.Pp 47The AppleTalk Protocol Suite provides support for five kinds of 48physical media: LocalTalk (230kbps wire-or'd serial), Ethernet, 49FDDI, Token Ring, and asynchronous serial connections (using either 50AppleTalk Remote Access 51.Pq Tn ARA 52or 53.Tn PPP 54). 55Currently, 56.Nx Ns 's 57AppleTalk implementation supports Ethernet, FDDI, and Token Ring. 58.Pp 59AppleTalk packets are encapsulated on the Ethernet using the EtherTalk 60Link Access Protocol (ELAP). 61Local network address resolution is 62handled using the AppleTalk Address Resolution Protocol (AARP). 63Neither of these protocols is exposed to user-mode applications. 64.Sh ADDRESSING 65AppleTalk addresses are three byte quantities, stored in network 66byte order. 67The include file 68.Aq Pa netatalk/at.h 69defines the AppleTalk address format. 70.Pp 71Sockets in the AppleTalk protocol family use the following address 72structure: 73.Bd -literal -offset indent 74struct sockaddr_at { 75 u_int8_t sat_len; 76 sa_family_t sat_family; 77 u_int8_t sat_port; 78 struct at_addr sat_addr; 79 union { 80 struct netrange r_netrange; 81 char r_zero[8]; 82 } sat_range; 83}; 84.Ed 85.Pp 86The port of a socket may be set with 87.Xr bind 2 . 88The node for 89.Xr bind 2 90must always be 91.Dv ATADDR_ANYNODE : 92``this node.'' The net 93.\"may 94must 95be 96.Dv ATADDR_ANYNET . 97.\"or 98.\".Dv ATADDR_LATENET . 99.Dv ATADDR_ANYNET 100corresponds to the machine's ``primary'' address (the first 101configured). 102.\".Dv ATADDR_LATENET 103.\"causes the address in outgoing packets to be determined when a packet 104.\"is sent, i.e. determined late. 105.\".Dv ATADDR_LATENET 106.\"is equivalent to opening one socket for each network interface. 107The port of a socket and 108.\"either 109the primary address 110.\"or 111.\".Dv ATADDR_LATENET 112are returned with 113.Xr getsockname 2 . 114.Sh PROTOCOLS 115The AppleTalk protocol family comprises the 116.Tn DDP 117datagram delivery protocol, 118AppleTalk Data Stream Protocol 119.Pq Tn ADSP , 120AppleTalk Echo Protocol 121.Pq Tn AEP , 122AppleTalk Filing Protocol 123.Pq Tn AFP , 124AppleTalk Session Protocol 125.Pq Tn ASP , 126AppleTalk Transaction Protocol 127.Pq Tn ATP , 128Name Binding Protocol 129.Pq Tn NBP , 130Printer Access Protocol 131.Pq Tn PAP , 132and Zone Information Protocol 133.Pq Tn ZIP . 134.Pp 135.Tn DDP 136is implemented in the kernel as 137.Dv SOCK_DGRAM 138sockets in the 139.Dv AF_APPLETALK 140address family. 141.Nx 142implements all other 143.Tn AppleTalk 144protocols using the 145.Tn Netatalk 146package. 147.Tn Netatalk 148implements all functions except for 149.Tn ADSP 150and an 151.Tn AFP 152client. 153.Tn AEP , 154.Tn NBP , 155and 156.Tn ZIP 157services are provided by the 158.Tn atalkd 159daemon. 160.Tn ASP 161and 162.Tn ATP 163services are provided by a user library. 164.Tn PAP 165and 166.Tn AFP 167services are provided by user programs and daemons. 168.Sh SEE ALSO 169.\" .BR ddp (4P), 170.\" .BR atp (3N), 171.\" .BR asp (3N), 172.Xr bind 2 , 173.Xr getsockname 2 , 174.Xr options 4 175.\" .Xr atalkd 8 176.Rs 177.%B Inside AppleTalk, second edition 178.%A Gursharan S. Sidhu 179.%A Richard F. Andrews 180.%A Alan B. Oppenheimer 181.Re 182