Thank you for this patch, Would you have some extra time on hand to straighten some kinks before it can be accepted:
No whitespace editing please (Done in second version of patch, excellent);
Parsing string argument into a vector, then comaring once and throwing away, again and again for every packet is a bad idea for performance. Same goes about comparing IP addresses in text form with strcmp();
Some justification is needed on what are advantages of this compared to capture expression, i.e. what's advantage of this patch, plus running with option "-I 10.0.0.1,205.151.222.250", compared to existing code, plus running with option "udp and (host 10.0.0.1 or host 205.151.222.250)" (which is already supported and is very fast - BPF JIT compiler if installed libpcap version supports it, and such).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PS: Special Thanks to Simon Germain (sgermain06 at gmail.com) and Marc Bernard (marcb at voicemeup.com) for the code.
Last edit: TechnoPhreak 2016-07-20
Just a mention that the patch is for pcapsipdump-0.2
This is a patch including also some fixes for older OS. It is meant for the latest trunk (r115)
Last edit: TechnoPhreak 2016-07-20
Thank you for this patch, Would you have some extra time on hand to straighten some kinks before it can be accepted:
Already implemented.