.\" This man page is Copyright (C) 1998 Alan Cox.
+.\"
+.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
.\" Permission is granted to distribute possibly modified copies
.\" of this page provided the header is included verbatim,
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
+.\" %%%LICENSE_END
+.\"
.\" $Id: ddp.7,v 1.3 1999/05/13 11:33:22 freitag Exp $
-.TH DDP 7 1999-05-01 "Linux" "Linux Programmer's Manual"
+.\"
+.TH DDP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
.SH NAME
ddp \- Linux AppleTalk protocol implementation
.SH SYNOPSIS
.br
.B #include <netatalk/at.h>
.sp
-.IB ddp_socket " = socket(PF_APPLETALK, SOCK_DGRAM, 0);"
+.IB ddp_socket " = socket(AF_APPLETALK, SOCK_DGRAM, 0);"
.br
-.IB raw_socket " = socket(PF_APPLETALK, SOCK_RAW, " protocol ");"
+.IB raw_socket " = socket(AF_APPLETALK, SOCK_RAW, " protocol ");"
.SH DESCRIPTION
-Linux implements the Appletalk protocols described in
-.IR "Inside Appletalk" .
+Linux implements the AppleTalk protocols described in
+.IR "Inside AppleTalk" .
Only the DDP layer and AARP are present in
the kernel.
They are designed to be used via the
This page documents the interface for those who wish or need to
use the DDP layer directly.
.PP
-The communication between Appletalk and the user program works using a
+The communication between AppleTalk and the user program works using a
BSD-compatible socket interface.
For more information on sockets, see
.BR socket (7).
An AppleTalk socket is created by calling the
.BR socket (2)
function with a
-.B PF_APPLETALK
+.B AF_APPLETALK
socket family argument.
Valid socket types are
.B SOCK_DGRAM
.B raw
socket.
.I protocol
-is the Appletalk protocol to be received or sent.
+is the AppleTalk protocol to be received or sent.
For
.B SOCK_RAW
you must specify
.BR ATPROTO_DDP .
.PP
-Raw sockets may be only opened by a process with effective user ID 0
+Raw sockets may be opened only by a process with effective user ID 0
or when the process has the
.B CAP_NET_RAW
capability.
-.SS "Address Format"
-An Appletalk socket address is defined as a combination of a network number,
+.SS Address format
+An AppleTalk socket address is defined as a combination of a network number,
a node number, and a port number.
.PP
-.RS 4
+.in +4n
.nf
struct at_addr {
- u_short s_net;
- u_char s_node;
+ unsigned short s_net;
+ unsigned char s_node;
};
struct sockaddr_atalk {
sa_family_t sat_family; /* address family */
- u_char sat_port; /* port */
+ unsigned char sat_port; /* port */
struct at_addr sat_addr; /* net/node */
};
-.ta
.fi
-.RE
+.in
.PP
.I sat_family
is always set to
.I sat_port
contains the port.
The port numbers below 129 are known as
-.I reserved ports.
+.IR "reserved ports" .
Only processes with the effective user ID 0 or the
.B CAP_NET_BIND_SERVICE
capability may
.B ATADDR_BCAST
is a link
local broadcast address.
-.\" FIXME this doesn't make sense [johnl]
-.SS "Socket Options"
+.\" FIXME . this doesn't make sense [johnl]
+.SS Socket options
No protocol-specific socket options are supported.
-.SS Sysctls
-IP supports a sysctl interface to configure some global AppleTalk
-parameters.
-The sysctls can be accessed by reading or writing the
-.I /proc/sys/net/atalk/*
-files or with the
-.BR sysctl (2)
-interface.
-.TP
-.B aarp-expiry-time
+.SS /proc interfaces
+IP supports a set of
+.I /proc
+interfaces to configure some global AppleTalk parameters.
+The parameters can be accessed by reading or writing files in the directory
+.IR /proc/sys/net/atalk/ .
+.TP
+.I aarp-expiry-time
The time interval (in seconds) before an AARP cache entry expires.
.TP
-.B aarp-resolve-time
+.I aarp-resolve-time
The time interval (in seconds) before an AARP cache entry is resolved.
.TP
-.B aarp-retransmit-limit
+.I aarp-retransmit-limit
The number of retransmissions of an AARP query before the node is declared
dead.
.TP
-.B aarp-tick-time
+.I aarp-tick-time
The timer rate (in seconds) for the timer driving AARP.
.PP
The default values match the specification and should never need to be
.SS Ioctls
All ioctls described in
.BR socket (7)
-apply to ddp.
-.\" FIXME Add a section about multicasting
+apply to DDP.
+.\" FIXME . Add a section about multicasting
.SH ERRORS
-.\" FIXME document all errors. We should really fix the kernels to
-.\" give more uniform error returns (ENOMEM vs ENOBUFS, EPERM vs
-.\" EACCES etc.)
.TP
.B EACCES
The user tried to execute an operation without the necessary permissions.
Tried to bind to an address already in use.
.TP
.B EADDRNOTAVAIL
-A non-existent interface was requested or the requested source address was
+A nonexistent interface was requested or the requested source address was
not local.
.TP
.B EAGAIN
Operation on a nonblocking socket would block.
.TP
.B EALREADY
-A connection operation on a non-blocking socket is already in progress.
+A connection operation on a nonblocking socket is already in progress.
.TP
.B ECONNABORTED
A connection was closed during an
Invalid socket option passed.
.TP
.B ENOTCONN
-The operation is only defined on a connected socket, but the socket wasn't
+The operation is defined only on a connected socket, but the socket wasn't
connected.
.TP
.B EPERM
User doesn't have permission to set high priority,
make a configuration change,
-or send signals to the requested process or group,
+or send signals to the requested process or group.
.TP
.B EPIPE
The connection was unexpectedly closed or shut down by the other end.
.B ESOCKTNOSUPPORT
The socket was unconfigured, or an unknown socket type was requested.
.SH VERSIONS
-Appletalk is supported by Linux 2.0 or higher.
+AppleTalk is supported by Linux 2.0 or higher.
The
-.B sysctl
-interface is
-new in Linux 2.2.
+.I /proc
+interfaces exist since Linux 2.2.
.SH NOTES
Be very careful with the
.B SO_BROADCAST
-option \- it is not privileged in Linux.
+option; it is not privileged in Linux.
It is easy to overload the network
with careless sending to broadcast addresses.
.SS Compatibility
There are too many inconsistent error values.
.PP
The ioctls used to configure routing tables, devices,
-AARP tables and other devices are not yet described.
-.SH "SEE ALSO"
+AARP tables, and other devices are not yet described.
+.SH SEE ALSO
.BR recvmsg (2),
.BR sendmsg (2),
.BR capabilities (7),