2008-08-08 16:41:48 +00:00
|
|
|
.\" This man page is Copyright (C) 1998 Alan Cox.
|
|
|
|
.\" 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.
|
|
|
|
.\" $Id: ddp.7,v 1.3 1999/05/13 11:33:22 freitag Exp $
|
connect.2, listen.2, send.2, uname.2, cmsg.3, proc.5, arp.7, ddp.7, icmp.7, ip.7, raw.7, socket.7, tcp.7, udp.7: Global fix: eliminate mention of the obsolete sysctl(2) interface
Many pages still mention use of the obsolete sysctl(2) system
call, or used the term "sysctls"; rewrite these mentions to
instead be in terms of /proc interfaces.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-20 20:37:11 +00:00
|
|
|
.TH DDP 7 2008-11-20 "Linux" "Linux Programmer's Manual"
|
2008-08-08 16:41:48 +00:00
|
|
|
.SH NAME
|
|
|
|
ddp \- Linux AppleTalk protocol implementation
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <sys/socket.h>
|
|
|
|
.br
|
|
|
|
.B #include <netatalk/at.h>
|
|
|
|
.sp
|
2008-08-08 16:47:53 +00:00
|
|
|
.IB ddp_socket " = socket(AF_APPLETALK, SOCK_DGRAM, 0);"
|
2008-08-08 16:41:48 +00:00
|
|
|
.br
|
2008-08-08 16:47:53 +00:00
|
|
|
.IB raw_socket " = socket(AF_APPLETALK, SOCK_RAW, " protocol ");"
|
2008-08-08 16:41:48 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
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
|
|
|
|
.B netatalk
|
|
|
|
protocol
|
|
|
|
libraries.
|
|
|
|
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
|
|
|
|
BSD-compatible socket interface.
|
|
|
|
For more information on sockets, see
|
|
|
|
.BR socket (7).
|
|
|
|
.PP
|
|
|
|
An AppleTalk socket is created by calling the
|
|
|
|
.BR socket (2)
|
|
|
|
function with a
|
2008-08-08 16:47:53 +00:00
|
|
|
.B AF_APPLETALK
|
2008-08-08 16:41:48 +00:00
|
|
|
socket family argument.
|
|
|
|
Valid socket types are
|
|
|
|
.B SOCK_DGRAM
|
|
|
|
to open a
|
|
|
|
.B ddp
|
|
|
|
socket or
|
|
|
|
.B SOCK_RAW
|
|
|
|
to open a
|
|
|
|
.B raw
|
|
|
|
socket.
|
|
|
|
.I protocol
|
|
|
|
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
|
|
|
|
or when the process has the
|
|
|
|
.B CAP_NET_RAW
|
|
|
|
capability.
|
intro.1, time.1, _syscall.2, accept.2, brk.2, capget.2, faccessat.2, futimesat.2, gethostname.2, intro.2, ioprio_set.2, kill.2, madvise.2, mlock.2, mount.2, msgget.2, perf_event_open.2, poll.2, readv.2, sched_rr_get_interval.2, sched_setscheduler.2, select.2, select_tut.2, shmget.2, stat.2, timer_create.2, ustat.2, vfork.2, wait.2, alloca.3, atexit.3, catopen.3, crypt.3, dbopen.3, fenv.3, fopen.3, getaddrinfo_a.3, gethostbyname.3, getutent.3, intro.3, login.3, mallopt.3, queue.3, regex.3, sigpause.3, sigsetops.3, stdio.3, strftime.3, strptime.3, sysconf.3, ttyslot.3, undocumented.3, cciss.4, console_codes.4, hpsa.4, initrd.4, intro.4, rtc.4, st.4, tty_ioctl.4, wavelan.4, acct.5, charmap.5, dir_colors.5, hosts.5, intro.5, termcap.5, utmp.5, intro.6, armscii-8.7, boot.7, bootparam.7, capabilities.7, cpuset.7, credentials.7, ddp.7, epoll.7, glob.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man-pages.7, man.7, math_error.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, pthreads.7, raw.7, rtnetlink.7, signal.7, socket.7, spufs.7, svipc.7, tcp.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, intro.8: Global fix: use consistent capitalization in .SS headings
Capitalization in .SS sections across pages (and sometimes even
within a single page) is wildly inconsistent. Make it consistent.
Capitalize first word in heading, but otherwise use lower case,
except where English usage (e.g., proper nouns) or programming
language requirements (e.g., identifier names) dictate otherwise.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 14:08:38 +00:00
|
|
|
.SS "Address format"
|
2008-08-08 16:41:48 +00:00
|
|
|
An Appletalk socket address is defined as a combination of a network number,
|
|
|
|
a node number, and a port number.
|
|
|
|
.PP
|
|
|
|
.in +4n
|
|
|
|
.nf
|
|
|
|
struct at_addr {
|
|
|
|
unsigned short s_net;
|
|
|
|
unsigned char s_node;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct sockaddr_atalk {
|
|
|
|
sa_family_t sat_family; /* address family */
|
|
|
|
unsigned char sat_port; /* port */
|
|
|
|
struct at_addr sat_addr; /* net/node */
|
|
|
|
};
|
|
|
|
.fi
|
|
|
|
.in
|
|
|
|
.PP
|
|
|
|
.I sat_family
|
|
|
|
is always set to
|
|
|
|
.BR AF_APPLETALK .
|
|
|
|
.I sat_port
|
|
|
|
contains the port.
|
|
|
|
The port numbers below 129 are known as
|
2008-12-04 11:15:44 +00:00
|
|
|
.IR "reserved ports" .
|
2008-08-08 16:41:48 +00:00
|
|
|
Only processes with the effective user ID 0 or the
|
|
|
|
.B CAP_NET_BIND_SERVICE
|
|
|
|
capability may
|
|
|
|
.BR bind (2)
|
|
|
|
to these sockets.
|
|
|
|
.I sat_addr
|
|
|
|
is the host address.
|
|
|
|
The
|
|
|
|
.I net
|
|
|
|
member of
|
|
|
|
.I struct at_addr
|
|
|
|
contains the host network in network byte order.
|
|
|
|
The value of
|
|
|
|
.B AT_ANYNET
|
|
|
|
is a
|
|
|
|
wildcard and also implies \(lqthis network.\(rq
|
|
|
|
The
|
|
|
|
.I node
|
|
|
|
member of
|
|
|
|
.I struct at_addr
|
|
|
|
contains the host node number.
|
|
|
|
The value of
|
|
|
|
.B AT_ANYNODE
|
|
|
|
is a
|
|
|
|
wildcard and also implies \(lqthis node.\(rq The value of
|
|
|
|
.B ATADDR_BCAST
|
|
|
|
is a link
|
|
|
|
local broadcast address.
|
|
|
|
.\" FIXME this doesn't make sense [johnl]
|
intro.1, time.1, _syscall.2, accept.2, brk.2, capget.2, faccessat.2, futimesat.2, gethostname.2, intro.2, ioprio_set.2, kill.2, madvise.2, mlock.2, mount.2, msgget.2, perf_event_open.2, poll.2, readv.2, sched_rr_get_interval.2, sched_setscheduler.2, select.2, select_tut.2, shmget.2, stat.2, timer_create.2, ustat.2, vfork.2, wait.2, alloca.3, atexit.3, catopen.3, crypt.3, dbopen.3, fenv.3, fopen.3, getaddrinfo_a.3, gethostbyname.3, getutent.3, intro.3, login.3, mallopt.3, queue.3, regex.3, sigpause.3, sigsetops.3, stdio.3, strftime.3, strptime.3, sysconf.3, ttyslot.3, undocumented.3, cciss.4, console_codes.4, hpsa.4, initrd.4, intro.4, rtc.4, st.4, tty_ioctl.4, wavelan.4, acct.5, charmap.5, dir_colors.5, hosts.5, intro.5, termcap.5, utmp.5, intro.6, armscii-8.7, boot.7, bootparam.7, capabilities.7, cpuset.7, credentials.7, ddp.7, epoll.7, glob.7, intro.7, ip.7, ipv6.7, iso_8859-1.7, iso_8859-10.7, iso_8859-11.7, iso_8859-13.7, iso_8859-14.7, iso_8859-15.7, iso_8859-16.7, iso_8859-2.7, iso_8859-3.7, iso_8859-4.7, iso_8859-5.7, iso_8859-6.7, iso_8859-7.7, iso_8859-8.7, iso_8859-9.7, koi8-r.7, koi8-u.7, man-pages.7, man.7, math_error.7, netlink.7, numa.7, packet.7, path_resolution.7, pipe.7, pthreads.7, raw.7, rtnetlink.7, signal.7, socket.7, spufs.7, svipc.7, tcp.7, time.7, udp.7, udplite.7, unicode.7, unix.7, uri.7, utf-8.7, x25.7, intro.8: Global fix: use consistent capitalization in .SS headings
Capitalization in .SS sections across pages (and sometimes even
within a single page) is wildly inconsistent. Make it consistent.
Capitalize first word in heading, but otherwise use lower case,
except where English usage (e.g., proper nouns) or programming
language requirements (e.g., identifier names) dictate otherwise.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-02-24 14:08:38 +00:00
|
|
|
.SS "Socket options"
|
2008-08-08 16:41:48 +00:00
|
|
|
No protocol-specific socket options are supported.
|
connect.2, listen.2, send.2, uname.2, cmsg.3, proc.5, arp.7, ddp.7, icmp.7, ip.7, raw.7, socket.7, tcp.7, udp.7: Global fix: eliminate mention of the obsolete sysctl(2) interface
Many pages still mention use of the obsolete sysctl(2) system
call, or used the term "sysctls"; rewrite these mentions to
instead be in terms of /proc interfaces.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-20 20:37:11 +00:00
|
|
|
.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/ .
|
2008-08-08 16:41:48 +00:00
|
|
|
.TP
|
2008-11-20 19:09:35 +00:00
|
|
|
.I aarp-expiry-time
|
2008-08-08 16:41:48 +00:00
|
|
|
The time interval (in seconds) before an AARP cache entry expires.
|
|
|
|
.TP
|
2008-11-20 19:09:35 +00:00
|
|
|
.I aarp-resolve-time
|
2008-08-08 16:41:48 +00:00
|
|
|
The time interval (in seconds) before an AARP cache entry is resolved.
|
|
|
|
.TP
|
2008-11-20 19:09:35 +00:00
|
|
|
.I aarp-retransmit-limit
|
2008-08-08 16:41:48 +00:00
|
|
|
The number of retransmissions of an AARP query before the node is declared
|
|
|
|
dead.
|
|
|
|
.TP
|
2008-11-20 19:09:35 +00:00
|
|
|
.I aarp-tick-time
|
2008-08-08 16:41:48 +00:00
|
|
|
The timer rate (in seconds) for the timer driving AARP.
|
|
|
|
.PP
|
|
|
|
The default values match the specification and should never need to be
|
|
|
|
changed.
|
|
|
|
.SS Ioctls
|
|
|
|
All ioctls described in
|
|
|
|
.BR socket (7)
|
connect.2, listen.2, send.2, uname.2, cmsg.3, proc.5, arp.7, ddp.7, icmp.7, ip.7, raw.7, socket.7, tcp.7, udp.7: Global fix: eliminate mention of the obsolete sysctl(2) interface
Many pages still mention use of the obsolete sysctl(2) system
call, or used the term "sysctls"; rewrite these mentions to
instead be in terms of /proc interfaces.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-20 20:37:11 +00:00
|
|
|
apply to DDP.
|
2008-08-08 16:41:48 +00:00
|
|
|
.\" 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.
|
|
|
|
These include sending to a broadcast address without
|
|
|
|
having the broadcast flag set,
|
|
|
|
and trying to bind to a reserved port without effective user ID 0 or
|
|
|
|
.BR CAP_NET_BIND_SERVICE .
|
|
|
|
.TP
|
|
|
|
.B EADDRINUSE
|
|
|
|
Tried to bind to an address already in use.
|
|
|
|
.TP
|
|
|
|
.B EADDRNOTAVAIL
|
|
|
|
A nonexistent interface was requested or the requested source address was
|
|
|
|
not local.
|
|
|
|
.TP
|
|
|
|
.B EAGAIN
|
accept.2, connect.2, eventfd.2, flock.2, open.2, posix_fadvise.2, read.2, recv.2, sched_setscheduler.2, select_tut.2, send.2, signalfd.2, splice.2, timerfd_create.2, write.2, flockfile.3, mkfifo.3, mq_notify.3, mq_open.3, pthread_tryjoin_np.3, scanf.3, random.4, ddp.7, epoll.7, fifo.7, ip.7, pipe.7, socket.7, spufs.7: Global fix: s/non-blocking/nonblocking/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:43:10 +00:00
|
|
|
Operation on a nonblocking socket would block.
|
2008-08-08 16:41:48 +00:00
|
|
|
.TP
|
|
|
|
.B EALREADY
|
accept.2, connect.2, eventfd.2, flock.2, open.2, posix_fadvise.2, read.2, recv.2, sched_setscheduler.2, select_tut.2, send.2, signalfd.2, splice.2, timerfd_create.2, write.2, flockfile.3, mkfifo.3, mq_notify.3, mq_open.3, pthread_tryjoin_np.3, scanf.3, random.4, ddp.7, epoll.7, fifo.7, ip.7, pipe.7, socket.7, spufs.7: Global fix: s/non-blocking/nonblocking/
The tendency in English, as prescribed in style guides like
Chicago MoS, is towards removing hyphens after prefixes
like "non-" etc.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2010-01-16 16:43:10 +00:00
|
|
|
A connection operation on a nonblocking socket is already in progress.
|
2008-08-08 16:41:48 +00:00
|
|
|
.TP
|
|
|
|
.B ECONNABORTED
|
|
|
|
A connection was closed during an
|
|
|
|
.BR accept (2).
|
|
|
|
.TP
|
|
|
|
.B EHOSTUNREACH
|
|
|
|
No routing table entry matches the destination address.
|
|
|
|
.TP
|
|
|
|
.B EINVAL
|
|
|
|
Invalid argument passed.
|
|
|
|
.TP
|
|
|
|
.B EISCONN
|
|
|
|
.BR connect (2)
|
|
|
|
was called on an already connected socket.
|
|
|
|
.TP
|
|
|
|
.B EMSGSIZE
|
|
|
|
Datagram is bigger than the DDP MTU.
|
|
|
|
.TP
|
|
|
|
.B ENODEV
|
|
|
|
Network device not available or not capable of sending IP.
|
|
|
|
.TP
|
|
|
|
.B ENOENT
|
|
|
|
.B SIOCGSTAMP
|
|
|
|
was called on a socket where no packet arrived.
|
|
|
|
.TP
|
|
|
|
.BR ENOMEM " and " ENOBUFS
|
|
|
|
Not enough memory available.
|
|
|
|
.TP
|
|
|
|
.B ENOPKG
|
|
|
|
A kernel subsystem was not configured.
|
|
|
|
.TP
|
|
|
|
.BR ENOPROTOOPT " and " EOPNOTSUPP
|
|
|
|
Invalid socket option passed.
|
|
|
|
.TP
|
|
|
|
.B ENOTCONN
|
|
|
|
The operation is only defined 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,
|
2012-10-15 09:11:04 +00:00
|
|
|
or send signals to the requested process or group.
|
2008-08-08 16:41:48 +00:00
|
|
|
.TP
|
|
|
|
.B EPIPE
|
|
|
|
The connection was unexpectedly closed or shut down by the other end.
|
|
|
|
.TP
|
|
|
|
.B ESOCKTNOSUPPORT
|
|
|
|
The socket was unconfigured, or an unknown socket type was requested.
|
|
|
|
.SH VERSIONS
|
|
|
|
Appletalk is supported by Linux 2.0 or higher.
|
|
|
|
The
|
connect.2, listen.2, send.2, uname.2, cmsg.3, proc.5, arp.7, ddp.7, icmp.7, ip.7, raw.7, socket.7, tcp.7, udp.7: Global fix: eliminate mention of the obsolete sysctl(2) interface
Many pages still mention use of the obsolete sysctl(2) system
call, or used the term "sysctls"; rewrite these mentions to
instead be in terms of /proc interfaces.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-20 20:37:11 +00:00
|
|
|
.I /proc
|
|
|
|
interfaces exist since Linux 2.2.
|
2008-08-08 16:41:48 +00:00
|
|
|
.SH NOTES
|
|
|
|
Be very careful with the
|
|
|
|
.B SO_BROADCAST
|
|
|
|
option \- it is not privileged in Linux.
|
|
|
|
It is easy to overload the network
|
|
|
|
with careless sending to broadcast addresses.
|
|
|
|
.SS Compatibility
|
|
|
|
The basic AppleTalk socket interface is compatible with
|
|
|
|
.B netatalk
|
|
|
|
on BSD-derived systems.
|
|
|
|
Many BSD systems fail to check
|
|
|
|
.B SO_BROADCAST
|
|
|
|
when sending broadcast frames; this can lead to compatibility problems.
|
|
|
|
.PP
|
|
|
|
The
|
|
|
|
raw
|
|
|
|
socket mode is unique to Linux and exists to support the alternative CAP
|
|
|
|
package and AppleTalk monitoring tools more easily.
|
|
|
|
.SH BUGS
|
|
|
|
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"
|
|
|
|
.BR recvmsg (2),
|
|
|
|
.BR sendmsg (2),
|
|
|
|
.BR capabilities (7),
|
|
|
|
.BR socket (7)
|