Packet Sniffer SDK DLL Edition

HNTcpManager :: Properties :: TcpMgrSetVirtualMode

 Previous Next

Sets the virtual TCP sessions mode status flag.

Syntax:

BOOL __stdcall TcpMgrSetVirtualMode(HANDLE hTcpMgr, BOOL VirtualMode);

Parameters:

hTcpMgr

[in] HNTcpManager object handle.

VirtualMode

[in] The virtual TCP sessions mode status flag value.

Return values:

If the function succeeds the return value will be the VirtualMode parameter value.

Description:

Use this property to change 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 effecive, 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, TcpMgrGetVirtualMode