Viewing multicast group membership?

Robert Watson rwatson at freebsd.org
Mon Nov 10 10:16:48 PST 2003


On Mon, 10 Nov 2003, Bruce M Simpson wrote:

> Pardon me if this is an FAQ or answered somewhere else. 
> 
> I've had a quick skim through the man pages and the source, and can't
> seem to find a means of listing which IPv4 multicast groups a host is
> currently a member of. 
> 
> The net.igmp.stats sysctl only seems to maintain general protocol level
> statistics; it doesn't contain group information. This is the sysctl
> reported by 'netstat -g'. 
> 
> I guess I need to write some code to open /dev/kmem and walk
> ifmultihead.  Or does someone have a hack lying around for this I can
> clean up and commit? 

I can't speak to existing code for this, but I can say I have a preference
for having a sysctl version of the code available in the vague hopes that
someday we can drop the setgid kmem bit from netstat...

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Network Associates Laboratories



More information about the freebsd-net mailing list