undocumented multicast

Vance Shipley <>
Thu Mar 13 21:34:26 CET 2003

On Thu, Mar 13, 2003 at 01:45:35PM +0100, Miguel Barreiro Paz wrote:
}  > Can someone tell me the syntax of the undocumented multicast options? I
}  > thought I had figured it out but I still can't make it happy.  I was
}  	For some strange coincidence I was doing exactly the same today
}  and having the same exact problem :-)

OK, problem solved.  Actually it was solved in December of 2001:


I was reaching the exact same conclusion when what I was looking at 
jogged my memory.  In any event I am posting a patch against R9B-1 
to teh patches list.  Here is the (undocumented) syntax:

   gen_udp:open(9875, [{add_membership, {{224,2,127,254},{192,197,189,3}}}]).

I tested this like this:

1> compile:file(inet, [{i, "/usr/local/lib/erlang/lib/kernel-2.8.0/src"}]).
2> code:unstick_dir("/usr/local/lib/erlang/lib/kernel-2.8.0/ebin").
3> code:load_file(inet).
4> code:which(inet).
5> gen_udp:open(9875, [{add_membership, {{224,2,127,254},{192,197,189,3}}}]).

To verify that it works:

$ netstat -ia
Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
tx1   1500  192.197.189   frogman           703469     -     4233     -     -

The line SAP.MCAST.NET is mine.


More information about the erlang-questions mailing list