man-pages/man7/x25.7

121 lines
3.8 KiB
Groff
Raw Normal View History

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