If the function succeeds the return value will be the PacketPool parameter value.
Description:
Use AdpSetPacketPool to set 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:
While adapter opening PSSDK maps HNPacket objects to
the internal driver address space, that allows significantly decrease data copying operations quantity.
Captured data are stored directly into the HNPacket
object, and then transferred to application for further processing.
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.
To get current PacketPool value please use
AdpGetPacketPool function.
PacketPool is implemented only for WinNt platform (nt/2k/xp/2k3/vista/longhorn). It can't be
changed under 9x systems.
If you're going to change PacketPool value in your application, it is very important to
take into account the size of the memory available on the system: if the allocation of the memory
necessary to the packets pool is impossible, you'll get HNERR_TOO_BIG_PACKETS_POOL error on
the adapter opening.
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, or
your application only sends packets, or it only executes NDIS requests.