Question about multicast groups in FreeBSD

Hans Petter Selasky hps at selasky.org
Mon Nov 16 09:24:03 UTC 2015


Hi,

Does FreeBSD have any IGMP APIs similar to Linux's "include/linux/igmp.h" ?

To join a multicast group, you would in Linux do:

 > + struct netdev *in_dev;
> +                   if (join)
> +                          ip_mc_inc_group(in_dev,
> +                                          *(__be32 *)(mgid->raw+12));
> +                   else
> +                          ip_mc_dec_group(in_dev,
> +                                          *(__be32 *)(mgid->raw+12));

Is there any equivalent to this in FreeBSD?

Thank you!

--HPS


More information about the freebsd-net mailing list