Process Hacker
main.h File Reference
#include <phdk.h>
#include <phappresource.h>
#include <ws2def.h>
#include <ws2ipdef.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>
#include <nldef.h>
#include <netioapi.h>
#include "resource.h"

Go to the source code of this file.

Data Structures

struct  _PH_NETADAPTER_ENTRY
 
struct  _PH_NETADAPTER_CONTEXT
 
struct  _PH_NETADAPTER_SYSINFO_CONTEXT
 

Macros

#define PLUGIN_NAME   L"ProcessHacker.NetAdapters"
 
#define SETTING_NAME_ENABLE_NDIS   (PLUGIN_NAME L".EnableNDIS")
 
#define SETTING_NAME_INTERFACE_LIST   (PLUGIN_NAME L".InterfaceList")
 
#define CINTERFACE
 
#define COBJMACROS
 
#define BITS_IN_ONE_BYTE   8
 
#define NDIS_UNIT_OF_MEASUREMENT   100
 

Typedefs

typedef struct _PH_NETADAPTER_ENTRY PH_NETADAPTER_ENTRY
 
typedef struct
_PH_NETADAPTER_ENTRY
PPH_NETADAPTER_ENTRY
 
typedef struct
_PH_NETADAPTER_CONTEXT 
PH_NETADAPTER_CONTEXT
 
typedef struct
_PH_NETADAPTER_CONTEXT
PPH_NETADAPTER_CONTEXT
 
typedef struct
_PH_NETADAPTER_SYSINFO_CONTEXT 
PH_NETADAPTER_SYSINFO_CONTEXT
 
typedef struct
_PH_NETADAPTER_SYSINFO_CONTEXT
PPH_NETADAPTER_SYSINFO_CONTEXT
 
typedef ULONG(WINAPI * _GetIfEntry2 )(_Inout_ PMIB_IF_ROW2 Row)
 
typedef ULONG(WINAPI * _GetInterfaceDescriptionFromGuid )(_Inout_ PGUID InterfaceGuid, _Out_opt_ PWSTR InterfaceDescription, _Inout_ PSIZE_T LengthAddress, PVOID Unknown1, PVOID Unknown2)
 

Functions

VOID LoadAdaptersList (_Inout_ PPH_LIST FilterList, _In_ PPH_STRING String)
 
VOID ShowOptionsDialog (_In_ HWND ParentHandle)
 
VOID NetAdapterSysInfoInitializing (_In_ PPH_PLUGIN_SYSINFO_POINTERS Pointers, _In_ PPH_NETADAPTER_ENTRY AdapterInfo)
 
BOOLEAN NetworkAdapterQuerySupported (_In_ HANDLE DeviceHandle)
 
BOOLEAN NetworkAdapterQueryNdisVersion (_In_ HANDLE DeviceHandle, _Out_opt_ PUINT MajorVersion, _Out_opt_ PUINT MinorVersion)
 
PPH_STRING NetworkAdapterQueryName (_Inout_ PPH_NETADAPTER_SYSINFO_CONTEXT Context)
 
NTSTATUS NetworkAdapterQueryStatistics (_In_ HANDLE DeviceHandle, _Out_ PNDIS_STATISTICS_INFO Info)
 
NTSTATUS NetworkAdapterQueryLinkState (_In_ HANDLE DeviceHandle, _Out_ PNDIS_LINK_STATE State)
 
BOOLEAN NetworkAdapterQueryMediaType (_In_ HANDLE DeviceHandle, _Out_ PNDIS_PHYSICAL_MEDIUM Medium)
 
NTSTATUS NetworkAdapterQueryLinkSpeed (_In_ HANDLE DeviceHandle, _Out_ PULONG64 LinkSpeed)
 
ULONG64 NetworkAdapterQueryValue (_In_ HANDLE DeviceHandle, _In_ NDIS_OID OpCode)
 
MIB_IF_ROW2 QueryInterfaceRowVista (_Inout_ PPH_NETADAPTER_SYSINFO_CONTEXT Context)
 
MIB_IFROW QueryInterfaceRowXP (_Inout_ PPH_NETADAPTER_SYSINFO_CONTEXT Context)
 

Variables

PPH_PLUGIN PluginInstance
 
PPH_LIST NetworkAdaptersList
 
HMODULE IphlpHandle
 
_GetIfEntry2 GetIfEntry2_I
 
_GetInterfaceDescriptionFromGuid GetInterfaceDescriptionFromGuid_I
 

