JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... .h で定義されており、 現在のところ以下のように定義されている。 /* 以下の定義は API の "storeid" 引き数として使われる。 */ #define DS_LIBRARY_ID 0 #define DS_APPLICATION_ID 1 #define DS_TOKEN_ID 2 /* storeid が DS_LIBRARY_ID の場合、 以下の定義は API の ... "which" 引き数として使われる。*/ /* 真偽値を操作するライブラリで使われるもの */ #define DS_LIB_MIB_ERRORS 0 #define DS_LIB_SAVE_MIB_DESCRS 1 #define DS_LIB_MIB_COMMENT_TERM 2 #define DS_LIB_MIB_PARSE_LABEL 3 #d ... efine DS_LIB_DUMP_PACKET 4 #define DS_LIB_LOG_TIMESTAMP 5 #define DS_LIB_DONT_READ_CONFIGS 6 #define DS_LIB_MIB_REPLACE 7 /* オブジェクトを最新のモジュールで ... ... の大まかな定義のみで、 詳細は libc のバージョンにより変わることに注意が必要である)。 /* Values for ut_type field, below */ #define EMPTY 0 /* Record does not contain valid info (formerly known as UT_UNKNOWN on Linux) */ #define RUN_LVL 1 /* Change in sy ... stem run-level (see init (1)) */ #define BOOT_TIME 2 /* Time of system boot (in ut_tv ) */ #define NEW_TIME 3 /* Time after system clock change (in ut_tv ) */ #def ... ine OLD_TIME 4 /* Time before system clock change (in ut_tv ) */ #define INIT_PROCESS 5 /* Process spawned by init (1) */ #define LOGIN_PROCESS 6 /* Session leader process for user login */ #defi ... ... の大まかな定義のみで、 詳細は libc のバージョンにより変わることに注意が必要である)。 /* Values for ut_type field, below */ #define EMPTY 0 /* Record does not contain valid info (formerly known as UT_UNKNOWN on Linux) */ #define RUN_LVL 1 /* Change in sy ... stem run-level (see init (1)) */ #define BOOT_TIME 2 /* Time of system boot (in ut_tv ) */ #define NEW_TIME 3 /* Time after system clock change (in ut_tv ) */ #def ... ine OLD_TIME 4 /* Time before system clock change (in ut_tv ) */ #define INIT_PROCESS 5 /* Process spawned by init (1) */ #define LOGIN_PROCESS 6 /* Session leader process for user login */ #defi ... ... の大まかな定義のみで、 詳細は libc のバージョンにより変わることに注意が必要である)。 /* Values for ut_type field, below */ #define EMPTY 0 /* Record does not contain valid info (formerly known as UT_UNKNOWN on Linux) */ #define RUN_LVL 1 /* Change in sy ... stem run-level (see init (1)) */ #define BOOT_TIME 2 /* Time of system boot (in ut_tv ) */ #define NEW_TIME 3 /* Time after system clock change (in ut_tv ) */ #def ... ine OLD_TIME 4 /* Time before system clock change (in ut_tv ) */ #define INIT_PROCESS 5 /* Process spawned by init (1) */ #define LOGIN_PROCESS 6 /* Session leader process for user login */ #defi ... ... It has been replaced by a set of files in the nfsd filesystem; see nfsd (7). /* * nfsctl() によって理解されるコマンド */ #define NFSCTL_SVC 0 /* サーバープロセス */ #define NFSCTL_ADDCLIENT 1 /* NFS クライアントを追加 */ #define NFSCTL_DELCLIENT 2 /* ... NFS クライアンドを削除 */ #define NFSCTL_EXPORT 3 /* ファイルシステムのエクスポート */ #define NFSCTL_UNEXPORT 4 /* ファイルシステムのアンエクスポート */ #d ... efine NFSCTL_UGIDUPDATE 5 /* クライアントの UID/GID マップの更新 (Linux 2.4.x とそれ以前のみ) */ #define NFSCTL_GETFH 6 /* (mountd で使用される) ファイルハンドルの 取得 (Linux 2.4.x とそれ以前のみ) */ struct nfsctl_arg { int ca ... ... これらの関数を使用すべきである。 現在の詳細 現在のカーネルの詳細について注意を述べておく。 構造体は以下のように定義される。 #define _LINUX_CAPABILITY_VERSION_1 0x19980330 #define _LINUX_CAPABILITY_U32S_1 1 /* V2 added in Linux 2.6.25; deprecated */ #defi ... ne _LINUX_CAPABILITY_VERSION_2 0x20071026 #define _LINUX_CAPABILITY_U32S_2 2 /* V3 added in Linux 2.6.26 */ #define _LINUX_CAPABILITY_VERSION_3 0x20080522 #define _LINUX_CA ... ... これらの関数を使用すべきである。 現在の詳細 現在のカーネルの詳細について注意を述べておく。 構造体は以下のように定義される。 #define _LINUX_CAPABILITY_VERSION_1 0x19980330 #define _LINUX_CAPABILITY_U32S_1 1 /* V2 added in Linux 2.6.25; deprecated */ #defi ... ne _LINUX_CAPABILITY_VERSION_2 0x20071026 #define _LINUX_CAPABILITY_U32S_2 2 /* V3 added in Linux 2.6.26 */ #define _LINUX_CAPABILITY_VERSION_3 0x20080522 #define _LINUX_CA ... ... 指定すると、ヘッダ中の str_flags フィールドの STR_ROTATED ビットがセットされます。 ヘッダのフォーマットは以下のとおりです。 #define VERSION 1 unsigned long str_version; /* バージョン番号 */ unsigned long str_numstr; /* ファイル中の文字列の数 */ unsigned ... long str_longlen; /* 最長文字列の長さ */ unsigned long str_shortlen; /* 最短文字列の長さ */ #define STR_RANDOM 0x1 /* ランダムフラグの位置 */ #define STR_ORDERED 0x2 /* 並び換えフラグの位置 */ #define STR_ROTATED 0x4 /* ro ... ... み出し、以下のような出力が得られる。 $ ./a.out 5 messages received 1 11782 2 11345 3 304 4 13514 5 28421 プログラムのソース #define _GNU_SOURCE #include < netinet/ip.h > #include < stdio.h > #include < stdlib.h > #include < string.h > #include < sys/sock ... et.h > int main(void) { #define VLEN 10 #define BUFSIZE 200 #define TIMEOUT 1 int sockfd, retval; struct sockaddr_in addr; struct mmsghdr msgs[VLEN]; stru ... ... std.h > void encrypt(char block [64], int edflag ); #define _XOPEN_SOURCE /* feature_test_macros (7) 参照 */ #include < stdlib.h > void setkey(const char * key ); #define _GNU_SOURCE ... 注意 Availability in glibc crypt (3) を参照。 Features in glibc glibc 2.2 では、これらの関数は DES アルゴリズムを使う。 例 #define _XOPEN_SOURCE #include < stdio.h > #include < stdlib.h > #include < unistd.h > #include < crypt.h > int main(void) { char ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。