Debian Codegraph @

upstream/debian-trixie/man7/x25.7

raw
1 .\" SPDX-License-Identifier: Linux-man-pages-1-para
2 .\"
3 .\" This man page is Copyright (C) 1998 Heiner Eisen.
4 .\"
5 .\" $Id: x25.7,v 1.4 1999/05/18 10:35:12 freitag Exp $
6 .\"
7 .TH x25 7 2024-05-02 "Linux man-pages 6.9.1"
8 .SH NAME
9 x25
10 \-
11 ITU-T X.25 / ISO/IEC\~8208 protocol interface
12 .SH SYNOPSIS
13 .nf
14 .B #include <sys/socket.h>
15 .B #include <linux/x25.h>
16 .P
17 .IB x25_socket " = socket(AF_X25, SOCK_SEQPACKET, 0);"
18 .fi
19 .SH DESCRIPTION
20 X25 sockets provide an interface to the X.25 packet layer protocol.
21 This allows applications to
22 communicate over a public X.25 data network as standardized by
23 International Telecommunication Union's recommendation X.25
24 (X.25 DTE-DCE mode).
25 X25 sockets can also be used for communication
26 without an intermediate X.25 network (X.25 DTE-DTE mode) as described
27 in ISO/IEC\~8208.
28 .P
29 Message boundaries are preserved \[em] a
30 .BR read (2)
31 from a socket will
32 retrieve the same chunk of data as output with the corresponding
33 .BR write (2)
34 to the peer socket.
35 When necessary, the kernel takes care
36 of segmenting and reassembling long messages by means of
37 the X.25 M-bit.
38 There is no hard-coded upper limit for the
39 message size.
40 However, reassembling of a long message might fail if
41 there is a temporary lack of system resources or when other constraints
42 (such as socket memory or buffer size limits) become effective.
43 If that
44 occurs, the X.25 connection will be reset.
45 .SS Socket addresses
46 The
47 .B AF_X25
48 socket address family uses the
49 .I struct sockaddr_x25
50 for representing network addresses as defined in ITU-T
51 recommendation X.121.
52 .P
53 .in +4n
54 .EX
55 struct sockaddr_x25 {
56 sa_family_t sx25_family; /* must be AF_X25 */
57 x25_address sx25_addr; /* X.121 Address */
58 };
59 .EE
60 .in
61 .P
62 .I sx25_addr
63 contains a char array
64 .I x25_addr[]
65 to be interpreted as a null-terminated string.
66 .I sx25_addr.x25_addr[]
67 consists of up to 15 (not counting the terminating null byte) ASCII
68 characters forming the X.121 address.
69 Only the decimal digit characters from \[aq]0\[aq] to \[aq]9\[aq] are allowed.
70 .SS Socket options
71 The following X.25-specific socket options can be set by using
72 .BR setsockopt (2)
73 and read with
74 .BR getsockopt (2)
75 with the
76 .I level
77 argument set to
78 .BR SOL_X25 .
79 .TP
80 .B X25_QBITINCL
81 Controls whether the X.25 Q-bit (Qualified Data Bit) is accessible by the
82 user.
83 It expects an integer argument.
84 If set to 0 (default),
85 the Q-bit is never set for outgoing packets and the Q-bit of incoming
86 packets is ignored.
87 If set to 1, an additional first byte is prepended
88 to each message read from or written to the socket.
89 For data read from
90 the socket, a 0 first byte indicates that the Q-bits of the corresponding
91 incoming data packets were not set.
92 A first byte with value 1 indicates
93 that the Q-bit of the corresponding incoming data packets was set.
94 If the first byte of the data written to the socket is 1, the Q-bit of the
95 corresponding outgoing data packets will be set.
96 If the first byte is 0,
97 the Q-bit will not be set.
98 .SH VERSIONS
99 The AF_X25 protocol family is a new feature of Linux 2.2.
100 .SH BUGS
101 Plenty, as the X.25 PLP implementation is
102 .BR CONFIG_EXPERIMENTAL .
103 .P
104 This man page is incomplete.
105 .P
106 There is no dedicated application programmer's header file yet;
107 you need to include the kernel header file
108 .IR <linux/x25.h> .
109 .B CONFIG_EXPERIMENTAL
110 might also imply that future versions of the
111 interface are not binary compatible.
112 .P
113 X.25 N-Reset events are not propagated to the user process yet.
114 Thus,
115 if a reset occurred, data might be lost without notice.
116 .SH SEE ALSO
117 .BR socket (2),
118 .BR socket (7)
119 .P
120 Jonathan Simon Naylor:
121 \[lq]The Re-Analysis and Re-Implementation of X.25.\[rq]
122 The URL is
123 .UR ftp://ftp.pspt.fi\:/pub\:/ham\:/linux\:/ax25\:/x25doc.tgz
124 .UE .