X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 13 Jan 2009 10:26:30 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: IP_PKTINFO in cygwin Message-ID: <20090113092630.GT400@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: 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 Jan 13 02:26, Bill Florac wrote: > Does cygwin support the setsockopt() - IP_PKTINFO to retreive the destination > address of a incomming UDP packet received via recvmsg()? I have made > numberous attempts but CMSG_FIRSTHDR() always returns NULL. The same code > works find under linux. I'm guessing that cygwin is using winsock underneath That's right. > and I beleive this would only be available under winsock 2.2. Is there a > means to build cygwin to complile with this version of winsock? No, that's not possible, since it doesn't work that way. Cygwin is using OS functions to emulate POSIX functionality, so calling Cygwin's recvmsg is not just a direct call to the equivalent Winsock function WSARecvMsg. WSARecvMsg is only available starting with Windows XP. Earlier systems only have WSARecvFrom, so that's what Cygwin is using under the hood to support older OS versions as well. The sendmsg/recvmsg control data functionality wasn't that important so far. In theory, that can be changed for Cygwin 1.7 so that WSARecvMsg is used on XP and later, but that requires more work than just replacing WSARecvFrom with WSARecvMsg. I'm not even sure our header files are sufficient for that. I'm rather reluctant to change that right now, but that's certainly something to consider for a later release. Final note: http://cygwin.com/acronyms/#PTC 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/