Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHi
Thanks for your response, I have just a little problem. I defined a dummy mcastlist() :int dummy_mcastlist(struct in_multi * multi_ptr)
{
USE_ARG(multi_ptr);
return 0;
} And I put this line just after Nichestack initialization extern int dummy_mcastlist(struct in_multi * multi_ptr)
...
while (!iniche_net_ready)
TK_SLEEP(1);
nets->n_mcastlist = dummy_mcastlist; Compilation is OK but setsockopt() fails on MULTICAST_IF : memset(&local_addr,0,sizeof(local_addr));
local_addr.sin_family = AF_INET;
local_addr.sin_port = htons(USED_PORT);
local_addr.sin_addr.s_addr = htonl(INADDR_ANY);
if((setsockopt (sock, IPPROTO_IP, IP_MULTICAST_IF,(char*) &local_addr,sizeof(local_addr)))<0)
{
fprintf(stderr,"multicast_if failed\n");} I am not able to send multicast packet. What's wrong? Have I to do some changes in allports.c? Thanks. Mikael.