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