[or-cvs] r17123: {torvm} Add DHCP server to network info pulled from host interfaces. (torvm/trunk/build/win32/src/torvm-w32)
coderman at seul.org
coderman at seul.org
Thu Oct 16 01:56:52 UTC 2008
Author: coderman
Date: 2008-10-15 21:56:52 -0400 (Wed, 15 Oct 2008)
New Revision: 17123
Modified:
torvm/trunk/build/win32/src/torvm-w32/torvm.c
Log:
Add DHCP server to network info pulled from host interfaces.
Modified: torvm/trunk/build/win32/src/torvm-w32/torvm.c
===================================================================
--- torvm/trunk/build/win32/src/torvm-w32/torvm.c 2008-10-16 01:18:47 UTC (rev 17122)
+++ torvm/trunk/build/win32/src/torvm-w32/torvm.c 2008-10-16 01:56:52 UTC (rev 17123)
@@ -1149,6 +1149,19 @@
ce->netmask = strdup(name_data);
ldebug ("Connection %s netmask: %s.", ce->name, ce->netmask);
}
+ if (ce->isdhcp) {
+ len = sizeof (name_data);
+ status = RegQueryValueEx(tkey,
+ "DhcpServer",
+ NULL,
+ &name_type,
+ name_data,
+ &len);
+ if (status == ERROR_SUCCESS) {
+ ce->dhcpsvr = strdup(name_data);
+ ldebug ("Connection %s dhcp server: %s.", ce->name, ce->dhcpsvr);
+ }
+ }
RegCloseKey (tkey);
}
}
More information about the tor-commits
mailing list