www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/13/14:21:50

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SARE_SUB_ENC_UTF8,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Bill Florac <bill DOT florac AT etcconnect DOT com>
Subject: Re: =?utf-8?b?SVBfUEtUSU5GTw==?= in cygwin
Date: Tue, 13 Jan 2009 19:20:51 +0000 (UTC)
Lines: 48
Message-ID: <loom.20090113T190942-489@post.gmane.org>
References: <loom DOT 20090113T021038-847 AT post DOT gmane DOT org> <20090113092630 DOT GT400 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:

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

So recvmsg() maps to WSARecvFrom() :( I suppose it should also return fail if 
the setsockopt() is called with an option that requires recvmsg() to get? And, 
perhaps recmsg() should also not be supported forcing users to use recvfrom()?

Well, what I need is a means to get the UDP (multicast) destination address. 
While it would be possible to make some other new function for this it seem to 
make the most since to use what currently exists (yet a bit obscure). It would 
also make the code more portable.

Bill





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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019