* add/delete VLANs programatically
@ 2008-09-07 7:12 Eli Cohen
2008-09-07 10:58 ` Rami Rosen
0 siblings, 1 reply; 3+ messages in thread
From: Eli Cohen @ 2008-09-07 7:12 UTC (permalink / raw)
To: netdev
Hi,
I need to find a way to manipulate VLANs from a kernel module;
specifically, I need to add and remove VLANs. Is that possible at all?
How?
Thanks,
Eli
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: add/delete VLANs programatically
2008-09-07 7:12 add/delete VLANs programatically Eli Cohen
@ 2008-09-07 10:58 ` Rami Rosen
2008-09-07 11:30 ` Eli Cohen
0 siblings, 1 reply; 3+ messages in thread
From: Rami Rosen @ 2008-09-07 10:58 UTC (permalink / raw)
To: Eli Cohen; +Cc: netdev
Hi,
-It seems to me that it is possible.
- If you look at the ordinary way in which user space add/deletes
VLAN, you will see that this is performed by ioctls (SIOCSIFVLAN for
adding /removing with ADD_VLAN_CMD or DEL_VLAN_CMD).
- It is in performed by user space vconfig - VLAN (802.1q)
configuration program.
- When looking at how these IOCTLs are handled in the kernel, you
will see that this is done by vlan_ioctl_handler() in net/8021q/vlan.c.
-If you look there, you will see that eventually adding a vlan is
done in the kernel by
register_vlan_device(net_device, VLAN ID);
end deleing a vlan is done in the kernel by calling
unregister_vlan_dev(net_device)
So it seems to me possible, though I did not try it.
Regards,
Rami Rosen
On Sun, Sep 7, 2008 at 10:12 AM, Eli Cohen <eli@dev.mellanox.co.il> wrote:
> Hi,
> I need to find a way to manipulate VLANs from a kernel module;
> specifically, I need to add and remove VLANs. Is that possible at all?
> How?
>
> Thanks,
> Eli
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: add/delete VLANs programatically
2008-09-07 10:58 ` Rami Rosen
@ 2008-09-07 11:30 ` Eli Cohen
0 siblings, 0 replies; 3+ messages in thread
From: Eli Cohen @ 2008-09-07 11:30 UTC (permalink / raw)
To: Rami Rosen; +Cc: netdev
On Sun, Sep 07, 2008 at 01:58:20PM +0300, Rami Rosen wrote:
Hi Rami.
V> Hi,
> -It seems to me that it is possible.
>
> - If you look at the ordinary way in which user space add/deletes
> VLAN, you will see that this is performed by ioctls (SIOCSIFVLAN for
> adding /removing with ADD_VLAN_CMD or DEL_VLAN_CMD).
> - It is in performed by user space vconfig - VLAN (802.1q)
> configuration program.
>
> - When looking at how these IOCTLs are handled in the kernel, you
> will see that this is done by vlan_ioctl_handler() in net/8021q/vlan.c.
>
> -If you look there, you will see that eventually adding a vlan is
> done in the kernel by
> register_vlan_device(net_device, VLAN ID);
> end deleing a vlan is done in the kernel by calling
> unregister_vlan_dev(net_device)
>
> So it seems to me possible, though I did not try it.
I saw these functions but they're not exported to kernel modules so it
seems that I won't be able to use them from a kernel module.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-07 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07 7:12 add/delete VLANs programatically Eli Cohen
2008-09-07 10:58 ` Rami Rosen
2008-09-07 11:30 ` Eli Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).