Migrate BPF and General Filter test code to its own function
Migrate BPF and General Filter test code to its own function

seladb/PcapPlusPlus,seladb/PcapPlusPlus,seladb/PcapPlusPlus,seladb/PcapPlusPlus