Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
ddp(7)
Edit
PageHistory
Diff
Info
LikePages
DDP !!!DDP NAME SYNOPSIS DESCRIPTION ADDRESS FORMAT SOCKET OPTIONS SYSCTLS IOCTLS NOTES VERSIONS ERRORS COMPATIBILITY BUGS SEE ALSO ---- !!NAME ddp - Linux !AppleTalk protocol implementation !!SYNOPSIS __#include __ #include __ ''ddp_socket'' __= socket(PF_APPLETALK, SOCK_DGRAM, 0);__'' raw_socket'' __= socket(PF_APPLETALK, SOCK_RAW,__ ''protocol''__);__ !!DESCRIPTION Linux implements the Appletalk protocols described in ''Inside Appletalk''. Only the DDP layer and AARP are present in the kernel. They are designed to be used via the __netatalk__ protocol libraries. This page documents the interface for those who wish or need to use the DDP layer directly. The communication between Appletalk and the user program works using a BSD-compatible socket interface. For more information on sockets, see socket(7). An !AppleTalk socket is created by calling the socket(2) function with a __PF_APPLETALK__ socket family argument. Valid socket types are __SOCK_DGRAM__ to open a __ddp__ socket or __SOCK_RAW__ to open a __raw__ socket. ''protocol'' is the Appletalk protocol to be received or sent. For __SOCK_RAW__ you must specify __ATPROTO_DDP__. Raw sockets may be only opened by a process with effective user id 0 or when the process has the __CAP_NET_RAW__ capability. !!ADDRESS FORMAT An Appletalk socket address is defined as a combination of a network number, a node number, and a port number. struct at_addr { u_short s_net; u_char s_node; }; struct sockaddr_atalk { sa_family_t sat_family; /* address family */ u_char sat_port; /* port */ struct at_addr sat_addr; /* net/node */ }; ''sat_family'' is always set to __AF_APPLETALK.__ ''sat_port'' contains the port. The port numbers below 129 are known as __reserved ports.__ Only processes with the effective user id 0 or the __CAP_NET_BIND_SERVICE__ capability may bind(2) to these sockets. ''sat_addr'' is the host address. The ''net'' member of __struct at_addr__ contains the host network in network byte order. The value of __AT_ANYNET__ is a wildcard and also implies ``this network.'' The ''node'' member of __struct at_addr__ contains the host node number. The value of __AT_ANYNODE__ is a wildcard and also implies ``this node.'' The value of __ATADDR_BCAST__ is a link local broadcast address. !!SOCKET OPTIONS No protocol-specific socket options are supported. !!SYSCTLS IP supports a sysctl interface to configure some global !AppleTalk parameters. The sysctls can be accessed by reading or writing the __/proc/sys/net/atalk/*__ files or with the sysctl(2) interface. __aarp-expiry-time__ The time interval (in seconds) before an AARP cache entry expires. __aarp-resolve-time__ The time interval (in seconds) before an AARP cache entry is resolved. __aarp-retransmit-limit__ The number of retransmissions of an AARP query before the node is declared dead. __aarp-tick-time__ The timer rate (in seconds) for the timer driving AARP. The default values match the specification and should never need to be changed. !!IOCTLS All ioctls described in socket(7) apply to ddp. !!NOTES Be very careful with the __SO_BROADCAST__ option - it is not privileged in Linux. It is easy to overload the network with careless sending to broadcast addresses. !!VERSIONS Appletalk is supported by Linux 2.0 or higher. The __sysctl__ interface is new in Linux 2.2. !!ERRORS __ENOTCONN__ The operation is only defined on a connected socket, but the socket wasn't connected. __EINVAL__ Invalid argument passed. __EMSGSIZE__ Datagram is bigger than the DDP MTU. __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 __CAP_NET_BIND_SERVICE__. __EADDRINUSE__ Tried to bind to an address already in use. __ENOMEM__ and __ENOBUFS__ Not enough memory available. __ENOPROTOOPT__ and __EOPNOTSUPP__ Invalid socket option passed. __EPERM__ User doesn't have permission to set high priority, make a configuration change, or send signals to the requested process or group, __EADDRNOTAVAIL__ A non-existent interface was requested or the requested source address was not local. __EAGAIN__ Operation on a nonblocking socket would block. __ESOCKTNOSUPPORT__ The socket was unconfigured, or an unknown socket type was requested. __EISCONN__ connect(2) was called on an already connected socket. __EALREADY__ A connection operation on a non-blocking socket is already in progress. __ECONNABORTED__ A connection was closed during an accept(2). __EPIPE__ The connection was unexpectedly closed or shut down by the other end. __ENOENT__ __SIOCGSTAMP__ was called on a socket where no packet arrived. __EHOSTUNREACH__ No routing table entry matches the destination address. __ENODEV__ Network device not available or not capable of sending IP. __ENOPKG__ A kernel subsystem was not configured. !!COMPATIBILITY The basic !AppleTalk socket interface is compatible with __netatalk__ on BSD-derived systems. Many BSD systems fail to check __SO_BROADCAST__ when sending broadcast frames; this can lead to compatibility problems. The raw socket mode is unique to Linux and exists to support the alternative CAP package and !AppleTalk monitoring tools more easily. !!BUGS There are too many inconsistent error values. The ioctls used to configure routing tables, devices, AARP tables and other devices are not yet described. !!SEE ALSO sendmsg(2), recvmsg(2), socket(7) ----
5 pages link to
ddp(7)
:
AddressFamily
Man7d
socket(7)
bind(2)
socket(2)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.