{"id":4131,"date":"2022-12-20T17:39:29","date_gmt":"2022-12-20T20:39:29","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/x25-man7\/"},"modified":"2022-12-20T17:39:29","modified_gmt":"2022-12-20T20:39:29","slug":"x25-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/x25-man7\/","title":{"rendered":"X25 (man7)"},"content":{"rendered":"<h1 align=\"center\">X25<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#VERSIONS\">VERSIONS<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">x25 \u2212 ITU-T X.25 \/ ISO-8208 protocol interface<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <sys\/socket.h> <br \/> #include <linux\/x25.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">X25 sockets provide an interface to the X.25 packet layer protocol. This allows applications to communicate over a public X.25 data network as standardized by International Telecommunication Union\u2019s recommendation X.25 (X.25 DTE-DCE mode). X25 sockets can also be used for communication without an intermediate X.25 network (X.25 DTE-DTE mode) as described in ISO-8208.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Message boundaries are preserved \u2014 a <b>read<\/b>(2) from a socket will retrieve the same chunk of data as output with the corresponding <b>write<\/b>(2) to the peer socket. When necessary, the kernel takes care of segmenting and reassembling long messages by means of the X.25 M-bit. There is no hard-coded upper limit for the message size. However, reassembling of a long message might fail if there is a temporary lack of system resources or when other constraints (such as socket memory or buffer size limits) become effective. If that occurs, the X.25 connection will be reset.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Socket addresses<\/b> <br \/> The <b>AF_X25<\/b> socket address family uses the <i>struct sockaddr_x25<\/i> for representing network addresses as defined in ITU-T recommendation X.121.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">struct sockaddr_x25 { <br \/> sa_family_t sx25_family; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var must be AF_X25 bodies\/ usr\/ <br \/> x25_address sx25_addr; \/bin \/boot \/dead.letter \/dev \/etc \/home \/initrd \/lib \/lib64 \/lost+found \/media \/mnt \/opt \/proc \/release-notes.html \/release-notes.txt \/root \/run \/sbin \/srv \/sys \/tmp \/usr \/var X.121 Address bodies\/ usr\/ <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>sx25_addr<\/i> contains a char array <i>x25_addr[]<\/i> to be interpreted as a null-terminated string. <i>sx25_addr.x25_addr[]<\/i> consists of up to 15 (not counting the terminating null byte) ASCII characters forming the X.121 address. Only the decimal digit characters from &#8216;0&#8217; to &#8216;9&#8217; are allowed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Socket options<\/b> <br \/> The following X.25-specific socket options can be set by using <b>setsockopt<\/b>(2) and read with <b>getsockopt<\/b>(2) with the <i>level<\/i> argument set to <b>SOL_X25<\/b>. <b><br \/> X25_QBITINCL<\/b><\/p>\n<p style=\"margin-left:22%;\">Controls whether the X.25 Q-bit (Qualified Data Bit) is accessible by the user. It expects an integer argument. If set to 0 (default), the Q-bit is never set for outgoing packets and the Q-bit of incoming packets is ignored. If set to 1, an additional first byte is prepended to each message read from or written to the socket. For data read from the socket, a 0 first byte indicates that the Q-bits of the corresponding incoming data packets were not set. A first byte with value 1 indicates that the Q-bit of the corresponding incoming data packets was set. If the first byte of the data written to the socket is 1, the Q-bit of the corresponding outgoing data packets will be set. If the first byte is 0, the Q-bit will not be set.<\/p>\n<h2>VERSIONS <a name=\"VERSIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The AF_X25 protocol family is a new feature of Linux 2.2.<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Plenty, as the X.25 PLP implementation is <b>CONFIG_EXPERIMENTAL<\/b>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This man page is incomplete.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There is no dedicated application programmer\u2019s header file yet; you need to include the kernel header file <i><linux\/x25.h><\/i>. <b>CONFIG_EXPERIMENTAL<\/b> might also imply that future versions of the interface are not binary compatible.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">X.25 N-Reset events are not propagated to the user process yet. Thus, if a reset occurred, data might be lost without notice.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>socket<\/b>(2), <b>socket<\/b>(7)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Jonathan Simon Naylor: \u201cThe Re-Analysis and Re-Implementation of X.25.\u201d The URL is <a href=\"ftp:\/\/ftp.pspt.fi\/pub\/ham\/linux\/ax25\/x25doc.tgz\">ftp:\/\/ftp.pspt.fi\/pub\/ham\/linux\/ax25\/x25doc.tgz<\/a>.<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 of the Linux <i>man-pages<\/i> project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  x25 \u2212 ITU-T X.25 \/ ISO-8208 protocol interface <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,972,1210],"class_list":["post-4131","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-man7","tag-x25"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4131"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4131\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}