Repo created
This commit is contained in:
parent
6e9a0d01ce
commit
7ee9806fba
2415 changed files with 312708 additions and 2 deletions
11
tcpdump/jni/libpcap/tests/pcap_compile_test.c
Normal file
11
tcpdump/jni/libpcap/tests/pcap_compile_test.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
pcap = pcap_open_dead(link, snaplen);
|
||||
/* todo: hook together argv to a single string */
|
||||
prog = argv[0];
|
||||
if (pcap_compile(pcap, &p, prog, optimize, 0) < 0) {
|
||||
fprintf(stderr, pcap_geterr(pcap));
|
||||
exit(1);
|
||||
}
|
||||
bpf_dump(&p, option);
|
||||
pcap_freecode(&p);
|
||||
pcap_close(pcap);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue