]> The Tcpdump Group git mirrors - libpcap/blob - tests/pcap_compile_test.c
Don't use non-blocking mode unless we have a timeout or use -n.
[libpcap] / tests / pcap_compile_test.c
1 pcap = pcap_open_dead(link, snaplen);
2 /* todo: hook together argv to a single string */
3 prog = argv[0];
4 if (pcap_compile(pcap, &p, prog, optimize, 0) < 0) {
5 fprintf(stderr, pcap_geterr(pcap));
6 exit(1);
7 }
8 bpf_dump(&p, option);
9 pcap_freecode(&p);
10 pcap_close(pcap);
11