1 /* libnfqnetlink.h: Header file for the Netfilter Queue library.
3 * (C) 2005 by Harald Welte <laforge@gnumonks.org>
5 * This software may be used and distributed according to the terms
6 * of the GNU General Public License, incorporated herein by reference.
9 #ifndef __LIBCTNETLINK_H
10 #define __LIBCTNETLINK_H
12 #include <linux/netfilter/nfnetlink.h>
13 #include <linux/netfilter/nfnetlink_queue.h>
14 #include <libnfnetlink.h>
20 struct nfnl_handle nfnlh;
25 struct nfqnl_handle *h;
29 struct ctnl_msg_handler {
31 int (*handler)(struct sockaddr_nl *, struct nlmsghdr *, void *arg);
35 struct nfnl_handle nfnlh;
36 struct ctnl_msg_handler *handler[NFQNL_MSG_MAX];
39 extern int nfqnl_open(struct nfqnl_handle *h);
40 extern int nfqnl_close(struct nfqnl_handle *h);
42 extern int nfqnl_bind_pf(struct nfqnl_handle *h, u_int16_t pf);
43 extern int nfqnl_unbind_pf(struct nfqnl_handle *h, u_int16_t pf);
45 extern int nfqnl_create_queue(struct nfqnl_handle *h,
46 struct nfqnl_q_handle *qh, u_int16_t num);
47 extern int nfqnl_destroy_queue(struct nfqnl_q_handle *qh);
49 extern int nfqnl_set_mode(struct nfqnl_q_handle *qh,
50 u_int8_t mode, unsigned int len);
52 extern int nfqnl_set_verdict(struct nfqnl_q_handle *qh,
58 extern int nfqnl_set_verdict_mark(struct nfqnl_q_handle *qh, u_int32_t id,
59 u_int32_t verdict, u_int32_t mark,
60 u_int32_t datalen, unsigned char *buf);
61 #endif /* __LIBNFQNETLINK_H */