netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: David Miller <davem@davemloft.net>
Cc: stephen@networkplumber.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net-sysfs: make flags symmetrical
Date: Mon, 01 Apr 2013 14:32:44 -0700	[thread overview]
Message-ID: <5159FCFC.1000407@candelatech.com> (raw)
In-Reply-To: <20130401.171858.2177408540657698898.davem@davemloft.net>

On 04/01/2013 02:18 PM, David Miller wrote:
> From: Ben Greear <greearb@candelatech.com>
> Date: Mon, 01 Apr 2013 13:16:43 -0700
>
>> I am depending on this feature.  There is no other way I know
>> of to determine if an interface is actually currently acting
>> PROMISC or not.
>
> Netlink interface dump, SIOGIFCONF, etc. should provide this
> information in one form or another.

 From looking elsewhere in my code, I think you are right, at least
about netlink.

The IFLA_PROMISCUITY field seems to give good results, but if you try
to parse the ifinfomsg->ifi_flags method, it may lie to you
and tell you the netdev is not PROMISSC when it really is PROMISC.

I haven't tried SIOGIFCONF...

Either way, I'd prefer the sysfs flags stay as is...while I have
the netlink interface coded up in my app, it is not exactly light
programming and other tools may find it much easier to use
the sysfs flags.  And, since I've been using the sysfs flags
to double-check netlink in some cases, I'll have to add yet more
hacks if this compatibility is broken in newer kernels...

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2013-04-01 21:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 18:53 [PATCH] net-sysfs: make flags symmetrical Stephen Hemminger
2013-04-01 20:16 ` Ben Greear
2013-04-01 21:18   ` David Miller
2013-04-01 21:32     ` Ben Greear [this message]
2013-04-01 22:04   ` Stephen Hemminger
2013-04-01 22:26     ` Ben Greear

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=5159FCFC.1000407@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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).