IP_PKTINFO in cygwin
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Jan 13 12:23:00 GMT 2009
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/
More information about the Cygwin
mailing list