diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-06 15:44:10 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-06 15:44:10 -0800 |
commit | 716307e29a95300050f42b0ae47b0594f195e898 (patch) | |
tree | 763ce77eeec60f2aa58c44473b5ce83c774d1cce /testprogs/pcap_compile_test.c | |
parent | a579c55cf421005ab05c77edb5246f280e26a5ed (diff) |
Rename the test program directory to testprogs.
We may have a directory of test files in the future, and we'd want to
call it "tests", paralleling tcpdump's directory of test files.
Diffstat (limited to 'testprogs/pcap_compile_test.c')
-rw-r--r-- | testprogs/pcap_compile_test.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testprogs/pcap_compile_test.c b/testprogs/pcap_compile_test.c new file mode 100644 index 00000000..924ec732 --- /dev/null +++ b/testprogs/pcap_compile_test.c @@ -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); + |