#include <sys/socket.h> #include <linux/x25.h> x25_socket = socket(AF_X25, SOCK_SEQPACKET, 0);
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.
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.
この man ページは完成していない。
まだアプリケーションプログラマー用のヘッダーファイルがない。 カーネルのヘッダーファイル <linux/x25.h> をインクルードしなければならない。 CONFIG_EXPERIMENTAL なので、将来のバージョンのインターフェースでは バイナリ互換性が失われるかもしれない。
X.25 N-Reset イベントは、まだユーザープロセスに伝播しない。 したがってリセットが起こると、データは通知無しに失われる。
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.