OSDN Git Service

Retire LDP man-pages repository
[linuxjm/LDP_man-pages.git] / draft / man3 / sockatmark.3
diff --git a/draft/man3/sockatmark.3 b/draft/man3/sockatmark.3
deleted file mode 100644 (file)
index 489f150..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" Copyright (c) 2006, Michael Kerrisk (mtk.manpages@gmail.com)
-.\"
-.\" %%%LICENSE_START(VERBATIM)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
-.\"*******************************************************************
-.\"
-.\" This file was generated with po4a. Translate the source file.
-.\"
-.\"*******************************************************************
-.\"
-.\" Japanese Version Copyright (c) 2006 Yuichi SATO
-.\"         all rights reserved.
-.\" Translated 2006-08-01 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.36
-.\"
-.TH SOCKATMARK 3 2014\-02\-28 Linux "Linux Programmer's Manual"
-.SH 名前
-sockatmark \- どのソケットに帯域外 (out\-of\-band) マークが付けられているかを調べる
-.SH 書式
-\fB#include <sys/socket.h>\fP
-.sp
-\fBint sockatmark(int \fP\fIsockfd\fP\fB);\fP
-.sp
-.in -4n
-glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
-.in
-.sp
-.ad l
-\fBsockatmark\fP(): _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600
-.ad b
-.SH 説明
-\fBsockatmark\fP()  はファイルディスクリプター \fIsockfd\fP で参照されるソケットに帯域外マークが付けられているか否かを返す。
-ソケットにマークが付けられている場合は、1 が返される。 ソケットにマークが付けられていない場合は、0 が返される。
-この関数は帯域外マークを削除しない。
-.SH 返り値
-\fBsockatmark\fP()  の呼び出しが成功した場合、ソケットに帯域外マークが 付けられていれば 1 を返し、付けられていなければ 0 を返す。
-エラーの場合は \-1 が返され、エラーを表す \fIerrno\fP が設定される。
-.SH エラー
-.TP 
-\fBEBADF\fP
-\fIsockfd\fP が有効なファイルディスクリプターでない。
-.TP 
-\fBEINVAL\fP
-.\" POSIX.1 says ENOTTY for this case
-\fIsockfd\fP は \fBsockatmark\fP()  が適用できないファイルディスクリプターである。
-.SH バージョン
-\fBsockatmark\fP()  は glibc バージョン 2.2.4 で追加された。
-.SH 属性
-.SS "マルチスレッディング (pthreads(7) 参照)"
-\fBsockatmark\fP() 関数はスレッドセーフである。
-.SH 準拠
-POSIX.1\-2001.
-.SH 注意
-\fBsockatmark\fP()  が 1 を返す場合、帯域外データは \fBMSG_OOB\fP を指定した \fBrecv\fP(2)  で読み込むことができる。
-
-帯域外データは、いくつかのストリームソケットプロトコルでしか サポートされていない。
-
-\fBsockatmark\fP()  は \fBSIGURG\fP シグナルのハンドラーから安全に呼び出すことができる。
-
-\fBsockatmark\fP()  は \fBSIOCATMARK\fP \fBioctl\fP(2)  操作を使って実装されている。
-.SH バグ
-glibc 2.4 より前のバージョンでは、 \fBsockatmark\fP()  は動作しない。
-.SH 例
-以下のコードは、 \fBSIGURG\fP シグナルを受け取った後にマークまでの全てのデータを読み込んで (破棄し)、
-マークされたデータのバイトを読み込むのに使用できる。
-.nf
-
-    char buf[BUF_LEN];
-    char oobdata;
-    int atmark, s;
-
-    for (;;) {
-        atmark = sockatmark(sockfd);
-        if (atmark == \-1) {
-            perror("sockatmark");
-            break;
-        }
-
-        if (atmark)
-            break;
-
-        s = read(sockfd, buf, BUF_LEN) <= 0);
-        if (s == \-1)
-            perror("read");
-        if (s <= 0)
-            break;
-    }
-
-    if (atmark == 1) {
-        if (recv(sockfd, &oobdata, 1, MSG_OOB) == \-1) {
-            perror("recv");
-            ...
-        }
-    }
-.fi
-.SH 関連項目
-\fBfcntl\fP(2), \fBrecv\fP(2), \fBsend\fP(2), \fBtcp\fP(7)
-.SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
-である。プロジェクトの説明とバグ報告に関する情報は
-http://www.kernel.org/doc/man\-pages/ に書かれている。