This is the mail archive of the cygwin-patches 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: [PATCH] Re: IP_MULTICAST_IF et all / Winsock[2] value conflict


On Oct 18 09:32, Brian Ford wrote:
> On Mon, 17 Oct 2005, Corinna Vinschen wrote:
> > On Oct  3 12:25, Brian Ford wrote:
> > > On Mon, 3 Oct 2005, Corinna Vinschen wrote:
> > > > No, let's change it.  Winsock2 is the way to go.  Winsock1 is just old
> > > > stuff.  Since Cygwin is using Winsock2 when running on a 98 system or
> > > > above,
> 
> In some ways, I now believe this was not exactly true.
> 
> It appeared that [set|get]sockopt was formerly autoloaded from wsock32, so
> maybe the values were correct.  When I tried to investigate this further,
> I got really confused about how this was supposed to work together.
> 
> Neither of the two possible values for IP_MULTICAST_IF seemed to work
> correctly in my limited testing.  But, at the same time, changing the
> values for IP_ADD_MEMBERSHIP did not exhibit the failure described in the
> MSDN KB article either?  At this point, I ran out of time and my test
> system was shipped to a demo :-(.

I can't comment on your tests which would have required some debugging
*and* additionally looking into Microsoft's knowledge base.  Maybe
there's some similar registry tweak necessary as in the case of using
IP_TOS on Win2K and above.  Or something.

What I can comment about is what happened when loading set/getsockopt.
Regardless of being dynamically loaded from wsock32 or ws2_32, they
will always be the Winsock2 version on a Winsock2 system.  wsock32 is
more or less just a stub which redirects function calls to ws2_32.dll.

However, I hope that's a non-issue now that Winsock1 has been dropped.

> > I've just applied a patch, which does all of that, removing the last remains
> > of Winsock1 support, as well as changing the IPPROTO_IP values in
> > include/cygwin/socket.h to the new Winsock2 values, as well as checking
> > for the applications ABI version number so that older applications get
> > the values translated into the new Winsock2 values in setsockopt/getsockopt
> > on the fly.
> 
> Thank you.  I didn't really mean for you to have to do it, but I haven't
> had time to get back into the confusion.

No worries.


Corinna

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


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