Re: [Ebtables-devel] Adding a new target to add the vlan tag
Brought to you by:
bdschuym
From: Bart De S. <bds...@pa...> - 2008-09-25 12:28:54
|
Op wo, 24-09-2008 te 18:07 +0200, schreef Jon Petralanda: > Hi! I'm trying to do a tool to ensure QoS on layer 2 on Linux and for > that I need to add the VLAN tag to especified packets and change the > field depending on diferent network parameters on layer 2. > > To manage that I am trying to do a new target for ebtables like > Kashyap Ashwin was doing some time ago here: > http://osdir.com/ml/linux.network.bridge.ebtables.devel/2003-12/msg00027.html adding the 802.1q tag but with adding two options: the user can change vlan ID and change priority fields. > > I was seeing around the net and I see the functions __vlan_put_tag and > __vlan_get_tag from /usr/include/linux/if_vlan.h. And I also saw the > function vlan_dev_hard_start_xmit from Bart's response in > http://article.gmane.org/gmane.linux.network.bridge.ebtables.user/381. > I also read the Ebtables hacking howto and talk with Ashwin. > > My question is about the dificulty of doing this knowing that I'm a > newbie on ebtables and from where can I start doing this. I read about > copying the dnat userspace and kernel code and linking the > ebt_target_vnat with __vlan_put_tag (from if_vlan.h) but after I write > the codes of Kernel and userspace... How I can add it to ebtables for > testing? > > PD: Ashwin told me about a patch sent by him to you Bart, still have > you it? I see some mails from/to Ashwin in my archive, but afaict I didn't receive a working patch from him. I'll forward his last (private) message to you. For a kernel newbie I think it isn't trivial to do this, as it involves increasing the packet's size (possible lack of space in the Ethernet frame payload?). Of course, if you have time and patience you should manage to succeed. cheers, Bart |