In order to join a multicast group I am accustomed to having seeing code like this:
struct ip_mreqn mreq;
mreq.im_address.s_addr = INADDR_ANY
mreq.imr_ifindex = 0;
inet_aton("232.etc..", $mreq.imr_multiaddr);
setsockopt(descriptor, SOL_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));
Now I am running into an issue where someone is telling me this is a v2 igmp join request and that they require v3. Is this something that needs to be addressed in the code above or is it a hardware/network/os issue on the host running code like the above? What steps can I take to correct the above code if it is mistaken?
Now I am running into an issue where someone is telling me this is a v2 igmp join request and that they require v3.
At the moment it isn't any kind of a valid join request, as it doesn't specify a valid multicast group. INADDR_ANY is not a multicast group, it is strictly a bind-address. Multicast groups start at 224.0.0.0, but make sure you pick one that is legal for this use and available.
Whether the protocol engaged in when you get this right is V2 or V3 isn't affected by this code: it depends on what the UDP protocol stack does when you call it. You don't have any control over that. I can't see why 'someone' would require IGMP V3 either.