{
    "content": [
        {
            "type": "text",
            "text": "# X25(7) (man)\n\n**Summary:** x25 - ITU-T X.25 / ISO-8208 protocol interface\n\n## See Also\n\n- socket(2)\n- socket(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (1 lines) — 2 subsections\n  - #include <sys/socket.h> (1 lines)\n  - #include <linux/x25.h> (2 lines)\n- **DESCRIPTION** (14 lines) — 2 subsections\n  - Socket addresses (13 lines)\n  - Socket options (14 lines)\n- **VERSIONS** (2 lines)\n- **BUGS** (11 lines)\n- **SEE ALSO** (5 lines)\n- **COLOPHON** (7 lines)\n\n## Full Content\n\n### NAME\n\nx25 - ITU-T X.25 / ISO-8208 protocol interface\n\n### SYNOPSIS\n\n#### #include <sys/socket.h>\n\n#### #include <linux/x25.h>\n\nx25socket = socket(AFX25, SOCKSEQPACKET, 0);\n\n### DESCRIPTION\n\nX25 sockets provide an interface to the X.25 packet layer protocol.  This allows applications\nto communicate over a public X.25 data network as standardized by International  Telecommuni‐\ncation  Union's  recommendation  X.25  (X.25 DTE-DCE mode).  X25 sockets can also be used for\ncommunication without an intermediate X.25  network  (X.25  DTE-DTE  mode)  as  described  in\nISO-8208.\n\nMessage  boundaries  are  preserved — a read(2) from a socket will retrieve the same chunk of\ndata as output with the corresponding write(2) to the peer socket.  When necessary, the  ker‐\nnel  takes  care  of  segmenting  and  reassembling long messages by means of the X.25 M-bit.\nThere is no hard-coded upper limit for the message size.  However,  reassembling  of  a  long\nmessage might fail if there is a temporary lack of system resources or when other constraints\n(such as socket memory or buffer size limits) become effective.  If  that  occurs,  the  X.25\nconnection will be reset.\n\n#### Socket addresses\n\nThe  AFX25  socket  address family uses the struct sockaddrx25 for representing network ad‐\ndresses as defined in ITU-T recommendation X.121.\n\nstruct sockaddrx25 {\nsafamilyt sx25family;    /* must be AFX25 */\nx25address sx25addr;      /* X.121 Address */\n};\n\nsx25addr contains a char array x25addr[] to be interpreted  as  a  null-terminated  string.\nsx25addr.x25addr[]  consists  of  up  to  15 (not counting the terminating null byte) ASCII\ncharacters forming the X.121 address.  Only the decimal digit characters from '0' to '9'  are\nallowed.\n\n#### Socket options\n\nThe  following  X.25-specific  socket options can be set by using setsockopt(2) and read with\ngetsockopt(2) with the level argument set to SOLX25.\n\nX25QBITINCL\nControls whether the X.25 Q-bit (Qualified Data Bit) is accessible by  the  user.   It\nexpects an integer argument.  If set to 0 (default), the Q-bit is never set for outgo‐\ning packets and the Q-bit of incoming packets is ignored.  If set to 1, an  additional\nfirst  byte is prepended to each message read from or written to the socket.  For data\nread from the socket, a 0 first byte indicates that the Q-bits  of  the  corresponding\nincoming  data  packets were not set.  A first byte with value 1 indicates that the Q-\nbit of the corresponding incoming data packets was set.  If the first byte of the data\nwritten  to the socket is 1, the Q-bit of the corresponding outgoing data packets will\nbe set.  If the first byte is 0, the Q-bit will not be set.\n\n### VERSIONS\n\nThe AFX25 protocol family is a new feature of Linux 2.2.\n\n### BUGS\n\nPlenty, as the X.25 PLP implementation is CONFIGEXPERIMENTAL.\n\nThis man page is incomplete.\n\nThere is no dedicated application programmer's header file yet; you need to include the  ker‐\nnel  header file <linux/x25.h>.  CONFIGEXPERIMENTAL might also imply that future versions of\nthe interface are not binary compatible.\n\nX.25 N-Reset events are not propagated to the user process yet.  Thus, if a  reset  occurred,\ndata might be lost without notice.\n\n### SEE ALSO\n\nsocket(2), socket(7)\n\nJonathan  Simon  Naylor:  “The  Re-Analysis  and  Re-Implementation  of  X.25.”   The  URL is\n⟨ftp://ftp.pspt.fi/pub/ham/linux/ax25/x25doc.tgz⟩.\n\n### COLOPHON\n\nThis 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                                       X25(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "X25",
        "section": "7",
        "mode": "man",
        "summary": "x25 - ITU-T X.25 / ISO-8208 protocol interface",
        "synopsis": "",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "socket",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/socket/2/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 <linux/x25.h>",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 14,
                "subsections": [
                    {
                        "name": "Socket addresses",
                        "lines": 13
                    },
                    {
                        "name": "Socket options",
                        "lines": 14
                    }
                ]
            },
            {
                "name": "VERSIONS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}