Deleted Added
full compact
ng_tag.4 (165216) ng_tag.4 (242997)
1.\" Copyright (c) 2006 Vadim Goncharov <vadimnuclight@tpu.ru>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

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
23.\" SUCH DAMAGE.
24.\"
1.\" Copyright (c) 2006 Vadim Goncharov <vadimnuclight@tpu.ru>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

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
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/share/man/man4/ng_tag.4 165216 2006-12-14 16:40:57Z mpp $
25.\" $FreeBSD: head/share/man/man4/ng_tag.4 242997 2012-11-13 20:41:36Z joel $
26.\"
27.Dd June 10, 2006
28.Dt NG_TAG 4
29.Os
30.Sh NAME
31.Nm ng_tag
32.Nd "mbuf tags manipulating netgraph node type"
33.Sh SYNOPSIS

--- 73 unchanged lines hidden (view full) ---

107unchanged, all operations can affect tag list only.
108.Sh HOOKS
109This node type supports any number of hooks having arbitrary names.
110In order to allow internal optimizations, user should never try to
111configure a hook with a structure pointing to hooks which do not exist yet.
112The safe way is to create all hooks first, then begin to configure them.
113.Sh CONTROL MESSAGES
114This node type supports the generic control messages, plus the following:
26.\"
27.Dd June 10, 2006
28.Dt NG_TAG 4
29.Os
30.Sh NAME
31.Nm ng_tag
32.Nd "mbuf tags manipulating netgraph node type"
33.Sh SYNOPSIS

--- 73 unchanged lines hidden (view full) ---

107unchanged, all operations can affect tag list only.
108.Sh HOOKS
109This node type supports any number of hooks having arbitrary names.
110In order to allow internal optimizations, user should never try to
111configure a hook with a structure pointing to hooks which do not exist yet.
112The safe way is to create all hooks first, then begin to configure them.
113.Sh CONTROL MESSAGES
114This node type supports the generic control messages, plus the following:
115.Bl -tag -width indent
116.It Dv NGM_TAG_SET_HOOKIN
115.Bl -tag -width foo
116.It Dv NGM_TAG_SET_HOOKIN Pq Ic sethookin
117This command sets tag values which will be searched in the tag list of
118incoming packets on a hook.
119The following structure must be supplied as an argument:
120.Bd -literal -offset 4n
121struct ng_tag_hookin {
122 char thisHook[NG_HOOKSIZ]; /* name of hook */
123 char ifMatch[NG_HOOKSIZ]; /* match dest hook */
124 char ifNotMatch[NG_HOOKSIZ]; /* !match dest hook */

--- 19 unchanged lines hidden (view full) ---

144Matching and non-matching incoming packets are delivered out the hooks named
145.Va ifMatch
146and
147.Va ifNotMatch ,
148respectively.
149If
150.Va strip
151flag is non-zero, then found tag is deleted from list of packet tags.
117This command sets tag values which will be searched in the tag list of
118incoming packets on a hook.
119The following structure must be supplied as an argument:
120.Bd -literal -offset 4n
121struct ng_tag_hookin {
122 char thisHook[NG_HOOKSIZ]; /* name of hook */
123 char ifMatch[NG_HOOKSIZ]; /* match dest hook */
124 char ifNotMatch[NG_HOOKSIZ]; /* !match dest hook */

--- 19 unchanged lines hidden (view full) ---

144Matching and non-matching incoming packets are delivered out the hooks named
145.Va ifMatch
146and
147.Va ifNotMatch ,
148respectively.
149If
150.Va strip
151flag is non-zero, then found tag is deleted from list of packet tags.
152.It Dv NGM_TAG_GET_HOOKIN
152.It Dv NGM_TAG_GET_HOOKIN Pq Ic gethookin
153This command takes an
154.Tn ASCII
155string argument, the hook name, and returns the
156corresponding
157.Vt "struct ng_tag_hookin"
158as shown above.
153This command takes an
154.Tn ASCII
155string argument, the hook name, and returns the
156corresponding
157.Vt "struct ng_tag_hookin"
158as shown above.
159.It Dv NGM_TAG_SET_HOOKOUT
159.It Dv NGM_TAG_SET_HOOKOUT Pq Ic sethookout
160This command sets tags values which will be applied to outgoing
161packets.
162The following structure must be supplied as an argument:
163.Bd -literal -offset 4n
164struct ng_tag_hookout {
165 char thisHook[NG_HOOKSIZ]; /* name of hook */
166 uint32_t tag_cookie; /* ABI/Module ID */
167 uint16_t tag_id; /* tag ID */
168 uint16_t tag_len; /* length of data */
169 uint8_t tag_data[0]; /* tag data */
170};
171.Ed
172.Pp
173The hook to be updated is specified in
174.Va thisHook .
175Other variables mean basically the same as in
176.Vt "struct ng_tag_hookin"
177shown above, except used for setting values in a new tag.
160This command sets tags values which will be applied to outgoing
161packets.
162The following structure must be supplied as an argument:
163.Bd -literal -offset 4n
164struct ng_tag_hookout {
165 char thisHook[NG_HOOKSIZ]; /* name of hook */
166 uint32_t tag_cookie; /* ABI/Module ID */
167 uint16_t tag_id; /* tag ID */
168 uint16_t tag_len; /* length of data */
169 uint8_t tag_data[0]; /* tag data */
170};
171.Ed
172.Pp
173The hook to be updated is specified in
174.Va thisHook .
175Other variables mean basically the same as in
176.Vt "struct ng_tag_hookin"
177shown above, except used for setting values in a new tag.
178.It Dv NGM_TAG_GET_HOOKOUT
178.It Dv NGM_TAG_GET_HOOKOUT Pq Ic gethookout
179This command takes an
180.Tn ASCII
181string argument, the hook name, and returns the
182corresponding
183.Vt "struct ng_tag_hookout"
184as shown above.
179This command takes an
180.Tn ASCII
181string argument, the hook name, and returns the
182corresponding
183.Vt "struct ng_tag_hookout"
184as shown above.
185.It Dv NGM_TAG_GET_STATS
185.It Dv NGM_TAG_GET_STATS Pq Ic getstats
186This command takes an
187.Tn ASCII
188string argument, the hook name, and returns the
189statistics associated with the hook as a
190.Vt "struct ng_tag_hookstat" .
186This command takes an
187.Tn ASCII
188string argument, the hook name, and returns the
189statistics associated with the hook as a
190.Vt "struct ng_tag_hookstat" .
191.It Dv NGM_TAG_CLR_STATS
191.It Dv NGM_TAG_CLR_STATS Pq Ic clrstats
192This command takes an
193.Tn ASCII
194string argument, the hook name, and clears the
195statistics associated with the hook.
192This command takes an
193.Tn ASCII
194string argument, the hook name, and clears the
195statistics associated with the hook.
196.It Dv NGM_TAG_GETCLR_STATS
196.It Dv NGM_TAG_GETCLR_STATS Pq Ic getclrstats
197This command is identical to
198.Dv NGM_TAG_GET_STATS ,
199except that the statistics are also atomically cleared.
200.El
201.Pp
202.Em Note:
203statistics counters as well as three statistics messages above work
204only if code was compiled with the

--- 134 unchanged lines hidden ---
197This command is identical to
198.Dv NGM_TAG_GET_STATS ,
199except that the statistics are also atomically cleared.
200.El
201.Pp
202.Em Note:
203statistics counters as well as three statistics messages above work
204only if code was compiled with the

--- 134 unchanged lines hidden ---