X-Spam-Check-By: sourceware.org Date: Thu, 17 Aug 2006 11:29:19 -0500 From: Brian Ford Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: Cygwin 1.5.18: Problem using setsockopt() for multicast In-Reply-To: <20060817142909.GI20467@calimero.vinschen.de> Message-ID: References: <00cf01c6c203$da04b5b0$a501a8c0 AT CAM DOT ARTIMI DOT COM> <20060817142909 DOT GI20467 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Thu, 17 Aug 2006, Corinna Vinschen wrote: > On Aug 17 09:06, Brian Ford wrote: > > Oh yeah, you must call the setsockopt below after the bind on windows. > > Search MSDN for why. > > P.S.: Do you know the MSDN articel off-hand, maybe? http://support.microsoft.com/default.aspx?scid=kb;en-us;131978 Excerpt: For example: #define RECV_IP_ADDR "225.6.7.8" // arbitrary multicast address mreq.imr_multiaddr.s_addr = inet_addr(RECV_IP_ADDR); mreq.imr_interface.s_addr = INADDR_ANY; err = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&mreq, sizeof(mreq)) Note that it is necessary to bind to an address before calling the setsockopt() function. -- 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/