[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 02885) IPv6 and multicast... again.
- To: USAGI users <usagi-users@xxxxxxxxxxxxxx>
- Subject: (usagi-users 02885) IPv6 and multicast... again.
- From: Ignacy Gawedzki <ig@xxxxxxxxxxxxx>
- Date: Fri, 2 Apr 2004 12:06:53 +0200
- Reply-to: usagi-users@xxxxxxxxxxxxxx
- Resent-date: Fri, 2 Apr 2004 20:07:29 +0900
- Resent-from: sekiya@xxxxxxxxxxxxxx
- Resent-message-id: <200404022007.FMLAAB1444.usagi-users@linux-ipv6.org>
- Resent-to: usagi-users@xxxxxxxxxxxxxx (moderated)
- User-agent: Mutt/1.5.4i
Hi list,
I must be doing something wrong, but cannot find any relevant
information anywhere.
Again about multicast. The big picture goes like this: I want to be
able to "broadcast" UDP packets separately on several interfaces.
After having some trouble caused by incorrect socket binding, my code
does the following in this order:
1. Bind the socket to the interface using SO_BINDTODEVICE.
2. Bind the socket to ff05::1 and port 698.
3. Set the multicast interface using IPV6_MULTICAST_IF.
4. Set the number of hops using IPV6_MULTICAST_HOPS.
5. Join group ff05::1 using IPV6_ADD_MEMBERSHIP.
6. Disable looping using IPV6_MULTICAST_LOOP.
Then packets are sent using sendto and received using recvfrom.
But still, it seems that the kernel ignores the attachment to the
interface and sends packets to another unused interface, which happens
to be the first in the routing table for prefix ff00::/8.
I can't figure out what I'm doing wrong.
The SO_BINDTODEVICE is necessary to allow binding several sockets to the
same multicast address. I tried with step 2 in different places, to no
avail.
I'm using kernel 2.4.25 with USAGI 20040315. I'm about to test with the
latest snap.
Any ideas?
--
Sex on TV doesn't hurt....unless you fall off.