Multicast in Libbsd
Joel Sherrill
joel at rtems.org
Thu Jun 18 20:47:23 UTC 2020
Hi
I have an example FACE application I am trying to port to RTEMS. This is a
multi-question email:
First, it fails with EADDRNOTAVAIL on this call:
// Subscribe to multicast group
struct ip_mreq mreq;
rc = inet_pton(AF_INET, multicastGroup_m,
&mreq.imr_multiaddr.s_addr);
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
rc = setsockopt(
new_socket,
IPPROTO_IP,
IP_ADD_MEMBERSHIP,
&mreq,
sizeof(mreq)
);
I assume that is because there is no multicast route. On Linux, you have to
do an ifconfig and route to have a multicast route, but I haven't been able
to find a multicast setup example for FreeBSD. The Linux commands are:
ifconfig lo multicast
route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
I have an mcast listener and writer example from the Net that I am
beginning to turn into RTEMS test programs so there will be something less
complex than this application to debug and to help everyone in the future.
Does anyone have multicast working on libbsd? Know how to set it up on
FreeBSD?
Advice appreciated.
Thanks.
--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200618/f438e466/attachment.html>
More information about the devel
mailing list