x25のヘルプ・マニュアル
日本語 英語
x25 --help
man x25
X25(7) Linux Programmer’s Manual X25(7)
名前
x25, AF_X25 - ITU-T X.25 / ISO-8208 プロトコルインターフェース
書式
#include
#include
x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
説明
X25 ソケットは X.25 パケット層プロトコルに対するインターフェースを提供
する。これにより、アプリケーションはパブリックな X.25 データネットワ ー
クで通信することができるようになる。 X.25 は International Telecommuni-
cation Union’s recommendation X.25 (X.25 DTE-DCE mode) で標準化されてい
る。 X25 ソケットは、中間層のない X.25 ネットワーク (X.25 DTE-DTE mode)
での通信にも用いることができる。 DTE-DTE モードは ISO-8208 に記述されて
いる。
メッセージ境界は保存される。ソケットからの read(2) は、反対側のソケット
からの対応する write(2) と同じ大きさのデータを受け取り、出力する。必 要
がある場合は、カーネルが長いメッセージの分割 (segmenting) と再構成 (re-
assembling) を行う。これには X.25 の M ビットが用いられる。メッセージサ
イ ズには、ハードコーディングされた上限はない。しかし、一時的にシステム
リソースが足りなかったり、他の制約 (ソケットメモリバッファのサイズ制 限
な ど) が効いてしまうと、長いメッセージの再構成には失敗するかもしれない
。この場合、その X.25 接続はリセットされることになる。
ソケットアドレス
AF_X25 ソケットアドレスファミリーは、ネットワークアドレスを表すた め に
struct sockaddr_x25 を用いる。これは ITU-T recommendation X.121 で定義
されている。
struct sockaddr_x25 {
sa_family_t sx25_family; /* must be AF_X25 */
x25_address sx25_addr; /* X.121 Address */
};
sx25_addr には char 配列 x25_addr[] を含まれる。これは 0 で終端する文字
列として解釈される。 sx25_addr.x25_addr[] は 15 個までの ASCII 文字を含
むことができ (終端の 0 は含まない)、これが X.121 アドレスをなす。 10 進
の数文字、'0' から '9' までだけが許される。
ソケットオプション
以 下 の X.25 特有のソケットオプションは、 setsockopt(2) で設定でき、
getsockopt(2) で取得できる。このとき level 引き数には SOL_X25 を指定 す
る。
X25_QBITINCL
X.25 の Q ビット (Qualified データビット) にユーザーがアクセスで
きるかどうかをコントロールする。整数の引数を取る。 0 にセット す
る と、 Q ビットは発信パケットには決してセットされず、受信パケッ
トでは無視される (デフォルト)。 1 にセットすると、ソケットから読
む、あるいはソケットに送るメッセージそれぞれに先頭バイトが前置さ
れる。ソケットから読んだデータでは、先頭バイトが 0 だと、この 到
着 データパケットに対応する Q ビットはセットされていなかったこと
になる。先頭バイトが 1 だと、到着データパケットの Q ビットがセッ
トされていたことになる。ソケットに書き込むデータの先頭バイトが 1
だと、その発信パケットの Q ビットをセットする。 0 だと、 Q ビ ッ
トをセットしない。
バージョン
AF_X25 プロトコルファミリは Linux 2.2 の新機能である。
バグ
X.25 PLP 実装は CONFIG_EXPERIMENTAL なので、たくさんあるだろう。
この man ページは完成していない。
ま だアプリケーションプログラマー用のヘッダファイルがない。カーネルのヘ
ッダファイル をインクルードしなければな ら な い 。 CON-
FIG_EXPERIMENTAL なので、将来のバージョンのインターフェースではバイナリ
互換性が失われるかもしれない。
X.25 N-Reset イベントは、まだユーザープロセスに伝播しない。したがってリ
セットが起こると、データは通知無しに失われる。
関連項目
socket(2), socket(7)
Jonathan Simon Naylor: “X.25 の再分析と再実装”
URL は ftp://ftp.pspt.fi/pub/ham/linux/ax25/x25doc.tgz
Linux 2008-08-08 X25(7)
X25(7) Linux Programmer’s Manual X25(7)
NAME
x25, AF_X25 - ITU-T X.25 / ISO-8208 protocol interface.
SYNOPSIS
#include
#include
x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
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 International Telecommunication Union’s recommenda-
tion X.25 (X.25 DTE-DCE mode). X25 sockets can also be used for commu-
nication without an intermediate X.25 network (X.25 DTE-DTE mode) as
described in ISO-8208.
Message boundaries are preserved — a read(2) from a socket will
retrieve the same chunk of data as output with the corresponding
write(2) to the peer socket. When necessary, the kernel takes care 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 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 connec-
tion will be reset.
Socket Addresses
The AF_X25 socket address family uses the struct sockaddr_x25 for rep-
resenting network addresses as defined in ITU-T recommendation X.121.
struct sockaddr_x25 {
sa_family_t sx25_family; /* must be AF_X25 */
x25_address sx25_addr; /* X.121 Address */
};
sx25_addr contains a char array x25_addr[] to be interpreted as a null-
terminated string. 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.
Socket Options
The following X.25-specific socket options can be set by using setsock-
opt(2) and read with getsockopt(2) with the level argument set to
SOL_X25.
X25_QBITINCL
Controls whether the X.25 Q-bit (Qualified Data Bit) is accessi-
ble 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 addi-
tional 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.
VERSIONS
The AF_X25 protocol family is a new feature of Linux 2.2.
BUGS
Plenty, as the X.25 PLP implementation is CONFIG_EXPERIMENTAL.
This man page is incomplete.
There is no dedicated application programmer’s header file yet; you
need to include the kernel header file . CONFIG_EXPERI-
MENTAL might also imply that future versions of the interface are not
binary compatible.
X.25 N-Reset events are not propagated to the user process yet. Thus,
if a reset occurred, data might be lost without notice.
SEE ALSO
socket(2), socket(7)
Jonathan Simon Naylor: “The Re-Analysis and Re-Implementation of X.25.”
The URL is
ftp://ftp.pspt.fi/pub/ham/linux/ax25/x25doc.tgz
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-08-08 X25(7)