📄 hnpssdk.h
字号:
#ifdef UNICODE
#define BpfCompileBPFAsmFromFile BpfCompileBPFAsmFromFileW
#else
#define BpfCompileBPFAsmFromFile BpfCompileBPFAsmFromFileA
#endif // !UNICODE
//---------------------------------------------------------------------------
// v2.2 - BpfCompileBPFAsmFromStr - Compiles the BPF filtering program written in BPF assembler from a string.
DWORD __stdcall BpfCompileBPFAsmFromStr(HANDLE hFtr, LPCSTR lpStr);
typedef DWORD (__stdcall *FN_BpfCompileBPFAsmFromStr)(HANDLE hFtr, LPCSTR lpStr);
//---------------------------------------------------------------------------
// v2.2 - BpfDecompileBPFAsmToFileA - Decompiles BPF program into BPF assembler source and saves it in a file.
DWORD __stdcall BpfDecompileBPFAsmToFileA(HANDLE hFtr, LPCSTR lpFileName, BOOL bStrLabels);
typedef DWORD (__stdcall *FN_BpfDecompileBPFAsmToFileA)(HANDLE hFtr, LPCSTR lpFileName, BOOL bStrLabels);
//---------------------------------------------------------------------------
// v2.2 - BpfDecompileBPFAsmToFileW - Decompiles BPF program into BPF assembler source and saves it in a file.
DWORD __stdcall BpfDecompileBPFAsmToFileW(HANDLE hFtr, LPCWSTR lpFileName, BOOL bStrLabels);
typedef DWORD (__stdcall *FN_BpfDecompileBPFAsmToFileW)(HANDLE hFtr, LPCWSTR lpFileName, BOOL bStrLabels);
#ifdef UNICODE
#define BpfDecompileBPFAsmToFile BpfDecompileBPFAsmToFileW
#else
#define BpfDecompileBPFAsmToFile BpfDecompileBPFAsmToFileA
#endif // !UNICODE
//---------------------------------------------------------------------------
// v2.2 - BpfDecompileBPFAsmToStr - Decompiles BPF program into BPF assembler source and saves it in the memory allocated by application.
DWORD __stdcall BpfDecompileBPFAsmToStr(HANDLE hFtr, LPSTR lpStr, DWORD *pSize, BOOL bStrLabels);
typedef DWORD (__stdcall *FN_BpfDecompileBPFAsmToStr)(HANDLE hFtr, LPSTR lpStr, PDWORD pSize, BOOL bStrLabels);
//---------------------------------------------------------------------------
// v2.2 - BpfSetOnBPFAsmError - Sets the OnBPFAsmError event.
FARPROC __stdcall BpfSetOnBPFAsmError(HANDLE hFtr, FARPROC pfOnBPFAsmError, DWORD_PTR Param);
typedef FARPROC (__stdcall *FN_BpfSetOnBPFAsmError)(HANDLE hFtr, FARPROC pfOnBPFAsmError, DWORD_PTR Param);
//###########################################################################
// PSSDK HNADAPTER
//###########################################################################
//---------------------------------------------------------------------------
// AdpCreate - Creates an HNAdapter object.
HANDLE __stdcall AdpCreate();
typedef HANDLE (__stdcall *FN_AdpCreate)();
//---------------------------------------------------------------------------
// AdpDestroy - Destroys an HNAdapter object.
DWORD __stdcall AdpDestroy(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpDestroy)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpOpenAdapter - Opens the network adapter.
DWORD __stdcall AdpOpenAdapter(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpOpenAdapter)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpCloseAdapter - Closes the network adapter.
DWORD __stdcall AdpCloseAdapter(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpCloseAdapter)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpGetOpenTime - Returns network adapter open time
#ifdef _WIN64
LONGLONG __stdcall AdpGetOpenTime(HANDLE hAdp);
typedef LONGLONG (__stdcall *FN_AdpGetOpenTime)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetOpenTime(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetOpenTime)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpIsOpened - Shows HNAdapter working status.
BOOL __stdcall AdpIsOpened(HANDLE hAdp);
typedef BOOL (__stdcall *FN_AdpIsOpened)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpGetConfig - Returns the handle of the HNAdapterConfig object.
HANDLE __stdcall AdpGetConfig(HANDLE hAdp);
typedef HANDLE (__stdcall *FN_AdpGetConfig)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpSetConfig - Sets the handle of the HNAdapterConfig object.
HANDLE __stdcall AdpSetConfig(HANDLE hAdp, HANDLE hCfg);
typedef HANDLE (__stdcall *FN_AdpSetConfig)(HANDLE hAdp, HANDLE hCfg);
//---------------------------------------------------------------------------
// AdpGetMacFilter - Returns the MAC filter for the network adapter.
DWORD __stdcall AdpGetMacFilter(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpGetMacFilter)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpSetMacFilter - Sets the MAC filter for the network adapter.
DWORD __stdcall AdpSetMacFilter(HANDLE hAdp, DWORD MacFilter);
typedef DWORD (__stdcall *FN_AdpSetMacFilter)(HANDLE hAdp, DWORD MacFilter);
//---------------------------------------------------------------------------
// AdpGetUserFilter - Returns the handle of the HNUserFilter object.
HANDLE __stdcall AdpGetUserFilter(HANDLE hAdp);
typedef HANDLE (__stdcall *FN_AdpGetUserFilter)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpSetUserFilter - Sets the handle of the HNUserFilter object.
HANDLE __stdcall AdpSetUserFilter(HANDLE hAdp, HANDLE hUserFilter);
typedef HANDLE (__stdcall *FN_AdpSetUserFilter)(HANDLE hAdp, HANDLE hUserFilter);
//---------------------------------------------------------------------------
// AdpGetUserFilterActive - Returns the status flag of the user-settable packet filter using.
BOOL __stdcall AdpGetUserFilterActive(HANDLE hAdp);
typedef BOOL (__stdcall *FN_AdpGetUserFilterActive)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpSetUserFilterActive - Sets the status flag of the user-settable packet filter using.
BOOL __stdcall AdpSetUserFilterActive(HANDLE hAdp, BOOL bActiveBpf);
typedef BOOL (__stdcall *FN_AdpSetUserFilterActive)(HANDLE hAdp, BOOL bActiveBpf);
//---------------------------------------------------------------------------
// AdpGetUseFastUserFilter - Returns the status flag of the FastBPF using.
BOOL __stdcall AdpGetUseFastUserFilter(HANDLE hAdp);
typedef BOOL (__stdcall *FN_AdpGetUseFastUserFilter)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpSetUseFastUserFilter - Sets the status flag of the FastBPF using.
BOOL __stdcall AdpSetUseFastUserFilter(HANDLE hAdp, BOOL bUseFastBpf);
typedef BOOL (__stdcall *FN_AdpSetUseFastUserFilter)(HANDLE hAdp, BOOL bUseFastBpf);
//---------------------------------------------------------------------------
// AdpGetLinkSpeed - Returns the network adapter maximum speed in 100 bps.
DWORD __stdcall AdpGetLinkSpeed(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpGetLinkSpeed)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpGetConnectStatus - Returns the status of the physical connection with the network.
BOOL __stdcall AdpGetConnectStatus(HANDLE hAdp);
typedef BOOL (__stdcall *FN_AdpGetConnectStatus)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpGetMaxThreadCount - Returns the maximal number of the threads allowed to be created for work with the network adapter.
DWORD __stdcall AdpGetMaxThreadCount(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpGetMaxThreadCount)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpGetThreadCount - Returns the number of threads created for work with the network adapter.
DWORD __stdcall AdpGetThreadCount(HANDLE hAdp);
typedef DWORD (__stdcall *FN_AdpGetThreadCount)(HANDLE hAdp);
//---------------------------------------------------------------------------
// AdpSetThreadCount - Sets the number of threads created for work with the network adapter.
DWORD __stdcall AdpSetThreadCount(HANDLE hAdp, DWORD ThreadCount);
typedef DWORD (__stdcall *FN_AdpSetThreadCount)(HANDLE hAdp, DWORD ThreadCount);
//---------------------------------------------------------------------------
// AdpGetRecvCount - Returns the number of the packets received by the Packet Sniffer SDK internal driver from OS.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetRecvCount(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetRecvCount)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetRecvCount(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetRecvCount)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetAcceptCount - Returns the number of the packets passed by the user-settable packet filter.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetAcceptCount(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetAcceptCount)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetAcceptCount(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetAcceptCount)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetRejectCount - Returns the number of packets rejected by the user-settable packet filter.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetRejectCount(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetRejectCount)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetRejectCount(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetRejectCount)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetProcessCount - Returns the number of the packets transferred to the application.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetProcessCount(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetProcessCount)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetProcessCount(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetProcessCount)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetTranWithoutErr - Returns the number of the packets transferred by the network adapter without errors.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetTranWithoutErr(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetTranWithoutErr)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetTranWithoutErr(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetTranWithoutErr)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetRecvWithoutErr - Returns the number of the packets received by the network adapter without errors.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetRecvWithoutErr(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetRecvWithoutErr)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetRecvWithoutErr(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetRecvWithoutErr)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetTranWithErr - Returns the number of the packets transferred by the network adapter with errors.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetTranWithErr(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetTranWithErr)(HANDLE hAdp);
#else
DWORD __stdcall AdpGetTranWithErr(HANDLE hAdp, DWORD *pHiValue);
typedef DWORD (__stdcall *FN_AdpGetTranWithErr)(HANDLE hAdp, DWORD *pHiValue);
#endif
//---------------------------------------------------------------------------
// AdpGetRecvWithErr - Returns the number of the packets received by the network adapter with errors.
#ifdef _WIN64
ULONGLONG __stdcall AdpGetRecvWithErr(HANDLE hAdp);
typedef ULONGLONG (__stdcall *FN_AdpGetRecvWithErr)(HANDLE hAdp);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -