OSDN Git Service

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