Packet Sniffer SDK DLL Edition

HNAdapter :: Properties :: AdpGetPacketPool

 Previous Next

Return the size of the packets pool which is used by PSSDK for transfering captured packets from the internal driver to application and back.

Syntax:

DWORD __stdcall AdpGetPacketPool(HANDLE hAdp);

Parameters:

hAdp

[in] HNAdapter object handle.

Return values:

If the function succeeds the return value will be the size of the packets pool.

Description:

Use AdpGetPacketPool to get the size of the packets pool which is used by PSSDK for transfering captured packets from the internal driver to application and back.

The packet pool is used by PSSDK in the following way:

  1. While adapter opening PSSDK maps HNPacket objects to the internal driver address space, that allows significantly decrease data copying operations quantity.
  2. Captured data are stored directly into the HNPacket object, and then transferred to application for further processing.
  3. After data processing at the appication level is completed, HNPacket object is remapped back to the PSSDK internal driver address space.

So, while traffic capturing HNPacket objects are constantly transferred from the application address space to the driver address space and back. In fact, PacketPool property is used by HNAdapter object to determine quantity of HNPacket objects which may be mapped to the PSSDK internal driver address space at the same time.

Experimenting with the PacketPool property value you can optimize both the application performance, and the memory required for it.

If the PacketPool property was set to 0 before adapter opening, then the application will not receive captured data. This feature may be useful if you need the traffic statistics only.
See also:HNAdapter, HNPacket, AdpSetPacketPool