1.\" $NetBSD: atalk.4,v 1.13 2001/06/12 14:54:19 wiz 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 <sys/types.h> 38.Fd #include <netatalk/at.h> 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.Pp 65.Sh ADDRESSING 66AppleTalk addresses are three byte quantities, stored in network 67byte order. 68The include file 69.Aq Pa netatalk/at.h 70defines the AppleTalk address format. 71 72Sockets in the AppleTalk protocol family use the following address 73structure: 74.Bd -literal -offset indent 75struct sockaddr_at { 76 u_int8_t sat_len; 77 sa_family_t sat_family; 78 u_int8_t sat_port; 79 struct at_addr sat_addr; 80 union { 81 struct netrange r_netrange; 82 char r_zero[8]; 83 } sat_range; 84}; 85.Ed 86.Pp 87The port of a socket may be set with 88.Xr bind 2 . 89The node for 90.Xr bind 2 91must always be 92.Dv ATADDR_ANYNODE : 93``this node.'' The net 94.\"may 95must 96be 97.Dv ATADDR_ANYNET . 98.\"or 99.\".Dv ATADDR_LATENET . 100.Dv ATADDR_ANYNET 101corresponds to the machine's ``primary'' address (the first 102configured). 103.\".Dv ATADDR_LATENET 104.\"causes the address in outgoing packets to be determined when a packet 105.\"is sent, i.e. determined late. 106.\".Dv ATADDR_LATENET 107.\"is equivalent to opening one socket for each network interface. 108The port of a socket and 109.\"either 110the primary address 111.\"or 112.\".Dv ATADDR_LATENET 113are returned with 114.Xr getsockname 2 . 115.Sh PROTOCOLS 116The AppleTalk protocol family comprises the 117.Tn DDP 118datagram delivery protocol, 119AppleTalk Data Stream Protocol 120.Pq Tn ADSP , 121AppleTalk Echo Protocol 122.Pq Tn AEP , 123AppleTalk Filing Protocol 124.Pq Tn AFP , 125AppleTalk Session Protocol 126.Pq Tn ASP , 127AppleTalk Transaction Protocol 128.Pq Tn ATP , 129Name Binding Protocol 130.Pq Tn NBP , 131Printer Access Protocol 132.Pq Tn PAP , 133and Zone Information Protocol 134.Pq Tn ZIP . 135.Pp 136.Tn DDP 137is implemented in the kernel as 138.Dv SOCK_DGRAM 139sockets in the 140.Dv AF_APPLETALK 141address family. 142.Nx 143implements all other 144.Tn AppleTalk 145protocols using the 146.Tn Netatalk 147package. 148.Tn Netatalk 149implements all functions except for 150.Tn ADSP 151and an 152.Tn AFP 153client. 154.Tn AEP , 155.Tn NBP , 156and 157.Tn ZIP 158services are provided by the 159.Tn atalkd 160daemon. 161.Tn ASP 162and 163.Tn ATP 164services are provided by a user library. 165.Tn PAP 166and 167.Tn AFP 168services are provided by user programs and daemons. 169.Pp 170.Sh SEE ALSO 171.\" .BR ddp (4P), 172.\" .BR atp (3N), 173.\" .BR asp (3N), 174.Xr bind 2 , 175.Xr getsockname 2 , 176.Xr options 4 177.\" .Xr atalkd 8 178.Rs 179.%B Inside AppleTalk, second edition 180.%A Gursharan S. Sidhu 181.%A Richard F. Andrews 182.%A Alan B. Oppenheimer 183.Re 184