1DDP(7)                     Linux Programmer's Manual                    DDP(7)
2
3
4

NAME

6       ddp - Linux AppleTalk protocol implementation
7

SYNOPSIS

9       #include <sys/socket.h>
10       #include <netatalk/at.h>
11
12       ddp_socket = socket(PF_APPLETALK, SOCK_DGRAM, 0);
13       raw_socket = socket(PF_APPLETALK, SOCK_RAW, protocol);
14

DESCRIPTION

16       Linux implements the Appletalk protocols described in Inside Appletalk.
17       Only the DDP layer and  AARP  are  present  in  the  kernel.  They  are
18       designed to be used via the netatalk protocol libraries. This page doc‐
19       uments the interface for those who wish or need to use  the  DDP  layer
20       directly.
21
22       The  communication between Appletalk and the user program works using a
23       BSD-compatible socket interface. For more information on  sockets,  see
24       socket(7).
25
26       An AppleTalk socket is created by calling the socket(2) function with a
27       PF_APPLETALK socket family argument. Valid socket types are  SOCK_DGRAM
28       to open a ddp socket or SOCK_RAW to open a raw socket.  protocol is the
29       Appletalk protocol to be received or sent. For SOCK_RAW you must  spec‐
30       ify ATPROTO_DDP.
31
32       Raw sockets may be only opened by a process with effective user ID 0 or
33       when the process has the CAP_NET_RAW capability.
34

ADDRESS FORMAT

36       An Appletalk socket address is defined as a combination  of  a  network
37       number, a node number, and a port number.
38
39              struct at_addr {
40                  u_short         s_net;
41                  u_char          s_node;
42              };
43
44              struct sockaddr_atalk {
45                  sa_family_t     sat_family; /* address family */
46                  u_char          sat_port;   /* port */
47                  struct at_addr  sat_addr;   /* net/node */
48              };
49
50       sat_family  is always set to AF_APPLETALK.  sat_port contains the port.
51       The port numbers below 129 are known as reserved ports.  Only processes
52       with the effective user ID 0 or the CAP_NET_BIND_SERVICE capability may
53       bind(2) to these sockets.  sat_addr is the host address.  The net  mem‐
54       ber  of struct at_addr contains the host network in network byte order.
55       The value of AT_ANYNET is a wildcard and also implies  “this  network.”
56       The  node  member of struct at_addr contains the host node number.  The
57       value of AT_ANYNODE is a wildcard and also  implies  “this  node.”  The
58       value of ATADDR_BCAST is a link local broadcast address.
59

SOCKET OPTIONS

61       No protocol-specific socket options are supported.
62

SYSCTLS

64       IP  supports  a  sysctl  interface  to  configure some global AppleTalk
65       parameters.  The sysctls can be accessed  by  reading  or  writing  the
66       /proc/sys/net/atalk/* files or with the sysctl(2) interface.
67
68       aarp-expiry-time
69              The  time  interval  (in  seconds)  before  an  AARP cache entry
70              expires.
71
72       aarp-resolve-time
73              The time interval (in seconds) before an  AARP  cache  entry  is
74              resolved.
75
76       aarp-retransmit-limit
77              The  number  of retransmissions of an AARP query before the node
78              is declared dead.
79
80       aarp-tick-time
81              The timer rate (in seconds) for the timer driving AARP.
82
83       The default values match the specification and should never need to  be
84       changed.
85
86

IOCTLS

88       All ioctls described in socket(7) apply to ddp.
89
90

NOTES

92       Be  very careful with the SO_BROADCAST option - it is not privileged in
93       Linux. It is easy to overload the  network  with  careless  sending  to
94       broadcast addresses.
95

VERSIONS

97       Appletalk  is supported by Linux 2.0 or higher. The sysctl interface is
98       new in Linux 2.2.
99

ERRORS

101       ENOTCONN
102              The operation is only defined on a  connected  socket,  but  the
103              socket wasn't connected.
104
105       EINVAL Invalid argument passed.
106
107       EMSGSIZE
108              Datagram is bigger than the DDP MTU.
109
110       EACCES The  user  tried  to  execute an operation without the necessary
111              permissions.  These include sending to a broadcast address with‐
112              out  having  the  broadcast  flag  set,  and trying to bind to a
113              reserved port without effective user ID 0  or  CAP_NET_BIND_SER‐
114              VICE.
115
116       EADDRINUSE
117              Tried to bind to an address already in use.
118
119       ENOMEM and ENOBUFS
120              Not enough memory available.
121
122       ENOPROTOOPT and EOPNOTSUPP
123              Invalid socket option passed.
124
125       EPERM  User  doesn't  have permission to set high priority, make a con‐
126              figuration change, or send signals to the requested  process  or
127              group,
128
129       EADDRNOTAVAIL
130              A  non-existent  interface was requested or the requested source
131              address was not local.
132
133       EAGAIN Operation on a nonblocking socket would block.
134
135       ESOCKTNOSUPPORT
136              The socket was unconfigured,  or  an  unknown  socket  type  was
137              requested.
138
139       EISCONN
140              connect(2) was called on an already connected socket.
141
142       EALREADY
143              A  connection  operation  on a non-blocking socket is already in
144              progress.
145
146       ECONNABORTED
147              A connection was closed during an accept(2).
148
149       EPIPE  The connection was unexpectedly closed or shut down by the other
150              end.
151
152       ENOENT SIOCGSTAMP was called on a socket where no packet arrived.
153
154       EHOSTUNREACH
155              No routing table entry matches the destination address.
156
157       ENODEV Network device not available or not capable of sending IP.
158
159       ENOPKG A kernel subsystem was not configured.
160

COMPATIBILITY

162       The  basic  AppleTalk  socket  interface is compatible with netatalk on
163       BSD-derived systems. Many BSD systems fail to check  SO_BROADCAST  when
164       sending broadcast frames; this can lead to compatibility problems.
165
166       The raw socket mode is unique to Linux and exists to support the alter‐
167       native CAP package and AppleTalk monitoring tools more easily.
168

BUGS

170       There are too many inconsistent error values.
171
172       The ioctls used to configure routing tables, devices, AARP  tables  and
173       other devices are not yet described.
174

SEE ALSO

176       recvmsg(2), sendmsg(2), capabilities(7), socket(7)
177
178
179
180Linux Man Page                    1999-05-01                            DDP(7)
Impressum