X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman3%2Fsockatmark.3;h=850c2d1dfc7245771b9368f6967c480ed6106df0;hb=40274b7d79d419993de4a745e3ae86ca6d0f417f;hp=eccf2fcd0c865fcb9260201f17dd3a491e1bc9e5;hpb=633a2252e0be3c867dce264a180a89ce8181d36f;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man3/sockatmark.3 b/draft/man3/sockatmark.3 index eccf2fcd..850c2d1d 100644 --- a/draft/man3/sockatmark.3 +++ b/draft/man3/sockatmark.3 @@ -1,5 +1,6 @@ .\" 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. @@ -19,145 +20,65 @@ .\" .\" 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 , LDP v2.36 .\" -.TH SOCKATMARK 3 2008-12-03 "Linux" "Linux Programmer's Manual" -.\"O .SH NAME -.SH ̾Á° -.\"O sockatmark \- determine whether socket is at out-of-band mark -sockatmark \- ¤É¤Î¥½¥±¥Ã¥È¤ËÂÓ°è³° (out-of-band) ¥Þ¡¼¥¯¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤ë¤«¤òÄ´¤Ù¤ë -.\"O .SH SYNOPSIS -.SH ½ñ¼° -.B #include +.TH SOCKATMARK 3 2008\-12\-03 Linux "Linux Programmer's Manual" +.SH 名前 +sockatmark \- どのソケットに帯域外 (out\-of\-band) マークが付けられているかを調べる +.SH 書式 +\fB#include \fP .sp -.BI "int sockatmark(int " sockfd ); +\fBint sockatmark(int \fP\fIsockfd\fP\fB);\fP .sp .in -4n -.\"O Feature Test Macro Requirements for glibc (see -.\"O .BR feature_test_macros (7)): -glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï -.RB ( feature_test_macros (7) -»²¾È): +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l -.BR sockatmark (): -_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600 +\fBsockatmark\fP(): _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600 .ad b -.\"O .SH DESCRIPTION -.SH ÀâÌÀ -.\"O .BR sockatmark () -.\"O returns a value indicating whether or not the socket referred -.\"O to by the file descriptor -.\"O .I sockfd -.\"O is at the out-of-band mark. -.BR sockatmark () -¤Ï¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿ -.I sockfd -¤Ç»²¾È¤µ¤ì¤ë¥½¥±¥Ã¥È¤ËÂÓ°è³°¥Þ¡¼¥¯¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤ë¤«Èݤ«¤òÊÖ¤¹¡£ -.\"O If the socket is at the mark, then 1 is returned; -.\"O if the socket is not at the mark, 0 is returned. -.\"O This function does not remove the out-of-band mark. -¥½¥±¥Ã¥È¤Ë¥Þ¡¼¥¯¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢1 ¤¬ÊÖ¤µ¤ì¤ë¡£ -¥½¥±¥Ã¥È¤Ë¥Þ¡¼¥¯¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢0 ¤¬ÊÖ¤µ¤ì¤ë¡£ -¤³¤Î´Ø¿ô¤ÏÂÓ°è³°¥Þ¡¼¥¯¤òºï½ü¤·¤Ê¤¤¡£ -.\"O .SH "RETURN VALUE" -.SH ÊÖ¤êÃÍ -.\"O A successful call to -.\"O .BR sockatmark () -.\"O returns 1 if the socket is at the out-of-band mark, or 0 if it is not. -.\"O On error, \-1 is returned and \fIerrno\fP is set to indicate the error. -.BR sockatmark () -¤Î¸Æ¤Ó½Ð¤·¤¬À®¸ù¤·¤¿¾ì¹ç¡¢¥½¥±¥Ã¥È¤ËÂÓ°è³°¥Þ¡¼¥¯¤¬ -ÉÕ¤±¤é¤ì¤Æ¤¤¤ì¤Ð 1 ¤òÊÖ¤·¡¢ÉÕ¤±¤é¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð 0 ¤òÊÖ¤¹¡£ -¥¨¥é¡¼¤Î¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢¥¨¥é¡¼¤òɽ¤¹ \fIerrno\fP ¤¬ÀßÄꤵ¤ì¤ë¡£ -.\"O .SH ERRORS -.SH ¥¨¥é¡¼ -.TP -.B EBADF -.\"O .I sockfd -.\"O is not a valid file descriptor. -.I sockfd -¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£ -.TP -.B EINVAL +.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 -.\"O .I sockfd -.\"O is not a file descriptor to which -.\"O .BR sockatmark () -.\"O can be applied. -.I sockfd -¤Ï -.BR sockatmark () -¤¬Å¬ÍѤǤ­¤Ê¤¤¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£ -.\"O .SH VERSIONS -.SH ¥Ð¡¼¥¸¥ç¥ó -.\"O .BR sockatmark () -.\"O was added to glibc in version 2.2.4. -.BR sockatmark () -¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.2.4 ¤ÇÄɲ䵤줿¡£ -.\"O .SH "CONFORMING TO" -.SH ½àµò -POSIX.1-2001. -.\"O .SH NOTES -.SH Ãí°Õ -.\"O If -.\"O .BR sockatmark () -.\"O returns 1, then the out-of-band data can be read using the -.\"O .B MSG_OOB -.\"O flag of -.\"O .BR recv (2). -.BR sockatmark () -¤¬ 1 ¤òÊÖ¤¹¾ì¹ç¡¢ÂÓ°è³°¥Ç¡¼¥¿¤Ï -.B MSG_OOB -¤ò»ØÄꤷ¤¿ -.BR recv (2) -¤ÇÆɤ߹þ¤à¤³¤È¤¬¤Ç¤­¤ë¡£ +\fIsockfd\fP は \fBsockatmark\fP() が適用できないファイルディスクリプタである。 +.SH バージョン +\fBsockatmark\fP() は glibc バージョン 2.2.4 で追加された。 +.SH 準拠 +POSIX.1\-2001. +.SH 注意 +\fBsockatmark\fP() が 1 を返す場合、帯域外データは \fBMSG_OOB\fP を指定した \fBrecv\fP(2) で読み込むことができる。 -.\"O Out-of-band data is only supported on some stream socket protocols. -ÂÓ°è³°¥Ç¡¼¥¿¤Ï¡¢¤¤¤¯¤Ä¤«¤Î¥¹¥È¥ê¡¼¥à¥½¥±¥Ã¥È¥×¥í¥È¥³¥ë¤Ç¤·¤« -¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¡£ +帯域外データは、いくつかのストリームソケットプロトコルでしか サポートされていない。 -.\"O .BR sockatmark () -.\"O can safely be called from a handler for the -.\"O .B SIGURG -.\"O signal. -.BR sockatmark () -¤Ï -.B SIGURG -¥·¥°¥Ê¥ë¤Î¥Ï¥ó¥É¥é¤«¤é°ÂÁ´¤Ë¸Æ¤Ó½Ð¤¹¤³¤È¤¬¤Ç¤­¤ë¡£ +\fBsockatmark\fP() は \fBSIGURG\fP シグナルのハンドラから安全に呼び出すことができる。 -.\"O .BR sockatmark () -.\"O is implemented using the -.\"O .B SIOCATMARK -.\"O .BR ioctl (2) -.\"O operation. -.BR sockatmark () -¤Ï -.B SIOCATMARK -.BR ioctl (2) -Áàºî¤ò»È¤Ã¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£ -.\"O .SH BUGS -.SH ¥Ð¥° -.\"O Prior to glibc 2.4, -.\"O .BR sockatmark () -.\"O did not work. -glibc 2.4 ¤è¤êÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢ -.BR sockatmark () -¤ÏÆ°ºî¤·¤Ê¤¤¡£ -.\"O .SH EXAMPLE -.SH Îã -.\"O The following code can be used after receipt of a -.\"O .B SIGURG -.\"O signal to read (and discard) all data up to the mark, -.\"O and then read the byte of data at the mark: -°Ê²¼¤Î¥³¡¼¥É¤Ï¡¢ -.B SIGURG -¥·¥°¥Ê¥ë¤ò¼õ¤±¼è¤Ã¤¿¸å¤Ë¥Þ¡¼¥¯¤Þ¤Ç¤ÎÁ´¤Æ¤Î¥Ç¡¼¥¿¤òÆɤ߹þ¤ó¤Ç (ÇË´þ¤·)¡¢ -¥Þ¡¼¥¯¤µ¤ì¤¿¥Ç¡¼¥¿¤Î¥Ð¥¤¥È¤òÆɤ߹þ¤à¤Î¤Ë»ÈÍѤǤ­¤ë¡£ +\fBsockatmark\fP() は \fBSIOCATMARK\fP \fBioctl\fP(2) 操作を使って実装されている。 +.SH バグ +glibc 2.4 より前のバージョンでは、 \fBsockatmark\fP() は動作しない。 +.SH 例 +以下のコードは、 \fBSIGURG\fP シグナルを受け取った後にマークまでの全てのデータを読み込んで (破棄し)、 +マークされたデータのバイトを読み込むのに使用できる。 .nf char buf[BUF_LEN]; @@ -188,9 +109,9 @@ glibc 2.4 } } .fi -.\"O .SH "SEE ALSO" -.SH ´ØÏ¢¹àÌÜ -.BR fcntl (2), -.BR recv (2), -.BR send (2), -.BR tcp (7) +.SH 関連項目 +\fBfcntl\fP(2), \fBrecv\fP(2), \fBsend\fP(2), \fBtcp\fP(7) +.SH この文書について +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man\-pages/ に書かれている。