Date: Tue, 24 Jan 2006 22:24:43 +0300 From: Gleb Smirnoff <glebius@FreeBSD.org> To: Gregory Nou <gregorynou@altern.org> Cc: freebsd-net@FreeBSD.org Subject: Re: Question on VLAN Message-ID: <20060124192443.GR83922@FreeBSD.org> In-Reply-To: <43D557B0.2080306@altern.org> References: <43D557B0.2080306@altern.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 23, 2006 at 11:24:48PM +0100, Gregory Nou wrote: G> What is the difference between G> if (m->m_flags & M_VLANTAG) G> and G> if (ether_type == ETHERTYPE_VLAN) ? G> G> I suppose that m->m_flags are set using ether_type at one point. Still, G> I was not able to find a location in the source where it would happen. G> G> The fact is, I do not understand the difference between these two G> things, nor do I understand why we need the code in if_ethersubr.c[691-717] Some drivers are capable to recognise VLAN frames. In this case mbuf has M_VLANTAG set on it, vlan tag is stored in mbuf tag, and mbuf contains untagged frame. For those drivers that aren't capable to handle VLAN frames, we need to look into frame and see the tag. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060124192443.GR83922>