<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 18.06.20 22:47, Joel Sherrill wrote:<br>
</p>
<blockquote type="cite"
cite="mid:CAF9ehCXX_s5PBZNo1HzgT+hPvtxz1f2mcUXm5mQxntuAUoqJsQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi
<div><br>
</div>
<div>I have an example FACE application I am trying to port to
RTEMS. This is a multi-question email:</div>
<div><br>
</div>
<div>First, it fails with EADDRNOTAVAIL on this call:</div>
<div><br>
</div>
<div> // Subscribe to multicast group<br>
struct ip_mreq mreq;<br>
rc = inet_pton(AF_INET, multicastGroup_m,
&mreq.imr_multiaddr.s_addr);<br>
mreq.imr_interface.s_addr = htonl(INADDR_ANY);<br>
rc = setsockopt(<br>
new_socket, <br>
IPPROTO_IP, <br>
IP_ADD_MEMBERSHIP, <br>
&mreq, <br>
sizeof(mreq)<br>
);<br>
</div>
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div> ifconfig lo multicast<br>
route add -net 224.0.0.0 netmask 240.0.0.0 dev lo<br>
</div>
</div>
</blockquote>
<p>This:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://gist.github.com/hostilefork/f7cae3dc33e7416f2dd25a402857b6c6">https://gist.github.com/hostilefork/f7cae3dc33e7416f2dd25a402857b6c6</a></p>
<p>Compiles and run without any special configuration on FreeBSD
12.1</p>
<p>The handbook claims that "<span style="caret-color: rgb(0, 0, 0);
color: rgb(0, 0, 0); font-family: sans-serif; font-size: medium;
font-style: normal; font-variant-caps: normal; font-weight:
normal; letter-spacing: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: auto; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
text-decoration: none; display: inline !important; float: none;">Multicast
applications do not require any special configuration in order
to run on FreeBSD"</span></p>
<p><a class="moz-txt-link-freetext" href="https://www.freebsd.org/doc/handbook/network-routing.html">https://www.freebsd.org/doc/handbook/network-routing.html</a></p>
<p>Following is the routing table on a FreeBSD jail with no special
224 route needed.</p>
<p>Cédric</p>
<p># netstat -nr<br>
Routing tables<br>
<br>
Internet:<br>
Destination Gateway Flags Netif Expire<br>
default 172.18.12.1 UGS epair25b<br>
127.0.0.1 link#1 UH lo0<br>
172.18.12.0/24 link#3 U epair25b<br>
172.18.12.25 link#3 UHS lo0<br>
<br>
Internet6:<br>
Destination Gateway
Flags Netif Expire<br>
::/96 ::1
UGRS lo0<br>
::1 link#1
UH lo0<br>
::ffff:0.0.0.0/96 ::1
UGRS lo0<br>
fe80::/10 ::1
UGRS lo0<br>
fe80::%lo0/64 link#1
U lo0<br>
fe80::1%lo0 link#1
UHS lo0<br>
ff02::/16 ::1
UGRS lo0<br>
</p>
<p><br>
</p>
</body>
</html>