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(AF_APPLETALK, SOCK_DGRAM, 0);
13       raw_socket = socket(AF_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
19       documents 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       AF_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 opened only by a process with effective user ID 0 or
33       when the process has the CAP_NET_RAW capability.
34
35   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               unsigned short s_net;
41               unsigned char  s_node;
42           };
43
44           struct sockaddr_atalk {
45               sa_family_t    sat_family;    /* address family */
46               unsigned 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
60   Socket options
61       No protocol-specific socket options are supported.
62
63   /proc interfaces
64       IP  supports  a  set  of  /proc  interfaces  to  configure  some global
65       AppleTalk parameters.  The parameters can be  accessed  by  reading  or
66       writing files in the directory /proc/sys/net/atalk/.
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
87       All ioctls described in socket(7) apply to DDP.
88

ERRORS

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

VERSIONS

151       AppleTalk is supported by Linux 2.0 or higher.   The  /proc  interfaces
152       exist since Linux 2.2.
153

NOTES

155       Be  very  careful with the SO_BROADCAST option; it is not privileged in
156       Linux.  It is easy to overload the network  with  careless  sending  to
157       broadcast addresses.
158
159   Compatibility
160       The  basic  AppleTalk  socket  interface is compatible with netatalk on
161       BSD-derived systems.  Many BSD systems fail to check SO_BROADCAST  when
162       sending broadcast frames; this can lead to compatibility problems.
163
164       The raw socket mode is unique to Linux and exists to support the alter‐
165       native CAP package and AppleTalk monitoring tools more easily.
166

BUGS

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

SEE ALSO

174       recvmsg(2), sendmsg(2), capabilities(7), socket(7)
175

COLOPHON

177       This  page  is  part of release 4.15 of the Linux man-pages project.  A
178       description of the project, information about reporting bugs,  and  the
179       latest     version     of     this    page,    can    be    found    at
180       https://www.kernel.org/doc/man-pages/.
181
182
183
184Linux                             2017-09-15                            DDP(7)
Impressum