Copyright (C) 2000-2012 |
Manpages DDPSection: Linux Programmer's Manual (7)Updated: 1999-05-01 Index Return to Main Contents NAMEddp - Linux AppleTalk protocol implementationSYNOPSIS#include <sys/socket.h>#include <netatalk/at.h>
ddp_socket = socket(PF_APPLETALK, SOCK_DGRAM, 0);
DESCRIPTIONLinux 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 FORMATAn Appletalk socket address is defined as a combination of a network number, a node number, and a port number.
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 lqthis network.rq The node member of struct at_addr contains the host node number. The value of AT_ANYNODE is a wildcard and also implies lqthis node.rq The value of ATADDR_BCAST is a link local broadcast address. SOCKET OPTIONSNo protocol-specific socket options are supported.SYSCTLSIP 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.
The default values match the specification and should never need to be changed. IOCTLSAll ioctls described in socket(7) apply to ddp.
NOTESBe 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.VERSIONSAppletalk is supported by Linux 2.0 or higher. The sysctl interface is new in Linux 2.2.ERRORS
COMPATIBILITYThe 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. BUGSThere are too many inconsistent error values.The ioctls used to configure routing tables, devices, AARP tables and other devices are not yet described. SEE ALSOsendmsg(2), recvmsg(2), socket(7)
Index
This document was created by man2html, using the manual pages. Time: 03:23:00 GMT, December 13, 2024 |