1X25(7) Linux Programmer's Manual X25(7)
2
3
4
6 x25 - ITU-T X.25 / ISO-8208 protocol interface.
7
9 #include <sys/socket.h>
10 #include <linux/x25.h>
11
12 x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
13
15 X25 sockets provide an interface to the X.25 packet layer protocol.
16 This allows applications to communicate over a public X.25 data network
17 as standardized by International Telecommunication Union's recommenda‐
18 tion X.25 (X.25 DTE-DCE mode). X25 sockets can also be used for commu‐
19 nication without an intermediate X.25 network (X.25 DTE-DTE mode) as
20 described in ISO-8208.
21
22 Message boundaries are preserved — a read(2) from a socket will
23 retrieve the same chunk of data as output with the corresponding
24 write(2) to the peer socket. When necessary, the kernel takes care of
25 segmenting and reassembling long messages by means of the X.25 M-bit.
26 There is no hard-coded upper limit for the message size. However,
27 reassembling of a long message might fail if there is a temporary lack
28 of system resources or when other constraints (such as socket memory or
29 buffer size limits) become effective. If that occurs, the X.25 connec‐
30 tion will be reset.
31
32 Socket addresses
33 The AF_X25 socket address family uses the struct sockaddr_x25 for rep‐
34 resenting network addresses as defined in ITU-T recommendation X.121.
35
36 struct sockaddr_x25 {
37 sa_family_t sx25_family; /* must be AF_X25 */
38 x25_address sx25_addr; /* X.121 Address */
39 };
40
41 sx25_addr contains a char array x25_addr[] to be interpreted as a null-
42 terminated string. sx25_addr.x25_addr[] consists of up to 15 (not
43 counting the terminating null byte) ASCII characters forming the X.121
44 address. Only the decimal digit characters from '0' to '9' are
45 allowed.
46
47 Socket options
48 The following X.25-specific socket options can be set by using setsock‐
49 opt(2) and read with getsockopt(2) with the level argument set to
50 SOL_X25.
51
52 X25_QBITINCL
53 Controls whether the X.25 Q-bit (Qualified Data Bit) is accessi‐
54 ble by the user. It expects an integer argument. If set to 0
55 (default), the Q-bit is never set for outgoing packets and the
56 Q-bit of incoming packets is ignored. If set to 1, an addi‐
57 tional first byte is prepended to each message read from or
58 written to the socket. For data read from the socket, a 0 first
59 byte indicates that the Q-bits of the corresponding incoming
60 data packets were not set. A first byte with value 1 indicates
61 that the Q-bit of the corresponding incoming data packets was
62 set. If the first byte of the data written to the socket is 1,
63 the Q-bit of the corresponding outgoing data packets will be
64 set. If the first byte is 0, the Q-bit will not be set.
65
67 The AF_X25 protocol family is a new feature of Linux 2.2.
68
70 Plenty, as the X.25 PLP implementation is CONFIG_EXPERIMENTAL.
71
72 This man page is incomplete.
73
74 There is no dedicated application programmer's header file yet; you
75 need to include the kernel header file <linux/x25.h>. CONFIG_EXPERI‐
76 MENTAL might also imply that future versions of the interface are not
77 binary compatible.
78
79 X.25 N-Reset events are not propagated to the user process yet. Thus,
80 if a reset occurred, data might be lost without notice.
81
83 socket(2), socket(7)
84
85 Jonathan Simon Naylor: “The Re-Analysis and Re-Implementation of X.25.”
86 The URL is ⟨ftp://ftp.pspt.fi/pub/ham/linux/ax25/x25doc.tgz⟩.
87
89 This page is part of release 4.15 of the Linux man-pages project. A
90 description of the project, information about reporting bugs, and the
91 latest version of this page, can be found at
92 https://www.kernel.org/doc/man-pages/.
93
94
95
96Linux 2017-09-15 X25(7)