diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-07-30 20:55:43 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org> | 2005-07-30 20:55:43 +0000 |
commit | 0d5fa95c9f357d706f3ff448a849fa35560b1ebf (patch) | |
tree | 004abba7d078488feac0d8d3d6a4855f2f34db7c /_queue/nfqnl_test.c | |
parent | abd8b833fe3c8506e5650b0b00ffa5f8d5e52e6d (diff) |
directory restructuring
Diffstat (limited to '_queue/nfqnl_test.c')
-rw-r--r-- | _queue/nfqnl_test.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/_queue/nfqnl_test.c b/_queue/nfqnl_test.c index 28971da..834f5cb 100644 --- a/_queue/nfqnl_test.c +++ b/_queue/nfqnl_test.c @@ -4,27 +4,28 @@ #include <unistd.h> #include <netinet/in.h> -#include "libnfqnetlink.h" +#include "libnfnetlink_queue.h" int main(int argc, char **argv) { struct nfqnl_handle h; + struct nfqnl_q_handle qh; int rv; char buf[4096]; - rv = nfqnl_open(&h, 0); + rv = nfqnl_open(&h); if (rv < 0) exit(rv); nfqnl_bind_pf(&h, AF_INET); - nfqnl_bind(&h, 0); - nfqnl_set_mode(&h, 0, NFQNL_COPY_PACKET, 0xffff); + nfqnl_create_queue(&h, &qh, 0); + nfqnl_set_mode(&qh, NFQNL_COPY_PACKET, 0xffff); while (recv(h.nfnlh.fd, buf, sizeof(buf), 0) > 0) { printf("pkt received\n"); } - nfqnl_unbind(&h, 0); + nfqnl_destroy_queue(&qh); nfqnl_unbind_pf(&h, AF_INET); nfqnl_close(&h); |