Cygwin 1.5.18: Problem using setsockopt() for multicast

Václav Haisman v.haisman@sh.cvut.cz
Thu Aug 17 13:59:00 GMT 2006


Brian Ford wrote:
> On Thu, 17 Aug 2006, Alessandro Saffiotti wrote:
> 
>> I ran into the following problem when using setsockopt to create a
>> multicast receiver in my own application.  Here is the relevant part
>> of the code:
>>
>>   tcp_broadcast_receiver = socket(PF_INET,SOCK_DGRAM,IPPROTO_IP);
>>
>>   memset(&imreq, 0, sizeof(struct ip_mreq));
>>   imreq.imr_multiaddr.s_addr = inet_addr("227.1.3.5");
>>   imreq.imr_interface.s_addr = INADDR_ANY;
> 
> INADDR_ANY is in host byte order, but you need network order for this
> call.
> 
INADDR_ANY is 0 (zero), so that should not cause any problem anywhere.

--
VH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 542 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060817/57957d49/attachment.sig>


More information about the Cygwin mailing list