document recent changes.

provided by Peter Postma.  PR/26068
mdoc tweaks by me.
This commit is contained in:
yamt 2004-07-25 23:10:49 +00:00
parent 461314c36f
commit ff5b999530
1 changed files with 30 additions and 4 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: pfil.9,v 1.24 2004/01/01 15:24:35 wiz Exp $
.\" $NetBSD: pfil.9,v 1.25 2004/07/25 23:10:49 yamt Exp $
.\"
.\" Copyright (c) 1996 Matthew R. Green
.\" All rights reserved.
@ -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 July 26, 2004
.Dt PFIL 9
.Os
.Sh NAME
@ -103,8 +103,11 @@ When a filter is invoked, the packet appears just as if it
That is, all protocol fields are in network byte order.
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.
interface that the packet is traversing, and the direction (
.Dv PFIL_IN
or
.Dv 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 +115,29 @@ If the packet processing is to stop, it is the responsibility of the
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:
.Bl -tag -offset indent -width PFIL_WAITOK -compact
.It PFIL_IN
call me on incoming packets
.It PFIL_OUT
call me on outgoing packets
.It PFIL_ALL
call me on all of the above
.It PFIL_IFADDR
call me on interface reconfig (mbuf ** is ioctl #)
.It PFIL_NEWIF
call me on interface creation (mbuf ** is ignored)
.It PFIL_WAITOK
OK to call malloc with M_WAITOK.
.El
.Pp
The
.Nm
interface is enabled in the kernel via the
.Sy PFIL_HOOKS