From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE02CC433EF for ; Wed, 8 Jun 2022 12:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239458AbiFHMpK (ORCPT ); Wed, 8 Jun 2022 08:45:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239409AbiFHMpI (ORCPT ); Wed, 8 Jun 2022 08:45:08 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F9329363 for ; Wed, 8 Jun 2022 05:45:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3372121B6D; Wed, 8 Jun 2022 12:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654692305; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AecnfwwXciV2cFEhqxTNlFZAKoMBtK5NtBRjANXhTfg=; b=UUcTZu/poJ2tmbZlvjWMW8n1+mW6MWEE5Y8WhseFaisQ+MlwQRboFaETSTm2sgbqfXp0Bu HgaReijTFrY6CBsGtu6o6k20F4C3xavGpiTaRkBI85j/oOzYpmbccSf1/UIiaC25dANJBH p2JJYlceJOzVg0MMsE0aoAvdu81rXTg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654692305; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=AecnfwwXciV2cFEhqxTNlFZAKoMBtK5NtBRjANXhTfg=; b=caqSeyOhjGrfrHO+ZgfdP2SzMG/3vRU4XKy60wTrONNSIkciDxuKh++Ql/zJPrNmj/Fr4D QtuB5000HWLcDtAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1F71213AD9; Wed, 8 Jun 2022 12:45:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NnikBtGZoGJERQAAMHmgww (envelope-from ); Wed, 08 Jun 2022 12:45:05 +0000 From: chrubis@suse.cz To: linux-man@vger.kernel.org Cc: alx.manpages@gmail.com, mtk.manpages@gmail.com, Cyril Hrubis Subject: [PATCH] ioctl_pipe.2: Add. Date: Wed, 8 Jun 2022 14:47:10 +0200 Message-Id: <20220608124710.12647-1-chrubis@suse.cz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org From: Cyril Hrubis Signed-off-by: Cyril Hrubis --- man2/ioctl_pipe.2 | 75 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 man2/ioctl_pipe.2 diff --git a/man2/ioctl_pipe.2 b/man2/ioctl_pipe.2 new file mode 100644 index 000000000..e60bc2134 --- /dev/null +++ b/man2/ioctl_pipe.2 @@ -0,0 +1,75 @@ +.\" Copyright (c) 2022 by Cyril Hrubis +.\" +.\" %%%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 +.\" +.\" +.TH IOCTL_PIPE 2 2022-08-06 "Linux" "Linux Programmer's Manual" +.SH NAME +ioctl_pipe \- ioctl() operations for General notification mechanism +.SH SYNOPSIS +.nf +.B #include +.PP +.BI "int ioctl(int " pipefd[1] ", IOC_WATCH_QUEUE_SET_SIZE, int " size "); +.PP +.BI "int ioctl(int " pipefd[1] ", IOC_WATCH_QUEUE_SET_FILTER, struct watch_notification_filter * " filter "); +.fi +.PP +.SH DESCRIPTION +The following +.BR ioctl (2) +operations are provided to set up a general notification queue parameters. +The notification queue is build on the top of a +.BR pipe (2) +opened with +.B O_NOTIFICATION_PIPE +flag. +.TP +.BR IOC_WATCH_QUEUE_SET_SIZE " (since Linux 5.8)" +.\" commit c73be61cede5882f9605a852414db559c0ebedfd +Preallocates the pipe buffer memory so that it can fit size notification messages. Currently the size must be between 1 and 512. +.TP +.BR IOC_WATCH_QUEUE_SET_FILTER " (since Linux 5.8)" +.\" commit c73be61cede5882f9605a852414db559c0ebedfd +Watch queue filter, if set, can limit events that are received. +Filters are passed in a \fIstruct watch_notification_filter\fP +and each filter is described by \fIstruct watch_notification_type_filter\fP structure. + +.EX +struct watch_notification_filter { + __u32 nr_filters; + __u32 __reserved; + struct watch_notification_type_filter filters[]; +}; + +struct watch_notification_type_filter { + __u32 type; + __u32 info_filter; + __u32 info_mask; + __u32 subtype_filter[8]; +}; +.EE + +.SH SEE ALSO +.BR pipe (2), +.BR ioctl (2) -- 2.35.1