On Thu, 2015-10-22 at 16:17 +0200, Gert Doering wrote: > Hi, > > On Thu, Oct 22, 2015 at 03:09:57PM +0100, David Woodhouse wrote: > > So Olli and Lev would appear to be saying. For OpenConnect I > > haven't > > actually tested this hypothesis. Unfortunately I'd need to > > reimplement > > the get_adapter_index stuff under LGPL first... > > Looking at our tun.c I wish I hadn't done that... but it seems that > using GetAdaptersinfo() should get you pretty far (which is what > get_adapter_index_method_2() uses under the hood)... > > But indeed, this direction seems to be non trivial...
It's not *that* hard. But I need to properly *understand* the how to do it so that I can write my own version from scratch and make 100% sure I'm not committing any cut-and-paste crimes, even via eyes and fingers and keyboard. And that means I need to understand the logic behind the two different get_adapter_index_methods, which is notably absent from the 2005 commit message which added get_adapter_index_method_2(). I don't understand why you're feeding get_adapter_index_method_1() a GUID prefixed with \DEVICE\TCPIP_ instead of a name, either, since the MSDN documentation for GetAdapterIndex() suggests that it takes the interface name. Hey, maybe that's why it didn't work and you had to invent a new method? Maybe I'm best not looking at your code at all :) But still, I'm not booting Windows today. Not for all the tea in China. -- dwmw2
smime.p7s
Description: S/MIME cryptographic signature