add GetIfEntry pointer

This commit is contained in:
Doug MacEachern 2005-12-19 22:49:12 +00:00
parent 1bdc07e971
commit 258ed193ca
2 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,8 @@ typedef DWORD (CALLBACK *LPGETIPFORWARDTABLE)(PMIB_IPFORWARDTABLE, PULONG, BOOL)
typedef DWORD (CALLBACK *LPGETIFTABLE)(PMIB_IFTABLE, PULONG, BOOL);
typedef DWORD (CALLBACK *LPGETIFENTRY)(PMIB_IFROW);
typedef DWORD (CALLBACK *LPGETTCPTABLE)(PMIB_TCPTABLE, PDWORD, BOOL);
typedef DWORD (CALLBACK *LPGETUDPTABLE)(PMIB_UDPTABLE, PDWORD, BOOL);
@ -293,6 +295,7 @@ struct sigar_t {
HINSTANCE sta_handle;
LPCONVERTSTRINGSID convert_string_sid;
LPGETIFTABLE get_if_table;
LPGETIFENTRY get_if_entry;
LPGETIPFORWARDTABLE get_ipforward_table;
LPGETTCPTABLE get_tcp_table;
LPGETTCPEXTABLE get_tcpx_table;

View File

@ -232,6 +232,8 @@ int sigar_os_open(sigar_t **sigar)
get_sysinfo(*sigar);
if ((h = LoadLibrary("iphlpapi.dll"))) {
(*sigar)->get_if_entry =
(LPGETIFENTRY)GetProcAddress(h, "GetIfEntry");
(*sigar)->get_if_table =
(LPGETIFTABLE)GetProcAddress(h, "GetIfTable");
(*sigar)->get_ipforward_table =