[erlang-questions] clarify: gen_udp Set outbound ip address

Serge Aleynikov <>
Tue Nov 13 04:42:50 CET 2007


Though I haven't tried this with multicast packets, I suppose it would 
work the same way as when a host has multiple interfaces and there's a 
need for an inbound UDP packet to contain the ip address of the 
interface it was received on.  This information is usually delivered as 
ancillary data (IP_RECVDSTADDR sockopt), however Erlang's inet driver 
doesn't support this feature.

Serge

mog wrote:
> Hi I am looking for a way to set the outbound ip address on udp packets.
> After the recent thread about multicast I started playing with it, and
> have it working great.  I am able to receive on the multicast address
> however sending out messages with gen_udp:send are received as the local
> ip of the interface, not as the multicast address.  Is there a way to
> enable this behavior?
> 
> Mog
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list