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