Achyuth Bhavanam
Achyuth Bhavanam

Reputation: 1

Joining a multicast group using the lwip stack

I am not able to join the multicast group using igmp_joingroup function which is present in igmp.c file. And for getting this igmp.c file i have included a folder named ipv4 in my includes path inside my rpu [application project] if,I try access i.e. include any of the files from this ipv4 folder in my code then my module stops pinging.

Thanks for your help Achyuth

I have tried another method as well for joining the multicast group but the thing is that the module is not joining that group. The following code is the one which i have used.

type here

 `struct ip_mreq mreq;
   mreq.imr_multiaddr.s_addr = inet_addr(SOCK_TARGET_HOST);
   mreq.imr_interface.s_addr = htonl(INADDR_ANY);
   if(setsockopt(Instance->Socket, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq))<0)
   {
         printf("not able to join the socket");
   }`

Everytime the return value of setsockopt comes out to be less than 0. Which is confirming that module has not joined the multicast group.

Upvotes: 0

Views: 76

Answers (0)

Related Questions