public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eli Cohen <eli@dev.mellanox.co.il>
To: Rami Rosen <roszenrami@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: add/delete VLANs programatically
Date: Sun, 7 Sep 2008 14:30:26 +0300	[thread overview]
Message-ID: <20080907113026.GA13354@mtls03> (raw)
In-Reply-To: <b25312890809070358t6a4b7296x778c2de01412ab6e@mail.gmail.com>

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.


      reply	other threads:[~2008-09-07 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080907113026.GA13354@mtls03 \
    --to=eli@dev.mellanox.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=roszenrami@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox