Re: [PATCH] expose vlan structure and defines to user space

2006-04-05 Thread Brent Cook
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 > >

Re: [PATCH] expose vlan structure and defines to user space

2006-04-05 Thread David Acker
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

Re: [PATCH] expose vlan structure and defines to user space

2006-04-05 Thread Ben Greear
David Acker wrote: This is patch for include/linux/if_vlan.h . Its purpose is to allow a user space program to use the vlan_ethhdr structure when directly handling 802.1Q packets. This can be done by using a raw socket like: int s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); This socket sho

[PATCH] expose vlan structure and defines to user space

2006-04-05 Thread David Acker
This is patch for include/linux/if_vlan.h . Its purpose is to allow a user space program to use the vlan_ethhdr structure when directly handling 802.1Q packets. This can be done by using a raw socket like: int s = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); This socket should see VLAN packets