View Single Post
  #3   (View Single Post)  
Old 20th May 2013
unkmail unkmail is offline
New User
 
Join Date: May 2013
Posts: 6
Default

Quote:
Originally Posted by J65nko View Post
How about adding the missing route?
Thanks for yours reply!
Sure, yours solution shuld works. But actualy it makes lo2 "primary network interface" for multicast traffic.
My goal send few datagrams from an interface without modifying system wide defaults.

man 4 ip:
Quote:
For hosts with multiple interfaces, each multicast transmission is sent
from the primary network interface. The IP_MULTICAST_IF option overrides
the default for subsequent transmissions from a given socket:

struct in_addr addr;
setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr));

where addr is the local IP address of the desired interface or INADDR_ANY
to specify the default interface. An interface's local IP address and
multicast capability can be obtained via the SIOCGIFCONF and SIOCGIFFLAGS
ioctl(2)'s. Normal applications should not need to use this option.
sounds like this should allow what I want... but don't works. maybe I misunderstood something?

ps: sorry for my english.

Last edited by unkmail; 20th May 2013 at 12:51 PM. Reason: spelling
Reply With Quote