x25

Section: Environments, Tables, and Troff Macros (7)
Updated: 2026-02-08
Index JM Home Page roff page
 

名前

x25 - ITU-T X.25 / ISO/IEC~8208 protocol interface  

書式

#include <sys/socket.h>
#include <linux/x25.h>

x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
 

説明

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/IEC~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 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.  

ソケットアドレス

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 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 null byte) ASCII characters forming the X.121 address. Only the decimal digit characters from '0' to '9' are allowed.  

ソケットオプション

以下の 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 ページは完成していない。

まだアプリケーションプログラマー用のヘッダーファイルがない。 カーネルのヘッダーファイル <linux/x25.h> をインクルードしなければならない。 CONFIG_EXPERIMENTAL なので、将来のバージョンのインターフェースでは バイナリ互換性が失われるかもしれない。

X.25 N-Reset イベントは、まだユーザープロセスに伝播しない。 したがってリセットが起こると、データは通知無しに失われる。  

関連項目

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.


 

Index

名前
書式
説明
ソケットアドレス
ソケットオプション
バージョン
バグ
関連項目

This document was created by man2html, using the manual pages.