diff options
Diffstat (limited to 'psutil/arch')
-rw-r--r-- | psutil/arch/windows/global.c | 5 | ||||
-rw-r--r-- | psutil/arch/windows/global.h | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/psutil/arch/windows/global.c b/psutil/arch/windows/global.c index 9ead780a..b8bf8162 100644 --- a/psutil/arch/windows/global.c +++ b/psutil/arch/windows/global.c @@ -88,6 +88,11 @@ psutil_load_globals() { if (! psutil_GetExtendedTcpTable) return 1; + psutil_GetExtendedUdpTable = ps_GetProcAddressFromLib( + "iphlpapi.dll", "GetExtendedUdpTable"); + if (! psutil_GetExtendedUdpTable) + return 1; + // Optionals. psutil_GetActiveProcessorCount = ps_GetProcAddress( diff --git a/psutil/arch/windows/global.h b/psutil/arch/windows/global.h index 323d2c6d..69a1fd6c 100644 --- a/psutil/arch/windows/global.h +++ b/psutil/arch/windows/global.h @@ -19,6 +19,8 @@ typedef DWORD (CALLBACK *_GetActiveProcessorCount)(WORD); typedef ULONGLONG (CALLBACK *_GetTickCount64)(void); typedef DWORD (WINAPI * _GetExtendedTcpTable)(PVOID, PDWORD, BOOL, ULONG, TCP_TABLE_CLASS, ULONG); +typedef DWORD (WINAPI * _GetExtendedUdpTable)(PVOID, PDWORD, BOOL, ULONG, + UDP_TABLE_CLASS, ULONG); _RtlIpv4AddressToStringA \ @@ -48,4 +50,8 @@ _GetTickCount64 \ _GetExtendedTcpTable \ psutil_GetExtendedTcpTable; +_GetExtendedUdpTable \ + psutil_GetExtendedUdpTable; + + int psutil_load_globals(); |