* Claudio Jeker <cje...@diehard.n-r-g.com> [2014-04-21 11:14]: > __inline is dead long live inline.
oups, that crept back in. > Would it make sense to put this into a vlan_encap function so that we can > reduce the amount of layer violation here? > > #if NVLAN > 0 > if (ifp->if_type == IFT_L2VLAN) > return vlan_encap(ifp, m); > #endif I don't think so, really. We're talking about 25 lines of code, in a function that either prepends a regular ethernet header or a vlan-ethernet header. Having both cases next to each other makes it much more obvious what's going on imho. > We could also add a ifp->if_encap function pointer but if it is just for > vlan(4) I see no point in it. indeed. -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services GmbH, http://bsws.de, Full-Service ISP Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed Henning Brauer Consulting, http://henningbrauer.com/