ng_etf.4 (b652778e426d00b6a1df29bbd86869db86f36e25) ng_etf.4 (c60bda17f2a9ed4a8c1ef6483ee7b8f207de7129)
1.\"
2.\" Copyright (c) 2001, FreeBSD Inc.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

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

21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
1.\"
2.\" Copyright (c) 2001, FreeBSD Inc.
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

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

21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
29.Dd May 16, 2006
29.Dd November 13, 2012
30.Dt NG_ETF 4
31.Os
32.Sh NAME
33.Nm ng_etf
34.Nd Ethertype filtering netgraph node type
35.Sh SYNOPSIS
36.In netgraph.h
37.In netgraph/ng_etf.h

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

61into the node, it must have arrived in on the hook for which that value
62was configured, otherwise it will be discarded.
63Ethertypes of values other
64than those configured by the control messages must have arrived via the
65.Em nomatch
66hook.
67.Sh HOOKS
68This node type supports the following hooks:
30.Dt NG_ETF 4
31.Os
32.Sh NAME
33.Nm ng_etf
34.Nd Ethertype filtering netgraph node type
35.Sh SYNOPSIS
36.In netgraph.h
37.In netgraph/ng_etf.h

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

61into the node, it must have arrived in on the hook for which that value
62was configured, otherwise it will be discarded.
63Ethertypes of values other
64than those configured by the control messages must have arrived via the
65.Em nomatch
66hook.
67.Sh HOOKS
68This node type supports the following hooks:
69.Bl -tag -width ".Em downstream"
69.Bl -tag -width ".Aq Em any legal name"
70.It Em downstream
71Typically this hook would be connected to a
72.Xr ng_ether 4
73node, using the
74.Em lower
75hook.
76.It Em nomatch
77Typically this hook would also be connected to an

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

84of an ethertype.
85Typically this hook would be attached to
86a protocol handling node that requires and generates packets
87with a particular set of ethertypes.
88.El
89.Sh CONTROL MESSAGES
90This node type supports the generic control messages, plus the following:
91.Bl -tag -width 4n
70.It Em downstream
71Typically this hook would be connected to a
72.Xr ng_ether 4
73node, using the
74.Em lower
75hook.
76.It Em nomatch
77Typically this hook would also be connected to an

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

84of an ethertype.
85Typically this hook would be attached to
86a protocol handling node that requires and generates packets
87with a particular set of ethertypes.
88.El
89.Sh CONTROL MESSAGES
90This node type supports the generic control messages, plus the following:
91.Bl -tag -width 4n
92.It Dv NGM_ETF_GET_STATUS
92.It Dv NGM_ETF_GET_STATUS Pq Ic getstatus
93This command returns a
94.Vt "struct ng_etfstat"
95containing node statistics for packet counts.
93This command returns a
94.Vt "struct ng_etfstat"
95containing node statistics for packet counts.
96.It Dv NGM_ETF_SET_FILTER
96.It Dv NGM_ETF_SET_FILTER Pq Ic setfilter
97Sets the a new ethertype filter into the node and specifies the hook to and
98from which packets of that type should use.
99The hook and ethertype
100are specified in a structure of type
101.Vt "struct ng_etffilter" :
102.Bd -literal -offset 4n
103struct ng_etffilter {
97Sets the a new ethertype filter into the node and specifies the hook to and
98from which packets of that type should use.
99The hook and ethertype
100are specified in a structure of type
101.Vt "struct ng_etffilter" :
102.Bd -literal -offset 4n
103struct ng_etffilter {
104 char matchhook[NG_HOOKSIZ]; /* hook name */
105 uint16_t ethertype; /* catch these */
104 char matchhook[NG_HOOKSIZ]; /* hook name */
105 uint16_t ethertype; /* this ethertype to this hook */
106};
107.Ed
108.El
109.Sh EXAMPLES
110Using
111.Xr ngctl 8
112it is possible to set a filter in place from the command line
113as follows:

--- 41 unchanged lines hidden ---
106};
107.Ed
108.El
109.Sh EXAMPLES
110Using
111.Xr ngctl 8
112it is possible to set a filter in place from the command line
113as follows:

--- 41 unchanged lines hidden ---