On Wednesday 05 April 2006 10:40, David Acker wrote: > Ben Greear wrote: > > The reason I suggested to not make the size #defines visible is that it > > really doesn't help > > much. If you are receiving in user space, a more useful number is: > > > > sizeof(vlan_eth_header) + MTU of interface > > > > Depending on the underlying NIC, you may still receive larger packets, so > > never assume you absolutely know the max size of pkt to be read: Check > > the return values from recvfrom, etc. > > I see your point. I will give this a bit to see if there are any other > comments and then post a new patch that only exports the vlan_ethhdr > structure. > -Ack > - > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html
Additionaly, vlan headers may be nested, so the payload offset can be greater than sizeof(vlan_ethhdr) still. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html