From: Will Jhun <wjhun@cisco.com>
To: davem@redhat.com
Cc: greearb@candelatech.com, netdev@oss.sgi.com
Subject: Getting details about an 802.1q VLAN interface from userspace
Date: Thu, 13 Feb 2003 14:39:21 -0800 [thread overview]
Message-ID: <20030213143921.A21977@cisco.com> (raw)
Dave,
As stated below, I'm looking for a way to get specifics about an 802.1q
VLAN interface from userspace. Currently, I listen to NEWLINK messages
over a netlink socket and classify the different types of interfaces. I
identify these VLAN devices by their name (e.g. "eth0.10", admittedly
not a good idea since the vlan netdev name formats can vary) and
existence in /proc/net/vlan/config. This seems kind of gross.
Is there a better way to get this information via netlink or some
ioctl()? Would it be useful if I (or someone) added an ioctl() type to
get information about a VLAN interface? (vlan, ifindex of trunking
(real_dev) interface, priority maps; basically the content of struct
vlan_dev_info)
Thanks,
William
----- Forwarded message from Ben Greear <greearb@candelatech.com> -----
Date: Thu, 13 Feb 2003 14:09:41 -0800
From: Ben Greear <greearb@candelatech.com>
To: Will Jhun <wjhun@cisco.com>
Subject: Re: Determining if a new interface is an 802.1q VLAN interface
Will Jhun wrote:
> Ben,
>
> I have a program that listens for netlink NEWLINK updates and keeps
> track of interfaces in a system. I need to know if a new interface is an
> 802.1q VLAN interface and also what its trunking interface and vlan are.
> Right now, I'm just deducing these from the netdevice name and
> /proc/net/vlan/config, since it looks like the netdev's priv_flags is
> never exported to userspace, either by ioctl() or via netlink.
>
> Is there a better way to do this?
The flag that determines if an interface can handle VLAN is not currently
exported to user-space through any ioctl that I know of. Maybe we could
talk DaveM into adding such an ioctl?
The code would be simple enough if you could get Dave to accept it.
Please ask Dave, and CC me. (I didn't want to forward your
email w/out permission...)
Ben
>
> Thanks,
> William
>
--
Ben Greear <greearb@candelatech.com> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear
----- End forwarded message -----
next reply other threads:[~2003-02-13 22:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-13 22:39 Will Jhun [this message]
2003-02-18 2:29 ` Getting details about an 802.1q VLAN interface from userspace David S. Miller
2003-02-19 2:48 ` jamal
2003-02-19 3:13 ` David S. Miller
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=20030213143921.A21977@cisco.com \
--to=wjhun@cisco.com \
--cc=davem@redhat.com \
--cc=greearb@candelatech.com \
--cc=netdev@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).