[netcf-devel] administering device states on windows

Laine Stump laine at laine.org
Wed Oct 27 18:11:05 UTC 2010


  On 10/27/2010 12:04 PM, Adam Stokes wrote:
> So I've been steadily coding a netcf port for windows and have run into
> a bit of a snag. The win32 api provides some routines for doing some
> basic administration tasks on interfaces. However, there isn't any
> routines to perform simple actions such as completely
> disabling/enabling a device. My question to the maintainers is would
> you reject some of the windows api calling binaries such as devcon.exe
> or netsh.exe for altering device states?

As long as that is the generally accepted method of performing that 
task, the interface is stable, and it doesn't violate any licenses to 
distribute code that does it (I'm assuming you're just using some 
equivalent to "system()", right?), I don't have any problem with it.

As an example on Linux, netcf execs /sbin/ifup and /sbin/ifdown to bring 
the interfaces up and down rather than doing whatever it would take to 
do that with libnl API calls (and whatever else would be needed). That 
seems more or less analogous to what you're proposing.



More information about the netcf-devel mailing list