⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hnpssdkdef.h

📁 Network Stats using PSSDK
💻 H
📖 第 1 页 / 共 2 页
字号:
// HNStatisticsType - Contains the constants indicating asynchronously requested statistics types. Use the OnStatistics event to obtain appropriate values.
//---------------------------------------------------------------------------
enum HNStatisticsType
{
    stNdisTranWithoutErr = 0, // The number of the packets sent by the network adapter successfully.
    stNdisRecvWithoutErr = 1, // The number of the packets received by the network adapter successfully.
    stNdisTranWithErr    = 2, // The number of the packets sent by the network adapter with errors.
    stNdisRecvWithErr    = 3, // The number of the packets received by the network adapter with errors.
    stNdisMissed         = 4, // The number of the packets lost by the network adapter.
    stBpfReceive         = 5, // The number of the packets received by the Packet Sniffer SDK internal driver.
    stBpfAccept          = 6, // The number of the packets passed by the BPF filter.
    stBpfReject          = 7, // The number of the packets ignored by the BPF filter.
    stBpfProcess         = 8  // The number of the packets transferred by PSSDK to the application.
};


//---------------------------------------------------------------------------
// HNBpfErrorType - Contains the constant values corresponding to the types of the errors appearing while BPF program compilation, that can be controlled by the OnBPFAsmError event handler.
//---------------------------------------------------------------------------
enum HNBpfErrorType
{
    betBpfWarning = 0, // BPF program possibly contains an error, but its 
                       // compilation may be continued. Usually occurs in situation 
                       // when the user redefines the value of the previously defined constant.
    betBpfError   = 1  // BPF program contains a critical error, compilation is impossible.
};

//---------------------------------------------------------------------------
// HNTcpState - Contains the constants indicating the state of the TCP session.
//---------------------------------------------------------------------------
enum HNTcpState
{
    tsCreated     = 0, // TCP session was registered (HNTcpSession object was created).
    tsEstablished = 1, // TCP connection is established.
    tsClosed      = 2  // TCP session tracking completed (HNTcpSession object was destroyed).
};

//---------------------------------------------------------------------------
// HNTcpSessionType - Contains the constants indicating the type of the TCP session.
//---------------------------------------------------------------------------
enum HNTcpSessionType
{
    stIpv4  = 0, // TCP session was incapsulated in the IPv4.
    stIpv6  = 1, // TCP session was incapsulated in the IPv6.
};

//---------------------------------------------------------------------------
// HNTcpReturnReason - Contains the constants indicating the packet return reason.
//---------------------------------------------------------------------------
enum HNTcpReturnReason
{
    rrNormal       = 0, // Packet was processed successfully.
    rrUnkType      = 1, // Unknown packet type (see HNTcpManager restrictions).
    rrIncPacket    = 2, // HNPacket contains incorrect data.
    rrIncIpSum     = 3, // Wrong IP checksum.
    rrIncTcpSum    = 4, // Wrong TCP checksum.
    rrDataRetrans  = 5, // Data retransmission.
    rrCloseSession = 6  // TCP session contained packets awaiting for assembling, 
                        // but was closed by one of the following functions: 
                        // CloseSession, DeleteSession, ResetSessions, ResetOnTimeOut
};

//---------------------------------------------------------------------------
// HNTcpCloseReason - Contains the constants indicating the TCP session close reason.
//---------------------------------------------------------------------------
enum HNTcpCloseReason
{
    crNormal       = 0, // TCP session completed successffully.
    crTimeOut      = 1, // TCP session was closed by time-out (see ResetOnTimeOut).
    crDataLost     = 2, // TCP session was closed because of impossibility of its data assembling, 
                        // data were lost.
    crRecvRst      = 3, // Reset flag was received (RST: connection reset, see RFC 793).
    crManual       = 4  // TCP session was closed by one of the following functions: 
                        // CloseSession, DeleteSession, or ResetSessions.
};

//---------------------------------------------------------------------------
// HNLBDirection - Contains possible directions of the packet receiving operation, 
// establishing of TCP session, or TCP session closing.
//---------------------------------------------------------------------------
enum HNLBDirection
{
    ldUnknown      = -1, // Unknown direction (error).
    ldL2R          =  0, // Direction is local to remote. Means (depends on event handler): 
                         // sending a packet from the localhost to remote one, establishing 
                         // of TCP session by the localhost initiative, closing of TCP session 
                         // by the localhost.
    ldR2L          =  1  // Direction is remote to local. Means (depends on event handler): 
                         // sending a packet from the remote host to the local one, 
                         // establishing of TCP session by the remote host initiative, 
                         // closing of TCP session by the remote host.
};

//---------------------------------------------------------------------------
// HNLBAddrType - enumeration contains addresses types served by HNLBHosts component.
//---------------------------------------------------------------------------
enum HNLBAddrType
{
    latUnknown     = -1, // Unknown address type.
    latIPv4        =  0, // IP ver. 4 address type.
    latIPv6        =  1  // IP ver. 6 address type.
};

//---------------------------------------------------------------------------
// HNLBPortFilter - enumeration contains port types for filtering TCP 
// connections and UDP packets.
//---------------------------------------------------------------------------
enum HNLBPortFilter
{
    lpfLocal       = 0, // Local port. 
    lpfRemote      = 1, // Remote port. 
    lpfAny         = 2  // Any port.
};

//---------------------------------------------------------------------------
// HNCapFormat - enumeration contains types of the CAP file formats.
//---------------------------------------------------------------------------
enum HNCapFormat
{
    cfTcpdump      = 0  // TCPDUMP/libpcap file format
};

//---------------------------------------------------------------------------
#endif //__HN_PSSDKDEF_H__
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -