This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin 1.5.18: Problem using setsockopt() for multicast
- From: Brian Ford <Brian dot Ford at FlightSafety dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 17 Aug 2006 08:45:01 -0500
- Subject: Re: Cygwin 1.5.18: Problem using setsockopt() for multicast
- References: <Pine.LNX.4.21.0608170139450.20778-100000@aass.oru.se>
- Reply-to: cygwin at cygwin dot com
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.
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/