Home | History | Annotate | Download | only in jni

Lines Matching defs:bpf

100     // Compile "filter" to a BPF program
101 bpf_program bpf;
102 if (pcap_compile(pcap.get(), &bpf, filter.c_str(), 0, PCAP_NETMASK_UNKNOWN)) {
107 // Translate BPF program to human-readable format
108 const struct bpf_insn* insn = bpf.bf_insns;
109 for (uint32_t i = 0; i < bpf.bf_len; i++) {
124 // Open pcap file for BPF filtering
141 // Compile "filter" to a BPF program
142 bpf_program bpf;
143 if (pcap_compile(bpf_pcap.get(), &bpf, filter.c_str(), 0, PCAP_NETMASK_UNKNOWN)) {
148 // Install BPF filter on bpf_pcap
149 if (pcap_setfilter(bpf_pcap.get(), &bpf)) {
156 // Run BPF filter to the next matching packet.