This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: missing ipi_spec_dst in struct in_pktinfo

On Sep  4 16:10, 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
> ( 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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]