Reply To: injecting many packets: SendPacketToAdapter() doesn’t block

Home Forums Discussions Support injecting many packets: SendPacketToAdapter() doesn’t block Reply To: injecting many packets: SendPacketToAdapter() doesn’t block

#6216
Vadim Smirnov
Keymaster

    Well, WinpkFilter was designed mainly for packet filtering solutions but not for spoofing. Interface functions for sending packets are designed as non-blocking for better performance and sending packets through the WinpkFilter at the rate above the network bandwidth causes packet loss (this caused by network limits, not the WinpkFilter internal queue size). Basically you can change your application to send packets on some fixed realistic rate to avoid packet loss. This can be implemented with a waitable periodic timer, which callback routine would calculate time passed since last fireup and how many data should be passed during this time at the given rate. Then send calculated amount of data on the network and requeue the timer. Such approach will allow you to send packets on the network at a given rate which should be chosen below the real network bandwidth.