📄 hnpssdkdef.h
字号:
/****************************************************************************
** **
** PSSDK library definitions **
** Copyright (c) 1997 - 2007 microOLAP Technologies LTD, **
** Khalturin A.P., Naumov D.A. **
** Header File **
** **
****************************************************************************/
//---------------------------------------------------------------------------
#ifndef __HN_PSSDKDEF_H__
#define __HN_PSSDKDEF_H__
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// CHNPSManager - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_CFGCHANGE)(DWORD_PTR Param, HANDLE hConfig, DWORD ChangeType);
//---------------------------------------------------------------------------
// CHNAdapter - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_STATECHANGE )(DWORD_PTR Param, DWORD State);
typedef void (__stdcall *HNFN_ASYNCSEND )(DWORD_PTR Param, DWORD_PTR Key, DWORD Count);
typedef void (__stdcall *HNFN_STATISTICS )(DWORD_PTR Param, DWORD StatisticsType, PULARGE_INTEGER pValue);
typedef void (__stdcall *HNFN_ASYNCREQUEST)(DWORD_PTR Param, DWORD_PTR Key, DWORD RequestType, DWORD Oid, LPVOID pBuffer, DWORD BufferSize, DWORD BytesUsed, DWORD BytesNeeded, DWORD NdisStatus);
//---------------------------------------------------------------------------
// CHNUserFilter - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef BOOL (__stdcall *HNFN_BPF_ERROR_HANDLER)(DWORD_PTR Param, DWORD Type, DWORD Err, DWORD Line, DWORD Pos);
//---------------------------------------------------------------------------
// CHNQueue - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_DELETEITEMS)(DWORD_PTR Param);
typedef void (__stdcall *HNFN_PKTSRECEIVE)(DWORD_PTR Param, DWORD_PTR ThParam, PHANDLE hPackets, DWORD PacketsCount);
//---------------------------------------------------------------------------
// CHNTcpManager - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_TCPCREATE )(DWORD_PTR Param, HANDLE hTcpSession, BOOL *pbNeed);
typedef void (__stdcall *HNFN_TCPCONNECT)(DWORD_PTR Param, HANDLE hTcpSession);
typedef void (__stdcall *HNFN_TCPCLIENT )(DWORD_PTR Param, HANDLE hTcpSession, HANDLE hPacket, LPVOID pData, DWORD DataLength);
typedef void (__stdcall *HNFN_TCPSERVER )(DWORD_PTR Param, HANDLE hTcpSession, HANDLE hPacket, LPVOID pData, DWORD DataLength);
typedef void (__stdcall *HNFN_TCPCLOSE )(DWORD_PTR Param, HANDLE hTcpSession, BOOL *pbNeed);
typedef void (__stdcall *HNFN_TCPDELETE )(DWORD_PTR Param, HANDLE hTcpSession);
typedef void (__stdcall *HNFN_TCPRETURN )(DWORD_PTR Param, HANDLE hPacket, DWORD Reason);
//---------------------------------------------------------------------------
// CHNLBAdapter - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_LBCONNECT )(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hLBSession, HANDLE hLBHosts, DWORD Direction);
typedef void (__stdcall *HNFN_LBDISCONNECT )(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hLBSession, DWORD Direction);
typedef void (__stdcall *HNFN_LBTCPPKTRECEIVE)(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hLBSession, DWORD Direction, DWORD Pid, HANDLE hPacket, LPVOID pData, DWORD DataLength);
typedef void (__stdcall *HNFN_LBUDPPKTRECEIVE)(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hLBHosts, DWORD Direction, DWORD Pid, HANDLE hPacket, LPVOID pData, DWORD DataLength);
//---------------------------------------------------------------------------
// Common - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_THREADBEGIN)(DWORD_PTR Param, DWORD_PTR *pThParam);
typedef void (__stdcall *HNFN_PKTRECEIVE )(DWORD_PTR Param, DWORD_PTR ThParam, HANDLE hPacket, LPVOID pPacket, DWORD IncPacketSize);
typedef void (__stdcall *HNFN_THREADEND )(DWORD_PTR Param, DWORD_PTR ThParam);
//---------------------------------------------------------------------------
// CHNFileAdapter - Definitions of the events handlers
//---------------------------------------------------------------------------
typedef void (__stdcall *HNFN_FILECLOSE)(DWORD_PTR Param, DWORD_PTR ThParam, DWORD Result);
//---------------------------------------------------------------------------
// HNMacFilter - Contains the constants indicating the MAC filter type.
//---------------------------------------------------------------------------
enum HNMacFilter
{
mfBroadcast = 1, // Pass only packets with broadcast MAC addresses.
mfOwnerRecv = 2, // Pass only received packets, which contain a local adapter MAC address.
mfOwnerAll = 4, // Pass all sent and received packets, which contain a local adapter MAC address.
mfAll = 8 // Pass all packets, which are somehow registered by the adapter.
};
//---------------------------------------------------------------------------
// HNNetAdapterType - Contains the constants indicating the type of the network adapter.
//---------------------------------------------------------------------------
enum HNNetAdapterType
{
atEthernet = 0, // Ethernet (802.3).
atTokenRing = 1, // TokenRing (802.5).
atFDDI = 2, // FDDI.
atWAN = 3, // WAN.
atLBTcp = 4, // Loop back TCP.
atLBUdp = 5, // Loop back UDP.
atUnknown = -1 // Unknown adapter. Is not supported by Packet Sniffer SDK library.
};
//---------------------------------------------------------------------------
// HNNetAdapterStateChange - Contains the constants indicating the network adapter status changes, which can be traced by the OnStateChange event handler.
//---------------------------------------------------------------------------
enum HNNetAdapterStateChange
{
scConnect = 0, // The network cable has been plugged in.
scDisconnect = 1, // The network cable has been plugged out.
scInterfaceDown = 2 // The network adapter is off.
};
//---------------------------------------------------------------------------
// HNAdapterConfigChange - Contains the constant values corresponding to the network device state changes, which can be controlled by the OnConfigChange event handler.
//---------------------------------------------------------------------------
enum HNAdapterConfigChange
{
acDelete = 0x000, // Exclusively used by the PSSDK library.
// On calling the RefreshAdapterList method
// it is sent to the OnConfigChange event handler.
// Do not use this value in the Update method call.
acIpChange = 0x001, // IP protocol settings update.
acIpDhcpChange = 0x002, // DHCP settings update.
acIpGatewayChange = 0x004, // Gateways settings update.
acIpDnsChange = 0x008, // DNS settings update.
acZeroBroadcastState = 0x010, // The status flag of the IP zero broadcast usage update.
acDhcpState = 0x020, // The status flag of the DHCP usage update.
acCreate = 0xFFF // Creation of the new configuration.
// Exclusively used by the PSSDK library.
// On calling the Initialize and RefreshAdapterList
// methods it is sent to the OnConfigChange event handler.
// Do not use this value in the HNAdapterConfig.Update method call.
};
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -