I have a PC with 2 ethernet cards and I want to receive multicast packets from both the cards: so I have to bind the UDP socket to every IP address on the PC (<a href="http://10.1.0.39">10.1.0.39</a> and <a href="http://192.168.0.1">
192.168.0.1</a>).<br><br>I try to do:<br><br>...<br><br>const IPv4 local_addr = IPv4Constants::any //equivalent to INADDR_ANY<br><br>_xrl_socket4_client.send_udp_open_bind_join(_socket4_target.c_str(), xrl_router().instance_name(),
<br> local_addr, default_udp_port, default_multicast_group, ttl, reuse,<br> callback(this, &XrlPolidistNode::send_udp_open_bind_join_cb));<br><br><br>...<br><br>The error from rtrmgr is this:
<br><br>[ 2007/10/03 14:12:11 WARNING xorp_fea XrlFeaTarget ] Handling method for socket4/0.1/udp_open_bind_join failed: XrlCmdError 102 Command failed Cannot open, bind and join an UDP socket to address ZERO: the address must belong to a local interface
<br><br>The solution to this problem is to bind to a specific ipv4 address (I bind to <a href="http://10.1.0.39">10.1.0.39</a>), but if I bind the socket on a specific address I can't receive multicast packets from the other card, also when I join the multicast group on this interface.
<br><br>In the end, I try also to bind the same socket on both the addresses, but the second time there is an error, probably because it's possible to call once the bind on the same socket.<br><br>Someone could help me?
<br><br>Thanks,<br>Luca Giraudo<br><br>