April 2005
Intermediate to advanced
344 pages
11h 59m
English
pcap_setfilter — Prototype: int pcap_setfilter(pcap_t *p, struct bpf_program *fp)
Purpose: pcap_setfilter is used to set a compiled
BPF filter on a capture session. fp contains the
compiled BPF program as generated by pcap_compile.
pcap_setfilter returns 0 on
success and -1 on error. You can find an example
of using pcap_setfilter in the Section 10.2.4
section earlier in this chapter.
Read now
Unlock full access