JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... , size_t msg_len , unsigned int * msg_prio ); #include < time.h > #include < mqueue.h > ssize_t mq_timedreceive(mqd_t mqdes , char * msg_ptr , size_t msg_len , unsigned int * msg_prio , const struct timespec * abs_timeout ); -lrt でリ ... ンクする。 glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): mq_timedreceive (): _POSIX_C_SOURCE >= 200112L 説明 mq_receive () は、メッセージキュー記述子 mqdes で参照されるメッセージキューから最も高い ... ULL 以外の場合、 msg_prio が指すバッファーに受信したメッセージの優先度が格納される。 キューが空の場合、デフォルトでは、 mq_receive () は、新しいメッセージが届くか、関数呼び出しがシグナルハンドラーにより 中断されるまで、停止 (block) する。 メッセージキュ ... ... , size_t msg_len , unsigned int * msg_prio ); #include < time.h > #include < mqueue.h > ssize_t mq_timedreceive(mqd_t mqdes , char * msg_ptr , size_t msg_len , unsigned int * msg_prio , const struct timespec * abs_timeout ); -lrt でリ ... ンクする。 glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): mq_timedreceive (): _POSIX_C_SOURCE >= 200112L 説明 mq_receive () は、メッセージキュー記述子 mqdes で参照されるメッセージキューから最も高い ... ULL 以外の場合、 msg_prio が指すバッファーに受信したメッセージの優先度が格納される。 キューが空の場合、デフォルトでは、 mq_receive () は、新しいメッセージが届くか、関数呼び出しがシグナルハンドラーにより 中断されるまで、停止 (block) する。 メッセージキュ ... ... , size_t msg_len , unsigned int * msg_prio ); #include < time.h > #include < mqueue.h > ssize_t mq_timedreceive(mqd_t mqdes , char * msg_ptr , size_t msg_len , unsigned int * msg_prio , const struct timespec * abs_timeout ); -lrt でリ ... ンクする。 glibc 向けの機能検査マクロの要件 ( feature_test_macros (7) 参照): mq_timedreceive (): _POSIX_C_SOURCE >= 200112L 説明 mq_receive () は、メッセージキュー記述子 mqdes で参照されるメッセージキューから最も高い ... ULL 以外の場合、 msg_prio が指すバッファーに受信したメッセージの優先度が格納される。 キューが空の場合、デフォルトでは、 mq_receive () は、新しいメッセージが届くか、関数呼び出しがシグナルハンドラーにより 中断されるまで、停止 (block) する。 メッセージキュ ... ... 合、 そのキューが空になり、その後新しいメッセージが到着した時に 初めて通知が行われることになる。 別のプロセスやスレッドが mq_receive (3) を使って、空のキューからメッセージの読み出しを待っている場合、 メッセージ通知の登録は全て無視される。 メッセージは mq_ ... &attr) == -1) handle_error("mq_getattr"); buf = malloc(attr.mq_msgsize); if (buf == NULL) handle_error("malloc"); nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL); if (nr == -1) handle_error("mq_receive"); printf("Read %zd bytes from MQ\n", nr); free ... q_notify"); pause(); /* プロセスはスレッド関数により終了される */ } 関連項目 mq_close (3), mq_getattr (3), mq_open (3), mq_receive (3), mq_send (3), mq_unlink (3), mq_overview (7), sigevent (7) この文書について この man ページは Linux man-pages プロジェ ... ... 合、 そのキューが空になり、その後新しいメッセージが到着した時に 初めて通知が行われることになる。 別のプロセスやスレッドが mq_receive (3) を使って、空のキューからメッセージの読み出しを待っている場合、 メッセージ通知の登録は全て無視される。 メッセージは mq_ ... &attr) == -1) handle_error("mq_getattr"); buf = malloc(attr.mq_msgsize); if (buf == NULL) handle_error("malloc"); nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL); if (nr == -1) handle_error("mq_receive"); printf("Read %zd bytes from MQ\n", nr); free ... q_notify"); pause(); /* プロセスはスレッド関数により終了される */ } 関連項目 mq_close (3), mq_getattr (3), mq_open (3), mq_receive (3), mq_send (3), mq_unlink (3), mq_overview (7), sigevent (7) この文書について この man ページは Linux man-pages プロジェ ... ... tion causes receipt of the credentials of the sending process in an SCM_CREDENTIALS ancillary message in each subsequently received message. The returned credentials are those specified by the sender using SCM_CREDENTIALS , or a default that includes th ... alent to duplicating ( dup (2)) a file descriptor into the file descriptor table of another process. If the buffer used to receive the ancillary data containing file descriptors is too small (or is absent), then the ancillary data is truncated (or disca ... rded) and the excess file descriptors are automatically closed in the receiving process. If the number of file descriptors received in the ancillary data would cause the process to exceed its RLIMIT_NOFILE resource limit (see getrlimit (2)), the excess ... ... e sockets in the reuseport group (that is, all sockets which have SO_REUSEPORT set and are using the same local address to receive packets). The BPF program must return an index between 0 and N-1 representing the socket which should receive the packet ( ... -level unique ID called NAPI ID that is associated with a RX queue on which the last packet associated with that socket is received. This can be used by an application to split the incoming flows among worker threads based on the RX queue on which the p ... ackets associated with the flows are received. It allows each worker thread to be associated with a NIC HW receive queue and service all the connection requests receiv ... ... 次のコードは、受け取った補助バッファーから IP_TTL オプションを探すものである。 struct msghdr msgh; struct cmsghdr *cmsg; int received_ttl; /* Receive auxiliary data in msgh */ for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(&msgh, cmsg) ... ) { if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_TTL) { memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl)); break; } } if (cmsg == NULL) { /* Error: IP_TTL not enabled or small buffer o ... ... 次のコードは、受け取った補助バッファーから IP_TTL オプションを探すものである。 struct msghdr msgh; struct cmsghdr *cmsg; int received_ttl; /* Receive auxiliary data in msgh */ for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(&msgh, cmsg) ... ) { if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_TTL) { memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl)); break; } } if (cmsg == NULL) { /* Error: IP_TTL not enabled or small buffer o ... ... 次のコードは、受け取った補助バッファーから IP_TTL オプションを探すものである。 struct msghdr msgh; struct cmsghdr *cmsg; int received_ttl; /* Receive auxiliary data in msgh */ for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(&msgh, cmsg) ... ) { if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_TTL) { memcpy(&receive_ttl, CMSG_DATA(cmsg), sizeof(received_ttl)); break; } } if (cmsg == NULL) { /* Error: IP_TTL not enabled or small buffer o ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。