Packet Sniffer SDK DLL Edition

HNTcpManager :: Properties :: TcpMgrGetVirtualMode

 Previous Next

Returns the virtual TCP sessions mode status flag.

Syntax:

BOOL __stdcall TcpMgrGetVirtualMode(HANDLE hTcpMgr);

Parameters:

hTcpMgr

[in] HNTcpManager object handle.

Return values:

If the function succeeds the return value will be the virtual TCP sessions mode status flag. The default value is FALSE.

Description:

Use TcpMgrGetVirtualMode to obtain the virtual TCP sessions mode status flag. Setting this flag in TRUE means that HNTcpManager component uses only TCP packet header fields and HNPacket object properties while TcpMgrProcessPacket function execution.

Virtual TCP sessions mode may be very useful for network activity analysis, in other words, if you need only TCP session properties (the number of TCP connections per second, total amount of incoming and outgoing traffic, hosts participating in connections etc.) and don't need packets data.

Assume, we are working with Ethernet adapter. To analyze network activity more effectively, we have to do the following:

  • Use HNAdapter component together with HNQueue (see HNAdapter.ReceiveQueue [Get/Set]);
  • Set HNQueue.MaxPacketSize [Get/Set] = (sizeof(ETHERNET_HEADER) + sizeof(IP_HEADER) + sizeof(TCP_HEADER)) to define packet minimum necessary size for Ethernet adapter;
  • Turn on virtual TCP sessions mode for HNTcpManager;
  • Send captured traffic to HNTcpManager component.
See also:HNTcpManager, TcpMgrProcessPacket, HNAdapter, AdpGetReceiveQueue, AdpSetReceiveQueue, HNQueue, QueGetMaxPacketSize, QueSetMaxPacketSize, TcpMgrSetVirtualMode