summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/ng_vlan.4 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man4/ng_vlan.4 3.html')
-rw-r--r--static/freebsd/man4/ng_vlan.4 3.html127
1 files changed, 127 insertions, 0 deletions
diff --git a/static/freebsd/man4/ng_vlan.4 3.html b/static/freebsd/man4/ng_vlan.4 3.html
new file mode 100644
index 00000000..df328b81
--- /dev/null
+++ b/static/freebsd/man4/ng_vlan.4 3.html
@@ -0,0 +1,127 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">NG_VLAN(4)</td>
+ <td class="head-vol">Device Drivers Manual</td>
+ <td class="head-rtitle">NG_VLAN(4)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">ng_vlan</code> &#x2014; <span class="Nd">IEEE
+ 802.1Q VLAN tagging netgraph node type</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp"><code class="In">#include
+ &lt;<a class="In">sys/types.h</a>&gt;</code>
+ <br/>
+ <code class="In">#include &lt;<a class="In">netgraph.h</a>&gt;</code>
+ <br/>
+ <code class="In">#include
+ &lt;<a class="In">netgraph/ng_vlan.h</a>&gt;</code></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The <code class="Nm">vlan</code> node type multiplexes frames
+ tagged according to the IEEE 802.1Q standard between different hooks.</p>
+<p class="Pp">Each node has two special hooks, <var class="Va">downstream</var>
+ and <var class="Va">nomatch</var>, and an arbitrary number of
+ &#x201C;vlan&#x201D; hooks, each associated with a particular VLAN tag.</p>
+<p class="Pp">An <code class="Dv">ETHERTYPE_VLAN</code> frame received on the
+ <var class="Va">downstream</var> hook with a tag that the node has been
+ configured to filter is sent out the corresponding &#x201C;vlan&#x201D;
+ hook. If it does not match any of the configured tags, or is not of a type
+ <code class="Dv">ETHERTYPE_VLAN</code>, it is sent out the
+ <var class="Va">nomatch</var> hook. If the <var class="Va">nomatch</var>
+ hook is not connected, the packet is dropped.</p>
+<p class="Pp">An Ethernet frame received on the <var class="Va">nomatch</var>
+ hook is passed unmodified to the <var class="Va">downstream</var> hook.</p>
+<p class="Pp">An Ethernet frame received on any of the &#x201C;vlan&#x201D;
+ hooks is tagged accordingly and sent out the
+ <var class="Va">downstream</var> hook.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HOOKS"><a class="permalink" href="#HOOKS">HOOKS</a></h1>
+<p class="Pp">This node type supports the following hooks:</p>
+<dl class="Bl-tag">
+ <dt id="downstream"><var class="Va">downstream</var></dt>
+ <dd>Typically this hook would be connected to a <a class="Xr">ng_ether(4)</a>
+ node, using the <var class="Va">lower</var> hook.</dd>
+ <dt id="nomatch"><var class="Va">nomatch</var></dt>
+ <dd>Typically this hook would also be connected to an
+ <a class="Xr">ng_ether(4)</a> type node using the
+ <var class="Va">upper</var> hook.</dd>
+ <dt id="any">&#x27E8;<a class="permalink" href="#any"><i class="Em">any valid
+ name</i></a>&#x27E9;</dt>
+ <dd>Any other hook name will be accepted and should later be associated with a
+ particular tag. Typically this hook would be attached to an
+ <a class="Xr">ng_eiface(4)</a> type node using the
+ <var class="Va">ether</var> hook.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="CONTROL_MESSAGES"><a class="permalink" href="#CONTROL_MESSAGES">CONTROL
+ MESSAGES</a></h1>
+<p class="Pp">This node type supports the generic control messages, plus the
+ following:</p>
+<dl class="Bl-tag">
+ <dt id="NGM_VLAN_ADD_FILTER"><a class="permalink" href="#NGM_VLAN_ADD_FILTER"><code class="Dv">NGM_VLAN_ADD_FILTER</code></a>
+ (<code class="Ic">addfilter</code>)</dt>
+ <dd>Associates a hook with the tag.</dd>
+ <dt id="NGM_VLAN_DEL_FILTER"><a class="permalink" href="#NGM_VLAN_DEL_FILTER"><code class="Dv">NGM_VLAN_DEL_FILTER</code></a>
+ (<code class="Ic">delfilter</code>)</dt>
+ <dd>Disassociates a hook from the tag.</dd>
+ <dt id="NGM_VLAN_GET_TABLE"><a class="permalink" href="#NGM_VLAN_GET_TABLE"><code class="Dv">NGM_VLAN_GET_TABLE</code></a>
+ (<code class="Ic">gettable</code>)</dt>
+ <dd>Returns a table of all hook/tag associations.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
+<div class="Bd Li">
+<pre>#!/bin/sh
+
+ETHER_IF=rl0
+
+ngctl -f- &lt;&lt;EOF
+shutdown ${ETHER_IF}:
+mkpeer ${ETHER_IF}: vlan lower downstream
+name ${ETHER_IF}:lower vlan
+connect ${ETHER_IF}: vlan: upper nomatch
+EOF
+
+ngctl mkpeer vlan: eiface vlan123 ether
+ngctl msg vlan: addfilter '{ vlan=123 hook=&quot;vlan123&quot; }'</pre>
+</div>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SHUTDOWN"><a class="permalink" href="#SHUTDOWN">SHUTDOWN</a></h1>
+<p class="Pp">This node shuts down upon receipt of a
+ <code class="Dv">NGM_SHUTDOWN</code> control message, or when all hooks have
+ been disconnected.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">netgraph(4)</a>, <a class="Xr">ng_eiface(4)</a>,
+ <a class="Xr">ng_ether(4)</a>, <a class="Xr">ngctl(8)</a>,
+ <a class="Xr">nghook(8)</a></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
+<p class="Pp">The <code class="Nm">ng_vlan</code> node type appeared in
+ <span class="Ux">FreeBSD 4.10</span>.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
+<p class="Pp"><span class="An">Ruslan Ermilov</span>
+ &lt;<a class="Mt" href="mailto:ru@FreeBSD.org">ru@FreeBSD.org</a>&gt;</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">March 1, 2004</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>