public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: missing ipi_spec_dst in struct in_pktinfo
Date: Sat, 05 Sep 2009 16:12:00 -0000	[thread overview]
Message-ID: <20090905161229.GA1869@calimero.vinschen.de> (raw)
In-Reply-To: <OF10653B86.82265559-ON85257627.006D9ED5-85257627.006ED0E7@epamail.epa.gov>

On Sep  4 16:10, Schulman.Andrew@epamail.epa.gov wrote:
> 
> I'm trying to build socat for Cygwin (1.7).  The build fails with
> 
> xio-ip.c:480: error: structure has no member named `ipi_spec_dst'
> 
> The offending code wants to use pktinfo->ipi_spec_dst.s_addr, where
> pktinfo is a struct in_pktinfo *.  The problem is that in Cygwin,
> in_pktinfo doesn't have an ipi_spec_dst member.  The IP man page
> (http://homepages.cwi.nl/~aeb/linux/man2html/man7/ip.7.html) lists
> in_pktinfo as
> 
> struct in_pktinfo {
>     unsigned int   ipi_ifindex;  /* Interface index */
>     struct in_addr ipi_spec_dst; /* Local address */
>     struct in_addr ipi_addr;     /* Header Destination address */
> };
> 
> while in /usr/include/cygwin/in.h, it's just
> 
> struct in_pktinfo
> {
>   struct in_addr ipi_addr;
>   uint32_t       ipi_ifindex;
> };
> 
> Any suggestions for a workaround to this problem?  Why is ipi_spec_dst
> missing, and more to the point, what can/should I substitute in its
> place?

ipi_spec_dst is missing because the Winsock structure in_pktinfo is
defined without this field.  The recvmsg function will return the
Winsock equivalent to this structure, since that's how it gets it from
Windows.  The workaround is easy: Don't use that field.  Disable the code
in socat which uses it.  Even if we would go to great lengths to
add/remove the field when calling WSASendMsg/WSARecvMsg, it would be
entirely meaningless anyway.


Corinna

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

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2009-09-05 16:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04 20:10 Schulman.Andrew
2009-09-04 21:09 ` Christopher Faylor
2009-09-05 16:12 ` Corinna Vinschen [this message]
2009-09-08 14:38   ` Andrew Schulman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090905161229.GA1869@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).