From owner-freebsd-net@FreeBSD.ORG Thu Oct 14 18:55:14 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92DCF16A4CE; Thu, 14 Oct 2004 18:55:14 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4431E43D45; Thu, 14 Oct 2004 18:55:14 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 7064C6546C; Thu, 14 Oct 2004 19:55:13 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 47189-05-5; Thu, 14 Oct 2004 19:55:12 +0100 (BST) Received: from empiric.dek.spc.org (adsl-67-121-95-134.dsl.snfc21.pacbell.net [67.121.95.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 76BF965458; Thu, 14 Oct 2004 19:54:51 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id A90CA6465; Thu, 14 Oct 2004 11:54:45 -0700 (PDT) Date: Thu, 14 Oct 2004 11:54:45 -0700 From: Bruce M Simpson To: Grigory Klyuchnikov Message-ID: <20041014185445.GD665@empiric.icir.org> Mail-Followup-To: Grigory Klyuchnikov , Brooks Davis , freebsd-net@freebsd.org, freebsd-questions@freebsd.org, snap-users@kame.net References: <416E82D9.80002@ispras.ru> <20041014150149.GB26684@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wLAMOaPNJ0fu1fTG" Content-Disposition: inline In-Reply-To: <20041014150149.GB26684@odin.ac.hmc.edu> cc: freebsd-net@freebsd.org cc: freebsd-questions@freebsd.org cc: snap-users@kame.net Subject: Re: Get multicast addresses from interface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2004 18:55:14 -0000 --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--