1 .\" Copyright (c) 2005 Gleb Smirnoff
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd interface between netgraph and IP firewall
34 .In netgraph/ng_ipfw.h
38 node implements interface between
46 node supports an arbitrary number of hooks,
47 which must be named using only numeric characters.
51 module is loaded into the kernel, a single node named
53 is automatically created.
57 Once destroyed, the only way to recreate the node is to reload the
61 Packets can be injected into
70 These commands require a numeric cookie to be supplied as an argument.
71 Packets are sent out of the hook whose name equals the cookie value.
72 If no hook matches, packets are discarded.
73 Packets injected via the
75 command are tagged with
76 .Vt "struct ng_ipfw_tag" .
77 This tag contains information that helps the packet to re-enter
79 processing, should the packet come back from
83 .Bd -literal -offset 4n
85 struct m_tag mt; /* tag header */
86 struct ip_fw *rule; /* matching rule */
87 struct ifnet *ifp; /* interface, for ip_output */
88 int dir; /* packet direction */
91 int flags; /* flags, for ip_output() */
95 Packets received by a node from
98 .Vt "struct ng_ipfw_tag"
100 Packets re-enter IP firewall processing at the next rule.
101 If no tag is supplied, packets are discarded.
103 This node type supports only the generic control messages.
105 This node shuts down upon receipt of a
108 Do not do this, since the new
110 node can only be created by reloading the
121 node type was implemented in
127 .An "Gleb Smirnoff" Aq glebius@FreeBSD.org .