[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

device_set_filter documentation update

From: Diego Nieto Cid
Subject: device_set_filter documentation update
Date: Sun, 16 Jan 2011 22:20:35 -0300


        Commit 1ca2a1632d7325ee26b2c701b38c1d2e2fcb6f80 in gnumach changed the interface with the
        packet filter and the GNU Mach Reference Manual got outdated.

        Here's the email where the patch was submitted:

        It contains a good reference with examples but I don't think they fit well
        with the rest of the document.

        I'd like to propose the following update. Everyone is invited to rephrase it :)


diff --git a/doc/mach.texi b/doc/mach.texi
index 858880a..a03d1ba 100644
--- a/doc/mach.texi
+++ b/doc/mach.texi
@@ -6507,6 +6507,34 @@ purpose of the filter test, an internal stack is provided.  After all
 commands have been processed, the value on the top of the stack
 determines if the data is forwarded or the next filter is tried.
+The first command is a header which contains the type of filter and
+the flags for it's code. The type defaults to native NETF filter and
+may be omitted. However, flags concerning the direction of data are
+required for the proper operation of the filter.
+Flags may be any combination of the following values:
+@table @code
+@item NETF_IN
+Data ingressing the device will be subject to the filter.
+@item NETF_OUT
+Data egressing from the device will be subject to the filter.
+@end table
+Filter type may be any of the following values:
+@table @code
+@item 0
+Use NETF native filter. This is the default value and no symbolic name
+is assigned to it.
+@item NETF_BPF
+Use Berkeley Packet Filter.
+@end table
+Note that types cannot be combined.
 @c XXX The following description was taken verbatim from the
 @c kernel_interface.pdf document.
 Each word of the command list specifies a data (push) operation (high

reply via email to

[Prev in Thread] Current Thread [Next in Thread]