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