Configuring TCP/IP
I really want to be able to change the ip address, subnet mask, and default route from my program.
I''ve pretty much figured out how to do this under Linux, but would like it to work under NT (at least XP) as well.
Does anyone know how you even look-up the subnet mask and default route from code?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Perhaps you could use the following to get some of the information:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Adapters
In there there will be a key for each adapter and will contain an IpConfig value which points to a key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
Should give you lots of information about the TCP/IP settings for the adapter.
edit: Perhaps the correct way: IPHelper
Halo7
[edited by - Halo7 on January 14, 2004 12:45:37 AM]
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Adapters
In there there will be a key for each adapter and will contain an IpConfig value which points to a key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
Should give you lots of information about the TCP/IP settings for the adapter.
edit: Perhaps the correct way: IPHelper
Halo7
[edited by - Halo7 on January 14, 2004 12:45:37 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement