|
Packit |
7cfc04 |
.\" This man page is Copyright (C) 1998 Heiner Eisen.
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
|
|
Packit |
7cfc04 |
.\" Permission is granted to distribute possibly modified copies
|
|
Packit |
7cfc04 |
.\" of this page provided the header is included verbatim,
|
|
Packit |
7cfc04 |
.\" and in case of nontrivial modification author and date
|
|
Packit |
7cfc04 |
.\" of the modification is added to the header.
|
|
Packit |
7cfc04 |
.\" %%%LICENSE_END
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.\" $Id: x25.7,v 1.4 1999/05/18 10:35:12 freitag Exp $
|
|
Packit |
7cfc04 |
.\"
|
|
Packit |
7cfc04 |
.TH X25 7 2017-09-15 "Linux" "Linux Programmer's Manual"
|
|
Packit |
7cfc04 |
.SH NAME
|
|
Packit |
7cfc04 |
x25 \- ITU-T X.25 / ISO-8208 protocol interface.
|
|
Packit |
7cfc04 |
.SH SYNOPSIS
|
|
Packit |
7cfc04 |
.B #include <sys/socket.h>
|
|
Packit |
7cfc04 |
.br
|
|
Packit |
7cfc04 |
.B #include <linux/x25.h>
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.B x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
|
|
Packit |
7cfc04 |
.SH DESCRIPTION
|
|
Packit |
7cfc04 |
X25 sockets provide an interface to the X.25 packet layer protocol.
|
|
Packit |
7cfc04 |
This allows applications to
|
|
Packit |
7cfc04 |
communicate over a public X.25 data network as standardized by
|
|
Packit |
7cfc04 |
International Telecommunication Union's recommendation X.25
|
|
Packit |
7cfc04 |
(X.25 DTE-DCE mode).
|
|
Packit |
7cfc04 |
X25 sockets can also be used for communication
|
|
Packit |
7cfc04 |
without an intermediate X.25 network (X.25 DTE-DTE mode) as described
|
|
Packit |
7cfc04 |
in ISO-8208.
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
Message boundaries are preserved \(em a
|
|
Packit |
7cfc04 |
.BR read (2)
|
|
Packit |
7cfc04 |
from a socket will
|
|
Packit |
7cfc04 |
retrieve the same chunk of data as output with the corresponding
|
|
Packit |
7cfc04 |
.BR write (2)
|
|
Packit |
7cfc04 |
to the peer socket.
|
|
Packit |
7cfc04 |
When necessary, the kernel takes care
|
|
Packit |
7cfc04 |
of segmenting and reassembling long messages by means of
|
|
Packit |
7cfc04 |
the X.25 M-bit.
|
|
Packit |
7cfc04 |
There is no hard-coded upper limit for the
|
|
Packit |
7cfc04 |
message size.
|
|
Packit |
7cfc04 |
However, reassembling of a long message might fail if
|
|
Packit |
7cfc04 |
there is a temporary lack of system resources or when other constraints
|
|
Packit |
7cfc04 |
(such as socket memory or buffer size limits) become effective.
|
|
Packit |
7cfc04 |
If that
|
|
Packit |
7cfc04 |
occurs, the X.25 connection will be reset.
|
|
Packit |
7cfc04 |
.SS Socket addresses
|
|
Packit |
7cfc04 |
The
|
|
Packit |
7cfc04 |
.B AF_X25
|
|
Packit |
7cfc04 |
socket address family uses the
|
|
Packit |
7cfc04 |
.I struct sockaddr_x25
|
|
Packit |
7cfc04 |
for representing network addresses as defined in ITU-T
|
|
Packit |
7cfc04 |
recommendation X.121.
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.in +4n
|
|
Packit |
7cfc04 |
.EX
|
|
Packit |
7cfc04 |
struct sockaddr_x25 {
|
|
Packit |
7cfc04 |
sa_family_t sx25_family; /* must be AF_X25 */
|
|
Packit |
7cfc04 |
x25_address sx25_addr; /* X.121 Address */
|
|
Packit |
7cfc04 |
};
|
|
Packit |
7cfc04 |
.EE
|
|
Packit |
7cfc04 |
.in
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
.I sx25_addr
|
|
Packit |
7cfc04 |
contains a char array
|
|
Packit |
7cfc04 |
.I x25_addr[]
|
|
Packit |
7cfc04 |
to be interpreted as a null-terminated string.
|
|
Packit |
7cfc04 |
.I sx25_addr.x25_addr[]
|
|
Packit |
7cfc04 |
consists of up to 15 (not counting the terminating null byte) ASCII
|
|
Packit |
7cfc04 |
characters forming the X.121 address.
|
|
Packit |
7cfc04 |
Only the decimal digit characters from \(aq0\(aq to \(aq9\(aq are allowed.
|
|
Packit |
7cfc04 |
.SS Socket options
|
|
Packit |
7cfc04 |
The following X.25-specific socket options can be set by using
|
|
Packit |
7cfc04 |
.BR setsockopt (2)
|
|
Packit |
7cfc04 |
and read with
|
|
Packit |
7cfc04 |
.BR getsockopt (2)
|
|
Packit |
7cfc04 |
with the
|
|
Packit |
7cfc04 |
.I level
|
|
Packit |
7cfc04 |
argument set to
|
|
Packit |
7cfc04 |
.BR SOL_X25 .
|
|
Packit |
7cfc04 |
.TP
|
|
Packit |
7cfc04 |
.B X25_QBITINCL
|
|
Packit |
7cfc04 |
Controls whether the X.25 Q-bit (Qualified Data Bit) is accessible by the
|
|
Packit |
7cfc04 |
user.
|
|
Packit |
7cfc04 |
It expects an integer argument.
|
|
Packit |
7cfc04 |
If set to 0 (default),
|
|
Packit |
7cfc04 |
the Q-bit is never set for outgoing packets and the Q-bit of incoming
|
|
Packit |
7cfc04 |
packets is ignored.
|
|
Packit |
7cfc04 |
If set to 1, an additional first byte is prepended
|
|
Packit |
7cfc04 |
to each message read from or written to the socket.
|
|
Packit |
7cfc04 |
For data read from
|
|
Packit |
7cfc04 |
the socket, a 0 first byte indicates that the Q-bits of the corresponding
|
|
Packit |
7cfc04 |
incoming data packets were not set.
|
|
Packit |
7cfc04 |
A first byte with value 1 indicates
|
|
Packit |
7cfc04 |
that the Q-bit of the corresponding incoming data packets was set.
|
|
Packit |
7cfc04 |
If the first byte of the data written to the socket is 1, the Q-bit of the
|
|
Packit |
7cfc04 |
corresponding outgoing data packets will be set.
|
|
Packit |
7cfc04 |
If the first byte is 0,
|
|
Packit |
7cfc04 |
the Q-bit will not be set.
|
|
Packit |
7cfc04 |
.SH VERSIONS
|
|
Packit |
7cfc04 |
The AF_X25 protocol family is a new feature of Linux 2.2.
|
|
Packit |
7cfc04 |
.SH BUGS
|
|
Packit |
7cfc04 |
Plenty, as the X.25 PLP implementation is
|
|
Packit |
7cfc04 |
.BR CONFIG_EXPERIMENTAL .
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
This man page is incomplete.
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
There is no dedicated application programmer's header file yet;
|
|
Packit |
7cfc04 |
you need to include the kernel header file
|
|
Packit |
7cfc04 |
.IR <linux/x25.h> .
|
|
Packit |
7cfc04 |
.B CONFIG_EXPERIMENTAL
|
|
Packit |
7cfc04 |
might also imply that future versions of the
|
|
Packit |
7cfc04 |
interface are not binary compatible.
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
X.25 N-Reset events are not propagated to the user process yet.
|
|
Packit |
7cfc04 |
Thus,
|
|
Packit |
7cfc04 |
if a reset occurred, data might be lost without notice.
|
|
Packit |
7cfc04 |
.SH SEE ALSO
|
|
Packit |
7cfc04 |
.BR socket (2),
|
|
Packit |
7cfc04 |
.BR socket (7)
|
|
Packit |
7cfc04 |
.PP
|
|
Packit |
7cfc04 |
Jonathan Simon Naylor:
|
|
Packit |
7cfc04 |
\(lqThe Re-Analysis and Re-Implementation of X.25.\(rq
|
|
Packit |
7cfc04 |
The URL is
|
|
Packit |
7cfc04 |
.UR ftp://ftp.pspt.fi\:/pub\:/ham\:/linux\:/ax25\:/x25doc.tgz
|
|
Packit |
7cfc04 |
.UE .
|
|
Packit |
7cfc04 |
.SH COLOPHON
|
|
Packit |
7cfc04 |
This page is part of release 4.15 of the Linux
|
|
Packit |
7cfc04 |
.I man-pages
|
|
Packit |
7cfc04 |
project.
|
|
Packit |
7cfc04 |
A description of the project,
|
|
Packit |
7cfc04 |
information about reporting bugs,
|
|
Packit |
7cfc04 |
and the latest version of this page,
|
|
Packit |
7cfc04 |
can be found at
|
|
Packit |
7cfc04 |
\%https://www.kernel.org/doc/man\-pages/.
|