Can someone explain please how to set a filter using struct bpf_program member struct bpf_insn? All documentation and tutorials are welcome, for example what would be the struct bpf_insn if i want to filter for example dhcp, dns or …?
Thanks for your help.
This tutorial uses struct bpf_program to create a filter program, not sure if that helps much but it’s worth a look. (scroll down to the tcp bit).
http://www.enderunix.org/docs/en/rawipspoof/