Subject: Re: More sockets and link-local multicast questions
To: Nick Amato <email@example.com>
From: Andrew White <firstname.lastname@example.org>
Date: 10/11/2001 12:48:46
Nick Amato wrote:
> Shouldn't you be using:
> setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
> &mreq, sizeof(mreq));
> after using bind(2) to attach to port 9001?
Yep. That (deep down) is how I implement this step:
>> Socket sock_en0 joins mcast group 220.127.116.11 on en0. sock_en1 does
>> the same on en1.
It works as expected for a single socket joining a group on one or more
interfaces. The quirk is that if two different sockets join the same group
on two different interfaces, they BOTH get the packets from either
interface. Which leads me to suspect a feature, but I can't tell whether it
is in the implementation or my understanding.
That is for IPv4. In IPv6, it doesn't appear to be receiving at all, even
for an extremely simple test harness.
Andrew White Andrew.E.White@motorola.com