Hi , we are using the Radio carbon - 13 board. In which we are using Lwip stack as a part of our network connection.
We were 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.
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.
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 and gives us the print statement i.e. not to able to join the socket.
Thanks for your help
*
[edited by: pullarao at 7:55 AM (GMT -4) on 14 May 2024]