Hi,
I’ve got a problem with this piece of code
(reduced) under QNX 6.3:
[color=darkred]sd = socket (PF_INET, SOCK_DGRAM, 0);
if (sd >= 0) {
mreq.imr_interface.s_addr = INADDR_ANY;
if(setsockopt (sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof (mreq)) !=0) {
//here goes error errno=EINVAL 
}
…
}
I looked in internet for something about this problem, but it looks I’m not alone with this .
I’ve tried many possibe combinations op IP’s in structure mreq but everytime it fail on EINVAL!
Is there problem in network interface of setsockopt?
Can anybody help me? Thanx.