Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2008 17:13:15 +0000
From:      "Bruce M. Simpson" <bms@FreeBSD.org>
To:        Tom Judge <tom@tomjudge.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Programming interface MAC filter without enabling PROMISC on an interface from user space.
Message-ID:  <478B982B.304@FreeBSD.org>
In-Reply-To: <478B9020.3000402@tomjudge.com>
References:  <478B7AB7.5010208@tomjudge.com> <478B88EE.7090307@FreeBSD.org> <478B9020.3000402@tomjudge.com>

index | next in thread | previous in thread | raw e-mail

Tom Judge wrote:
> Thanks for the response.  I have a quick grep of the src tree to find 
> an example of this being used and only found the following from 
> wpa_supplicant and I have a few questions:
>
>     * I am presuming that this will do what I want, am I correct?

Yes, it will attempt to add the given link layer multicast group to the 
ifnet's underlying device driver.
>
>     * If I was only ever to add the address to an interface an never 
> delete it would this cause any problems?  I.e. when lldpd ends, or is 
> restarted and tries to add the address again?

SIOCADDMULTI is very low level, no resource tracking is performed; I 
changed its semantics to only allow one userland opener so that 
in-kernel refcounting would work, as there is no per-process or 
per-client resource tracking -- so it's a really good idea to clean up 
after it.

>
>     * Alternatively is there a way to query the filter to ask what 
> addresses it is currently programmed for?

Nope, there is no userland or kernel API for that unless you hack up the 
driver.

cheers
BMS


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?478B982B.304>