Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 2004 11:54:45 -0700
From:      Bruce M Simpson <bms@spc.org>
To:        Grigory Klyuchnikov <grn@ispras.ru>
Cc:        snap-users@kame.net
Subject:   Re: Get multicast addresses from interface
Message-ID:  <20041014185445.GD665@empiric.icir.org>
In-Reply-To: <20041014150149.GB26684@odin.ac.hmc.edu>
References:  <416E82D9.80002@ispras.ru> <20041014150149.GB26684@odin.ac.hmc.edu>

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

--wLAMOaPNJ0fu1fTG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 14, 2004 at 08:01:49AM -0700, Brooks Davis wrote:
> On Thu, Oct 14, 2004 at 05:44:57PM +0400, Grigory Klyuchnikov wrote:
> > How can a user process get IPv6 multicast addresses of ethernet
> > interfaces? I have FreeBSD 5.2.1 and get interface addresses
> > via ioctl(SIOCGIFCONF) or sysctl(witch NET_RT_IFLIST),
> > but all returned addresses are unicast.
>=20
> getifaddrs(3) and getifmaddrs(3) may do what you want.

See http://people.freebsd.org/~bms/dump/mcastlist/ for the original
code (harti@ submitted most of the kernel bits).

I didn't specifically set out to test getifmaddrs(3) with AF_INET6
addresses when I wrote it, but I seem to recall that it should work
with them, from testing.

If not, please feel free to submit a PR with a patch.

Thanks,
BMS

--wLAMOaPNJ0fu1fTG
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Comment: ''

iD8DBQFBbst0ueUpAYYNtTsRAoTVAKCmPExMZ0Ygr4sh+0+DSilzjqC/LgCePGnj
8dFceMisBn5Ekub+qhYUqls=
=Zy9O
-----END PGP SIGNATURE-----

--wLAMOaPNJ0fu1fTG--



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