Date: Thu, 14 Oct 2004 17:44:57 +0400 From: Grigory Klyuchnikov <grn@ispras.ru> To: snap-users@kame.net Cc: freebsd-questions@freebsd.org Subject: Get multicast addresses from interface Message-ID: <416E82D9.80002@ispras.ru>
next in thread | raw e-mail | index | archive | help
Hello,
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.
In net/if.h there is a struct ifma_msghdr:
/*
* Message format for use in obtaining information about multicast addresses
* from the routing socket
*/
struct ifma_msghdr {
u_short ifmam_msglen; /* to skip over non-understood messages */
u_char ifmam_version; /* future binary compatibility */
u_char ifmam_type; /* message type */
int ifmam_addrs; /* like rtm_addrs */
int ifmam_flags; /* value of ifa_flags */
u_short ifmam_index; /* index for associated ifp */
};
How it may be used?
Regards,
Grigory Klyuchnikov.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?416E82D9.80002>
