Open Dav1dde opened 8 years ago
As discussed on IRC a modulo function (or operator) would be useful, e.g. drop every other packet based on TCP sequence number.
Hi David,
could you please make a example for the above sentence to outline the meaning by example?
Sure!
if (tcp.seq % 2) { drop(); kill(); }
(assuming tcp.seq
holds the sequence number). More explicit:
if ((tcp.seq % 2) == 1) { drop(); kill(); }
Can you try the filter-improvements branch? I"ve added the MOD operator.
As discussed on IRC a modulo function (or operator) would be useful, e.g. drop every other packet based on TCP sequence number.
A
random()
function would be useful as well, same exampleif (random() > 0.5) { drop(); kill(); }
. Drop statistically every other packet.