But what I've found in practice is that it only ends up listening on one
of the interfaces (but if I disable that one, then after a program
restart it will listen on the other). Similarly for sending, it will
just pick one of the interfaces that are up when the program is started,
and stick with it for the entire run of the program. I haven't noticed
a pattern either in which interface gets picked.
Does anyone have any suggestions on how I can accomplish the
multi-interface behavior I need, both on send and receive? I was
considering setting up a virtual interface and tunneling to/from all
other interfaces, but I'm not sure if this is possible or would work
with the UDP multicast.
Thanks,
--Pritpaul
There's no good way for a single LCM instance to listen on multiple
interfaces at once. One thing you can try is to create multiple
instances attached to different multicast addresses, and then set
network routes to attach those addresses to different interfaces.
e.g.,
lcm_t* lcm1 = lcm_create("udpm://239.255.100.1")
lcm_t* lcm2 = lcm_create("udpm://239.255.100.2")
Then, if you're running linux, you can do:
$ sudo route add -net 239.255.100.1 netmask 255.255.255.255 dev eth0
$ sudo route add -net 239.255.100.2 netmask 255.255.255.255 dev eth1
or something like that. You'll need to take care of publishing and
subscribing to both instances yourself.
Albert
> --
> You received this message because you are subscribed to the Google Groups
> "Lightweight Communications and Marshalling" group.
> To post to this group, send email to lcm-...@googlegroups.com.
> To unsubscribe from this group, send email to
> lcm-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/lcm-users?hl=en.
>