5 #include <netinet/in.h>
7 #include "libnfnetlink_queue.h"
9 int main(int argc, char **argv)
11 struct nfqnl_handle h;
12 struct nfqnl_q_handle qh;
20 nfqnl_bind_pf(&h, AF_INET);
21 nfqnl_create_queue(&h, &qh, 0);
22 nfqnl_set_mode(&qh, NFQNL_COPY_PACKET, 0xffff);
24 while (recv(h.nfnlh.fd, buf, sizeof(buf), 0) > 0) {
25 printf("pkt received\n");
28 nfqnl_destroy_queue(&qh);
29 nfqnl_unbind_pf(&h, AF_INET);