1 .\" Copyright (c) 2003 Ruslan Ermilov
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 IEEE 802.1Q VLAN tagging netgraph node type
36 .In netgraph/ng_vlan.h
40 node type multiplexes frames tagged according to
41 the IEEE 802.1Q standard between different hooks.
43 Each node has two special hooks,
47 and an arbitrary number of
49 hooks, each associated with a particular VLAN tag.
55 hook with a tag that the node has been configured to filter
56 is sent out the corresponding
59 If it does not match any of the configured tags, or is not of a type
66 hook is not connected, the packet is dropped.
68 An Ethernet frame received on the
70 hook is passed unmodified to the
74 An Ethernet frame received on any of the
76 hooks is tagged accordingly and sent out the
80 This node type supports the following hooks:
81 .Bl -tag -width ".Va downstream"
83 Typically this hook would be connected to a
89 Typically this hook would also be connected to an
94 .It Aq Em "any valid name"
95 Any other hook name will be accepted and should later be associated with
97 Typically this hook would be attached to an
104 This node type supports the generic control messages, plus the following:
105 .Bl -tag -width indent
106 .It Dv NGM_VLAN_ADD_FILTER Pq Li addfilter
107 Associates a hook with the tag.
108 .It Dv NGM_VLAN_DEL_FILTER Pq Li delfilter
109 Disassociates a hook from the tag.
110 .It Dv NGM_VLAN_GET_TABLE Pq Li gettable
111 Returns a table of all hook/tag associations.
120 shutdown ${ETHER_IF}:
121 mkpeer ${ETHER_IF}: vlan lower downstream
122 name ${ETHER_IF}:lower vlan
123 connect ${ETHER_IF}: vlan: upper nomatch
126 ngctl mkpeer vlan: eiface vlan123 ether
127 ngctl msg vlan: addfilter '{ vlan=123 hook="vlan123" }'
130 This node shuts down upon receipt of a
132 control message, or when all hooks have been disconnected.
142 node type appeared in
145 .An Ruslan Ermilov Aq ru@FreeBSD.org