class PacketLoss
Defined at line 19 of file ../../src/connectivity/network/testing/netemul/network-context/lib/interceptors/packet_loss.h
PacketLoss emulation interceptor.
Public Methods
void PacketLoss (fit::function<uint8_t ()> rng, uint8_t loss_rate, ForwardPacketCallback callback)
Creates a packet loss interceptor with the provided loss rate.
|rng| must be a function that returns a random number in the range [0, 99].
|loss_rate| is the rate of dropped packets, must be in the range [0, 100].
Defined at line 26 of file ../../src/connectivity/network/testing/netemul/network-context/lib/interceptors/packet_loss.h
void PacketLoss (uint8_t loss_rate, ForwardPacketCallback callback)
Defined at line 31 of file ../../src/connectivity/network/testing/netemul/network-context/lib/interceptors/packet_loss.h
void Intercept (InterceptPacket packet)
Defined at line 34 of file ../../src/connectivity/network/testing/netemul/network-context/lib/interceptors/packet_loss.h
std::vector<InterceptPacket> Flush ()
Defined at line 44 of file ../../src/connectivity/network/testing/netemul/network-context/lib/interceptors/packet_loss.h
fit::function<uint8_t ()> DefaultRNG ()
Defined at line 46 of file ../../src/connectivity/network/testing/netemul/network-context/lib/interceptors/packet_loss.h