<html><head></head><body><div>Peter,</div><div><br></div><div>I will have a look at the compilation problems before the end of this working week.<br><br><div class="acompli_signature">Sent from <a href="https://aka.ms/qtex0l">Outlook Mobile</a></div><br></div><br><br><br>
<div class="gmail_quote">On Tue, Apr 12, 2016 at 8:48 AM -0700, "Peter Morgan" <span dir="ltr"><<a href="mailto:peter.james.morgan@gmail.com" target="_blank">peter.james.morgan@gmail.com</a>></span> wrote:<br>
<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="3D"ltr"">
<meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">Hi Radek,</div><div class=""><br class=""></div><div class="">Thanks - Yes, I have had multicast working previously on OSX and Linux way back somewhere in 2011 with <a href="https://github.com/shortishly/mdns" class="">https://github.com/shortishly/mdns</a>.</div><div class=""><br class=""></div><div class="">I had some trouble compiling gossiperl - I tried with R18 but the rebar.config needed R17, when I tried with R17 one of the dependencies required R18. Do you have another branch that I missed?</div><div class=""><br class=""></div><div class="">My issue seems to be that I can receive multicast on OSX, but I cannot send…</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Peter.</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 7 Apr 2016, at 15:39, Rad Gruchalski <<a href="mailto:radek@gruchalski.com" class="">radek@gruchalski.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
                <div class="">
                    Hi Peter,
                </div><div class=""><br class=""></div><div class="">Multicast works absolutely fine on OSX. Here is how multicast is enabled:</div><div class=""><a href="https://github.com/gossiperl/gossiperl/wiki/multicast-overlays#setting-up-multicast-on-os-x" class="">https://github.com/gossiperl/gossiperl/wiki/multicast-overlays#setting-up-multicast-on-os-x</a></div>
                <div class=""><div class=""><br class=""></div><div class="">And then using the multicast options:</div><div class=""><a href="https://github.com/gossiperl/gossiperl/blob/master/include/gossiperl.hrl#L107" class="">https://github.com/gossiperl/gossiperl/blob/master/include/gossiperl.hrl#L107</a></div><div class=""><br class=""></div><div class="">Works perfect on Linux, OSX and RPi.</div><div style="font-family: Helvetica; font-size: 10pt; margin-bottom: 0cm;" class="">
                
                
                


<br class="webkit-block-placeholder"></div><div style="font-family: Helvetica; font-size: 10pt; margin-bottom: 0cm;" class="">
                
                
                


<br class="webkit-block-placeholder"></div><div style="margin-bottom: 0cm;" class="">
                
                
                


<br class="webkit-block-placeholder"></div><p style="margin-bottom: 0cm" class=""><font class=""><font face="Helvetica, sans-serif" class=""><font style="font-size: 9pt" class="">Best regards,
<br class="">Radek
Gruchalski<br class="">
</font></font></font><font face="Helvetica, sans-serif" class=""><font style="font-size: 9pt" class=""><a href="mailto:radek@gruchalski.com" class="">radek@gruchalski.com</a><a href="mailto:radek@gruchalski.com" class="">
</a></font></font><font color="#0084d1" class=""><font face="Helvetica, sans-serif" class=""><font style="font-size: 9pt" class=""><br class=""></font></font></font><a href="http://de.linkedin.com/in/radgruchalski/" class=""><font color="#0084d1" class=""><font face="Helvetica, sans-serif" class=""><font style="font-size: 9pt" class="">de.linkedin.com/in/radgruchalski/</font></font></font></a><font class=""><font face="Helvetica, sans-serif" class=""><font style="font-size: 9pt" class=""><br class=""><br class=""></font></font></font><font color="#878787" class=""><font face="Helvetica, sans-serif" class=""><font style="font-size: 8pt" class=""><b class="">Confidentiality:<br class=""></b></font></font></font><font color="#878787" class=""><font face="Helvetica, sans-serif" class=""><font style="font-size: 8pt" class="">This
communication is intended for the above-named person and may be
confidential and/or legally privileged.<br class="">If it has come to you in
error you must take no action based on it, nor must you copy or show
it to anyone; please delete/destroy and inform the sender
immediately.</font></font></font></p></div><p style="color: #A0A0A8;" class="">On Thursday, 7 April 2016 at 16:14, Peter Morgan wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;" class="">
                    <span class=""><div class=""><div class=""><div class="">Hello -</div><div class=""><br class=""></div><div class="">I’m having some trouble getting UDP multicast working on OSX, whereas the same code on Linux works fine.</div><div class=""><br class=""></div><div class="">On linux (fedora 23):</div><div class=""><br class=""></div><div class="">[pmorgan@dev001 ~]$ erl</div><div class="">Erlang/OTP 18 [erts-7.3] [source] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]</div><div class=""><br class=""></div><div class="">Eshell V7.3  (abort with ^G)</div><div class="">1> Address = {224, 0, 0, 251}.</div><div class="">{224,0,0,251}</div><div class="">2> Port = 5353.</div><div class="">5353</div><div class="">3> {ok, Socket} = gen_udp:open(Port, [binary, {ip, Address}, {add_membership, {Address, {0,0,0,0}}}, {reuseaddr, true}]).</div><div class="">{ok,#Port<0.543>}</div><div class="">4> gen_udp:send(Socket, Address, Port, <<"hello world">>).</div><div class="">ok</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Whereas on OSX:</div><div class=""><br class=""></div><div class="">Office-iMac:mdns pmorgan$ sw_vers </div><div class="">ProductName:        Mac OS X</div><div class="">ProductVersion:       10.11.4</div><div class="">BuildVersion:  15E61b</div><div class=""><br class=""></div><div class="">Office-iMac:mdns pmorgan$ erl</div><div class="">Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]</div><div class=""><br class=""></div><div class="">Eshell V7.3  (abort with ^G)</div><div class="">1> Address = {224, 0, 0, 251}.</div><div class="">{224,0,0,251}</div><div class="">2> Port = 5353.</div><div class="">5353</div><div class="">3> {ok, Socket} = gen_udp:open(Port, [binary, {ip, Address}, {add_membership, {Address, {0,0,0,0}}}, {reuseaddr, true}]).</div><div class="">{ok,#Port<0.553>}</div><div class="">4> gen_udp:send(Socket, Address, Port, <<"hello world">>).</div><div class="">{error,eaddrnotavail}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I’ve tried various other options in gen_udp:open/2, but not found a combination that works for OSX. Any ideas please? The above is a simplified test case of <a href="https://github.com/shortishly/mdns/blob/master/src/mdns_udp.erl#L41-L49" class="">https://github.com/shortishly/mdns/blob/master/src/mdns_udp.erl#L41-L49</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Peter.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">_______________________________________________</div><div class="">erlang-questions mailing list</div><div class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a></div><div class=""><a href="http://erlang.org/mailman/listinfo/erlang-questions" class="">http://erlang.org/mailman/listinfo/erlang-questions</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div class="">
                    <br class="">
                </div>
            </div></blockquote></div><br class="">
</div>

</blockquote>
</div>
</body></html>