Subject: misc/26068: suggested update for pfil(9) manpage
To: None <gnats-bugs@gnats.NetBSD.org>
From: Peter Postma <peter@pointless.nl>
List: netbsd-bugs
Date: 06/26/2004 15:36:43
>Number:         26068
>Category:       misc
>Synopsis:       suggested update for pfil(9) manpage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 26 13:37:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Peter Postma
>Release:        NetBSD 2.0F
>Organization:
>Environment:
System: NetBSD mercury.pointless.nl 2.0F NetBSD 2.0F (mercury) #7: Fri Jun 25 17:53:46 CEST 2004 peter@mercury.pointless.nl:/usr/obj/sys/arch/sparc64/compile/mercury sparc64
Architecture: sparc64
Machine: sparc64
>Description:
pfil(9) doesn't mentions all the flags that can be used
in pfil_add_hook() and pfil_remove_hook().
>How-To-Repeat:
man 9 pfil
>Fix:
Index: pfil.9
===================================================================
RCS file: /cvsroot/src/share/man/man9/pfil.9,v
retrieving revision 1.24
diff -u -r1.24 pfil.9
--- pfil.9	1 Jan 2004 15:24:35 -0000	1.24
+++ pfil.9	26 Jun 2004 13:30:14 -0000
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 1, 2004
+.Dd June 26, 2004
 .Dt PFIL 9
 .Os
 .Sh NAME
@@ -104,7 +104,7 @@
 The filter is called with its specified argument, the pointer to the
 pointer to the mbuf containing the packet, the pointer to the network
 interface that the packet is traversing, and the direction (PFIL_IN
-or PFIL_OUT) that the packet is traveling.
+or PFIL_OUT, see also below) that the packet is traveling.
 The filter may change which mbuf the mbuf ** argument references.
 The filter returns an errno if the packet processing is to stop, or 0
 if the processing is to continue.
@@ -112,6 +112,23 @@
 filter to free the packet.
 .Pp
 The
+.Em flags
+parameter, used in the
+.Fn pfil_add_hook
+and
+.Fn pfil_remove_hook
+functions, indicates when the filter should be called.
+The flags are:
+.Bd -literal
+PFIL_IN         call me on incoming packets
+PFIL_OUT        call me on outgoing packets
+PFIL_ALL        call me on all of the above
+PFIL_IFADDR     call me on interface reconfig (mbuf ** is ioctl #)
+PFIL_NEWIF      call me on interface creation (mbuf ** is ignored)
+PFIL_WAITOK     OK to call malloc with M_WAITOK.
+.Ed
+.Pp
+The
 .Nm
 interface is enabled in the kernel via the
 .Sy PFIL_HOOKS
>Release-Note:
>Audit-Trail:
>Unformatted: