Bug #663
closedMulticast server is not responding on sensor network
100%
Description
imlightsw is sending multicast announcement on sensor network but piboxd does not appear to be responding. I need to run debug on piboxd to see if it ever sees the request and, if it does, what happens when it tries to respond.
Updated by Hammel over 6 years ago
- Project changed from Iron Man to Monitor
- Category deleted (
Monitor)
Updated by Hammel over 6 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
It seems to me that specifying INADDR_ANY for the interface to add to the multicast group will tell the kernel to "pick" an interface as opposed to "pick all" interfaces. In order to add all interfaces (or at least the ones we want here) we need to
- call getifaddr to get a list of interfaces
- iterate through the list of interfaces
- If type is INET and entry->ifa_name != "lo0" and entry->ifa_addr != NULL
- struct sockaddr *foo = entry->ifa_addr
- in_addr ip_addr = ((sockaddr_in)foo).sin_addr;
- If type is INET and entry->ifa_name != "lo0" and entry->ifa_addr != NULL
Then
mreq.imr_multiaddr.s_addr=inet_addr(MULTICAST_IP); mreq.imr_interface.s_addr=htonl(ip_addr); if (setsockopt(sd,IPPROTO_IP,IP_ADD_MEMBERSHIP,&mreq,sizeof(mreq)) < 0) ...
Updated by Hammel over 6 years ago
Apparently, IBM agrees with me.
And here's an example of testing if each interface is a wireless interface or not.
Updated by Hammel over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 10 to 100
Implemented and tested on hardware. This fixes the problem of the monitor's piboxd not seeing the node's multicast request. Now it sees it.
Changes committed and pushed.
Closing issue.