X-Spam-Check-By: sourceware.org
Date: Thu, 17 Aug 2006 09:46:41 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin 1.5.18: Problem using setsockopt() for multicast
Message-ID: <20060817074641.GB20467@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <Pine.LNX.4.21.0608170139450.20778-100000@aass.oru.se>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.21.0608170139450.20778-100000@aass.oru.se>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Aug 17 01:42, Alessandro Saffiotti wrote:
> Hi there,
> 
> 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:
> [...]
>   if(setsockopt(tcp_broadcast_receiver, IPPROTO_IP, IP_ADD_MEMBERSHIP, 
> 		(const void *)&imreq, sizeof(struct ip_mreq)) != 0)
> [...]
> I have also read the discussion about the conflicting values for
> constants between winsock1 and winsock2.  I have tried to replace
> IP_ADD_MEMBERSHIP by hardcoding either 5 (winsock1) or 12 (winsok2),
> but I get the same behavior.

Please don't do that, use the constants.

> I run Cygwin 1.5.18 on Windows XP pro SP2.
> 
> Any hints?

Yes, upgrade to Cygwin 1.5.21 and try again, starting with recompiling
the application.  If it still fails, I'll have another look into it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/

