1X25(7)                     Linux Programmer's Manual                    X25(7)
2
3
4

NAME

6       x25, AF_X25 - ITU-T X.25 / ISO-8208 protocol interface.
7

SYNOPSIS

9       #include <sys/socket.h>
10       #include <linux/x25.h>
11
12       x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
13

DESCRIPTION

15       X25  sockets  provide  an  interface to the X.25 packet layer protocol.
16       This allows applications to communicate over a public X.25 data network
17       as  standardized by International Telecommunication Union's recommenda‐
18       tion X.25 (X.25 DTE-DCE mode).  X25 sockets can also be used for commu‐
19       nication  without  an  intermediate X.25 network (X.25 DTE-DTE mode) as
20       described in ISO-8208.
21
22       Message boundaries are  preserved  —  a  read(2)  from  a  socket  will
23       retrieve  the  same  chunk  of  data  as  output with the corresponding
24       write(2) to the peer socket.  When necessary, the kernel takes care  of
25       segmenting  and re-assembling long messages by means of the X.25 M-bit.
26       There is no hard-coded upper limit for the message size.  However,  re-
27       assembling of a long message might fail if there is a temporary lack of
28       system resources or when other constraints (such as  socket  memory  or
29       buffer size limits) become effective.  If that occurs, the X.25 connec‐
30       tion will be reset.
31
32   Socket Addresses
33       The AF_X25 socket address family uses the struct sockaddr_x25 for  rep‐
34       resenting network addresses as defined in ITU-T recommendation X.121.
35
36           struct sockaddr_x25 {
37               sa_family_t sx25_family;    /* must be AF_X25 */
38               x25_address sx25_addr;      /* X.121 Address */
39           };
40
41       sx25_addr contains a char array x25_addr[] to be interpreted as a null-
42       terminated string.  sx25_addr.x25_addr[] consists  of  up  to  15  (not
43       counting the terminating 0) ASCII characters forming the X.121 address.
44       Only the decimal digit characters from '0' to '9' are allowed.
45
46   Socket Options
47       The following X.25-specific socket options can be set by using setsock‐
48       opt(2)  and  read  with  getsockopt(2)  with  the level argument set to
49       SOL_X25.
50
51       X25_QBITINCL
52              Controls whether the X.25 Q-bit (Qualified Data Bit) is accessi‐
53              ble  by  the user.  It expects an integer argument.  If set to 0
54              (default), the Q-bit is never set for outgoing packets  and  the
55              Q-bit  of  incoming  packets  is ignored.  If set to 1, an addi‐
56              tional first byte is prepended to  each  message  read  from  or
57              written to the socket.  For data read from the socket, a 0 first
58              byte indicates that the Q-bits  of  the  corresponding  incoming
59              data  packets were not set.  A first byte with value 1 indicates
60              that the Q-bit of the corresponding incoming  data  packets  was
61              set.   If  the first byte of the data written to the socket is 1
62              the Q-bit of the corresponding outgoing  data  packets  will  be
63              set.  If the first byte is 0 the Q-bit will not be set.
64

VERSIONS

66       The AF_X25 protocol family is a new feature of Linux 2.2.
67

BUGS

69       Plenty, as the X.25 PLP implementation is CONFIG_EXPERIMENTAL.
70
71       This man page is incomplete.
72
73       There  is  no  dedicated  application programmer's header file yet; you
74       need to include the kernel header file  <linux/x25.h>.   CONFIG_EXPERI‐
75       MENTAL  might  also imply that future versions of the interface are not
76       binary compatible.
77
78       X.25 N-Reset events are not propagated to the user process yet.   Thus,
79       if a reset occurred, data might be lost without notice.
80

SEE ALSO

82       socket(2), socket(7)
83
84       Jonathan Simon Naylor: “The Re-Analysis and Re-Implementation of X.25.”
85       The URL is
86              ftp://ftp.pspt.fi/pub/ham/linux/ax25/x25doc.tgz
87

COLOPHON

89       This page is part of release 3.22 of the Linux  man-pages  project.   A
90       description  of  the project, and information about reporting bugs, can
91       be found at http://www.kernel.org/doc/man-pages/.
92
93
94
95Linux                             2008-08-08                            X25(7)
Impressum