{
    "content": [
        {
            "type": "text",
            "text": "# DDP (man)\n\n## NAME\n\nddp - Linux AppleTalk protocol implementation\n\n## DESCRIPTION\n\nLinux  implements  the AppleTalk protocols described in Inside AppleTalk.  Only the DDP layer\nand AARP are present in the kernel.  They are designed to be used via the  netatalk  protocol\nlibraries.  This page documents the interface for those who wish or need to use the DDP layer\ndirectly.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (2 subsections)\n- **DESCRIPTION** (4 subsections)\n- **ERRORS**\n- **VERSIONS**\n- **NOTES** (1 subsections)\n- **BUGS**\n- **SEE ALSO**\n- **COLOPHON**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DDP",
        "section": "",
        "mode": "man",
        "summary": "ddp - Linux AppleTalk protocol implementation",
        "synopsis": "",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "recvmsg",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/recvmsg/2/json"
            },
            {
                "name": "sendmsg",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/sendmsg/2/json"
            },
            {
                "name": "capabilities",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/capabilities/7/json"
            },
            {
                "name": "socket",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/socket/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "#include <sys/socket.h>",
                        "lines": 1
                    },
                    {
                        "name": "#include <netatalk/at.h>",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 16,
                "subsections": [
                    {
                        "name": "Address format",
                        "lines": 22
                    },
                    {
                        "name": "Socket options",
                        "lines": 2
                    },
                    {
                        "name": "/proc interfaces",
                        "lines": 17
                    },
                    {
                        "name": "Ioctls",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "ERRORS",
                "lines": 52,
                "subsections": []
            },
            {
                "name": "VERSIONS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Compatibility",
                        "lines": 7
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ddp - Linux AppleTalk protocol implementation\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "",
                "subsections": [
                    {
                        "name": "#include <sys/socket.h>",
                        "content": ""
                    },
                    {
                        "name": "#include <netatalk/at.h>",
                        "content": "ddpsocket = socket(AFAPPLETALK, SOCKDGRAM, 0);\nrawsocket = socket(AFAPPLETALK, SOCKRAW, protocol);\n"
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "Linux  implements  the AppleTalk protocols described in Inside AppleTalk.  Only the DDP layer\nand AARP are present in the kernel.  They are designed to be used via the  netatalk  protocol\nlibraries.  This page documents the interface for those who wish or need to use the DDP layer\ndirectly.\n\nThe communication between AppleTalk and the user program works using a BSD-compatible  socket\ninterface.  For more information on sockets, see socket(7).\n\nAn  AppleTalk  socket is created by calling the socket(2) function with a AFAPPLETALK socket\nfamily argument.  Valid socket types are SOCKDGRAM to open a ddp socket or SOCKRAW to  open\na  raw  socket.  protocol is the AppleTalk protocol to be received or sent.  For SOCKRAW you\nmust specify ATPROTODDP.\n\nRaw sockets may be opened only by a process with effective user ID 0 or when the process  has\nthe CAPNETRAW capability.\n",
                "subsections": [
                    {
                        "name": "Address format",
                        "content": "An  AppleTalk  socket address is defined as a combination of a network number, a node number,\nand a port number.\n\nstruct ataddr {\nunsigned short snet;\nunsigned char  snode;\n};\n\nstruct sockaddratalk {\nsafamilyt    satfamily;    /* address family */\nunsigned char  satport;      /* port */\nstruct ataddr sataddr;      /* net/node */\n};\n\nsatfamily is always set to AFAPPLETALK.  satport contains the port.  The port numbers  be‐\nlow  129  are  known  as  reserved ports.  Only processes with the effective user ID 0 or the\nCAPNETBINDSERVICE capability may bind(2) to these sockets.  sataddr is the host  address.\nThe  net member of struct ataddr contains the host network in network byte order.  The value\nof ATANYNET is a wildcard and also implies  “this  network.”   The  node  member  of  struct\nataddr  contains  the  host node number.  The value of ATANYNODE is a wildcard and also im‐\nplies “this node.” The value of ATADDRBCAST is a link local broadcast address.\n"
                    },
                    {
                        "name": "Socket options",
                        "content": "No protocol-specific socket options are supported.\n"
                    },
                    {
                        "name": "/proc interfaces",
                        "content": "IP supports a set of /proc interfaces to configure some global AppleTalk parameters.  The pa‐\nrameters can be accessed by reading or writing files in the directory /proc/sys/net/atalk/.\n\naarp-expiry-time\nThe time interval (in seconds) before an AARP cache entry expires.\n\naarp-resolve-time\nThe time interval (in seconds) before an AARP cache entry is resolved.\n\naarp-retransmit-limit\nThe number of retransmissions of an AARP query before the node is declared dead.\n\naarp-tick-time\nThe timer rate (in seconds) for the timer driving AARP.\n\nThe default values match the specification and should never need to be changed.\n"
                    },
                    {
                        "name": "Ioctls",
                        "content": "All ioctls described in socket(7) apply to DDP.\n"
                    }
                ]
            },
            "ERRORS": {
                "content": "EACCES The  user  tried to execute an operation without the necessary permissions.  These in‐\nclude sending to a broadcast address without having the broadcast flag set, and trying\nto bind to a reserved port without effective user ID 0 or CAPNETBINDSERVICE.\n\nEADDRINUSE\nTried to bind to an address already in use.\n\nEADDRNOTAVAIL\nA nonexistent interface was requested or the requested source address was not local.\n\nEAGAIN Operation on a nonblocking socket would block.\n\nEALREADY\nA connection operation on a nonblocking socket is already in progress.\n\nECONNABORTED\nA connection was closed during an accept(2).\n\nEHOSTUNREACH\nNo routing table entry matches the destination address.\n\nEINVAL Invalid argument passed.\n\nEISCONN\nconnect(2) was called on an already connected socket.\n\nEMSGSIZE\nDatagram is bigger than the DDP MTU.\n\nENODEV Network device not available or not capable of sending IP.\n\nENOENT SIOCGSTAMP was called on a socket where no packet arrived.\n\nENOMEM and ENOBUFS\nNot enough memory available.\n\nENOPKG A kernel subsystem was not configured.\n\nENOPROTOOPT and EOPNOTSUPP\nInvalid socket option passed.\n\nENOTCONN\nThe operation is defined only on a connected socket, but the socket wasn't connected.\n\nEPERM  User  doesn't  have  permission  to set high priority, make a configuration change, or\nsend signals to the requested process or group.\n\nEPIPE  The connection was unexpectedly closed or shut down by the other end.\n\nESOCKTNOSUPPORT\nThe socket was unconfigured, or an unknown socket type was requested.\n",
                "subsections": []
            },
            "VERSIONS": {
                "content": "AppleTalk is supported by Linux 2.0 or higher.  The /proc interfaces exist since Linux 2.2.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "Be very careful with the SOBROADCAST option; it is not privileged in Linux.  It is  easy  to\noverload the network with careless sending to broadcast addresses.\n",
                "subsections": [
                    {
                        "name": "Compatibility",
                        "content": "The  basic  AppleTalk  socket  interface  is compatible with netatalk on BSD-derived systems.\nMany BSD systems fail to check SOBROADCAST when sending broadcast frames; this can  lead  to\ncompatibility problems.\n\nThe  raw socket mode is unique to Linux and exists to support the alternative CAP package and\nAppleTalk monitoring tools more easily.\n"
                    }
                ]
            },
            "BUGS": {
                "content": "There are too many inconsistent error values.\n\nThe ioctls used to configure routing tables, devices, AARP tables, and other devices are  not\nyet described.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "recvmsg(2), sendmsg(2), capabilities(7), socket(7)\n",
                "subsections": []
            },
            "COLOPHON": {
                "content": "This  page  is  part  of  release  5.10 of the Linux man-pages project.  A description of the\nproject, information about reporting bugs, and the latest version of this page, can be  found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2017-09-15                                       DDP(7)",
                "subsections": []
            }
        }
    }
}