206 lines
5.4 KiB
HTML
206 lines
5.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of X25</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>X25</H1>
|
|
Section: Linux Programmer's Manual (7)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
x25 - ITU-T X.25 / ISO-8208 protocol interface.
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/sys/socket.h">sys/socket.h</A>></B>
|
|
|
|
<BR>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/linux/x25.h">linux/x25.h</A>></B>
|
|
|
|
<P>
|
|
|
|
<B>x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
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
|
|
International Telecommunication Union's recommendation X.25
|
|
(X.25 DTE-DCE mode).
|
|
X25 sockets can also be used for communication
|
|
without an intermediate X.25 network (X.25 DTE-DTE mode) as described
|
|
in ISO-8208.
|
|
<P>
|
|
|
|
Message boundaries are preserved --- a
|
|
<B><A HREF="/cgi-bin/man/man2html?2+read">read</A></B>(2)
|
|
|
|
from a socket will
|
|
retrieve the same chunk of data as output with the corresponding
|
|
<B><A HREF="/cgi-bin/man/man2html?2+write">write</A></B>(2)
|
|
|
|
to the peer socket.
|
|
When necessary, the kernel takes care
|
|
of segmenting and reassembling long messages by means of
|
|
the X.25 M-bit.
|
|
There is no hard-coded upper limit for the
|
|
message size.
|
|
However, reassembling of a long message might fail if
|
|
there is a temporary lack of system resources or when other constraints
|
|
(such as socket memory or buffer size limits) become effective.
|
|
If that
|
|
occurs, the X.25 connection will be reset.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Socket addresses</H3>
|
|
|
|
The
|
|
<B>AF_X25</B>
|
|
|
|
socket address family uses the
|
|
<I>struct sockaddr_x25</I>
|
|
|
|
for representing network addresses as defined in ITU-T
|
|
recommendation X.121.
|
|
<P>
|
|
|
|
|
|
|
|
struct sockaddr_x25 {
|
|
<BR> sa_family_t sx25_family; /* must be AF_X25 */
|
|
<BR> x25_address sx25_addr; /* X.121 Address */
|
|
};
|
|
|
|
|
|
<P>
|
|
|
|
<I>sx25_addr</I>
|
|
|
|
contains a char array
|
|
<I>x25_addr[]</I>
|
|
|
|
to be interpreted as a null-terminated string.
|
|
<I>sx25_addr.x25_addr[]</I>
|
|
|
|
consists of up to 15 (not counting the terminating null byte) ASCII
|
|
characters forming the X.121 address.
|
|
Only the decimal digit characters from '0' to '9' are allowed.
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Socket options</H3>
|
|
|
|
The following X.25-specific socket options can be set by using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setsockopt">setsockopt</A></B>(2)
|
|
|
|
and read with
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getsockopt">getsockopt</A></B>(2)
|
|
|
|
with the
|
|
<I>level</I>
|
|
|
|
argument set to
|
|
<B>SOL_X25</B>.
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>X25_QBITINCL</B>
|
|
|
|
<DD>
|
|
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),
|
|
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
|
|
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
|
|
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,
|
|
the Q-bit will not be set.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>VERSIONS</H2>
|
|
|
|
The AF_X25 protocol family is a new feature of Linux 2.2.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
Plenty, as the X.25 PLP implementation is
|
|
<B>CONFIG_EXPERIMENTAL</B>.
|
|
|
|
<P>
|
|
|
|
This man page is incomplete.
|
|
<P>
|
|
|
|
There is no dedicated application programmer's header file yet;
|
|
you need to include the kernel header file
|
|
<I><<A HREF="file:///usr/include/linux/x25.h">linux/x25.h</A>></I>.
|
|
|
|
<B>CONFIG_EXPERIMENTAL</B>
|
|
|
|
might also imply that future versions of the
|
|
interface are not binary compatible.
|
|
<P>
|
|
|
|
X.25 N-Reset events are not propagated to the user process yet.
|
|
Thus,
|
|
if a reset occurred, data might be lost without notice.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+socket">socket</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+socket">socket</A></B>(7)
|
|
|
|
<P>
|
|
|
|
Jonathan Simon Naylor:
|
|
"The Re-Analysis and Re-Implementation of X.25."
|
|
The URL is
|
|
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="2"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="3"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="4"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAE">Socket addresses</A><DD>
|
|
<DT id="6"><A HREF="#lbAF">Socket options</A><DD>
|
|
</DL>
|
|
<DT id="7"><A HREF="#lbAG">VERSIONS</A><DD>
|
|
<DT id="8"><A HREF="#lbAH">BUGS</A><DD>
|
|
<DT id="9"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="10"><A HREF="#lbAJ">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:10 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|