[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 02919) Re: How to send to ff02::1 through eth0 and eth2 with only one socket?



filipe abrantes <filipe_abrantes@xxxxxxxxxx> wrote on 04/20/2004 06:06:36 
PM:

> Are there any special configuration i can use so when i send packets to
> ff02::1 (or multicast addresses) it goes through both interfaces?

Most multicasting applications don't rely on the routing table to select
the interface. Instead, you probably want to set the "sin6_scope_id" to
the interface on which the packet should be sent. For example:

        tosin.sin6_scope_id = if_nametoindex("eth0");

before a "sendto" or "sendmsg" with "tosin" as the destination (and also
tosin with the sin6_addr of the multicast address).

        If you want to send to multiple interfaces, just change the
scope_id to a different interface and do another send.

                                                +-DLS