Macro Definition Documentation

#define BITS_IN_ONE_BYTE   8

Definition at line 107 of file main.h.

#define CINTERFACE

Definition at line 32 of file main.h.

#define COBJMACROS

Definition at line 33 of file main.h.

#define NDIS_UNIT_OF_MEASUREMENT   100

Definition at line 108 of file main.h.

#define PLUGIN_NAME   L"ProcessHacker.NetAdapters"

Definition at line 28 of file main.h.

#define SETTING_NAME_ENABLE_NDIS   (PLUGIN_NAME L".EnableNDIS")

Definition at line 29 of file main.h.

#define SETTING_NAME_INTERFACE_LIST   (PLUGIN_NAME L".InterfaceList")

Definition at line 30 of file main.h.

Typedef Documentation

typedef ULONG(WINAPI* _GetIfEntry2)(_Inout_ PMIB_IF_ROW2 Row)

Definition at line 110 of file main.h.

typedef ULONG(WINAPI* _GetInterfaceDescriptionFromGuid)(_Inout_ PGUID InterfaceGuid, _Out_opt_ PWSTR InterfaceDescription, _Inout_ PSIZE_T LengthAddress, PVOID Unknown1, PVOID Unknown2)

Definition at line 115 of file main.h.

Function Documentation

VOID LoadAdaptersList ( _Inout_ PPH_LIST  FilterList,
_In_ PPH_STRING  String 
)

Definition at line 71 of file options.c.

VOID NetAdapterSysInfoInitializing ( _In_ PPH_PLUGIN_SYSINFO_POINTERS  Pointers,
_In_ PPH_NETADAPTER_ENTRY  AdapterInfo 
)

Definition at line 617 of file graph.c.

NTSTATUS NetworkAdapterQueryLinkSpeed ( _In_ HANDLE  DeviceHandle,
_Out_ PULONG64  LinkSpeed 
)

Definition at line 327 of file ndis.c.

NTSTATUS NetworkAdapterQueryLinkState ( _In_ HANDLE  DeviceHandle,
_Out_ PNDIS_LINK_STATE  State 
)

Definition at line 230 of file ndis.c.

BOOLEAN NetworkAdapterQueryMediaType ( _In_ HANDLE  DeviceHandle,
_Out_ PNDIS_PHYSICAL_MEDIUM  Medium 
)

Definition at line 266 of file ndis.c.

PPH_STRING NetworkAdapterQueryName ( _Inout_ PPH_NETADAPTER_SYSINFO_CONTEXT  Context)

Definition at line 142 of file ndis.c.

BOOLEAN NetworkAdapterQueryNdisVersion ( _In_ HANDLE  DeviceHandle,
_Out_opt_ PUINT  MajorVersion,
_Out_opt_ PUINT  MinorVersion 
)

Definition at line 100 of file ndis.c.

NTSTATUS NetworkAdapterQueryStatistics ( _In_ HANDLE  DeviceHandle,
_Out_ PNDIS_STATISTICS_INFO  Info 
)

Definition at line 194 of file ndis.c.

BOOLEAN NetworkAdapterQuerySupported ( _In_ HANDLE  DeviceHandle)

Definition at line 29 of file ndis.c.

ULONG64 NetworkAdapterQueryValue ( _In_ HANDLE  DeviceHandle,
_In_ NDIS_OID  OpCode 
)

Definition at line 360 of file ndis.c.

MIB_IF_ROW2 QueryInterfaceRowVista ( _Inout_ PPH_NETADAPTER_SYSINFO_CONTEXT  Context)

Definition at line 387 of file ndis.c.

MIB_IFROW QueryInterfaceRowXP ( _Inout_ PPH_NETADAPTER_SYSINFO_CONTEXT  Context)

Definition at line 413 of file ndis.c.

VOID ShowOptionsDialog ( _In_ HWND  ParentHandle)

Definition at line 323 of file options.c.

Variable Documentation

_GetIfEntry2 GetIfEntry2_I

Definition at line 26 of file ndis.c.

_GetInterfaceDescriptionFromGuid GetInterfaceDescriptionFromGuid_I

Definition at line 27 of file ndis.c.

HMODULE IphlpHandle

Definition at line 25 of file ndis.c.

PPH_LIST NetworkAdaptersList

Definition at line 25 of file main.c.

PPH_PLUGIN PluginInstance

Definition at line 113 of file main.c.