Forum Discussion
Altera_Forum
Honored Contributor
17 years agohow to use multicast with Interniche
I am having problem of enabling multicast functionalitiy in the nichestack. Interniche website seems to claim it supports multicast I went in th ipport.h and moved IP_MULTICAST defin...
Altera_Forum
Honored Contributor
17 years agoHi
I am now able to set IP_MULTICAST_IF and IP_ADD_MEMBERSHIP options. It was a socket programming error: considere the following code : struct in_addr local_addr;
IP4_ADDR(local_address.s_addr,192,168,1,2);
if((setsockopt (sock, IPPROTO_IP, IP_MULTICAST_IF,&local_addr,sizeof(local_addr)))<0)
{
fprintf(stderr,"multicast_if failed\n");} But sendto always returns an error. Any idea? Thanks. Mikael.