summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
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-08-07 14:54:58 +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-08-07 14:54:58 +0000
commit0c5e5fb15205d1be968d84058d0b91f5c727c454 (patch)
tree3bed0b091438e72ad48d8d085780664412e6b108 /include
parent8ac018a680c0324eeca141c6bdf14919b7f33686 (diff)
sync with all 'upstream' changes in libnfnetlink_log
Diffstat (limited to 'include')
-rw-r--r--include/libnfnetlink_queue/libipq.h4
-rw-r--r--include/libnfnetlink_queue/libnfnetlink_queue.h53
2 files changed, 26 insertions, 31 deletions
diff --git a/include/libnfnetlink_queue/libipq.h b/include/libnfnetlink_queue/libipq.h
index 483a514..06c10c1 100644
--- a/include/libnfnetlink_queue/libipq.h
+++ b/include/libnfnetlink_queue/libipq.h
@@ -52,8 +52,8 @@ typedef unsigned long ipq_id_t;
struct ipq_handle
{
- struct nfqnl_handle nfqnlh;
- struct nfqnl_q_handle qh;
+ struct nfqnl_handle *nfqnlh;
+ struct nfqnl_q_handle *qh;
u_int8_t family;
u_int8_t blocking;
};
diff --git a/include/libnfnetlink_queue/libnfnetlink_queue.h b/include/libnfnetlink_queue/libnfnetlink_queue.h
index b3aad73..b4d6f81 100644
--- a/include/libnfnetlink_queue/libnfnetlink_queue.h
+++ b/include/libnfnetlink_queue/libnfnetlink_queue.h
@@ -13,39 +13,32 @@
#include <linux/netfilter/nfnetlink_queue.h>
#include <libnfnetlink/libnfnetlink.h>
+struct nfqnl_handle;
+struct nfqnl_q_handle;
-#define NFQN
-struct nfqnl_handle
-{
- struct nfnl_handle nfnlh;
-};
-
-struct nfqnl_q_handle
-{
- struct nfqnl_handle *h;
- u_int16_t id;
-};
-
-struct ctnl_msg_handler {
- int type;
- int (*handler)(struct sockaddr_nl *, struct nlmsghdr *, void *arg);
-};
-
-struct ctnl_handle {
- struct nfnl_handle nfnlh;
- struct ctnl_msg_handler *handler[NFQNL_MSG_MAX];
-};
-
-extern int nfqnl_open(struct nfqnl_handle *h);
+extern int nfqnl_errno;
+
+extern struct nfnl_handle *nfqnl_nfnlh(struct nfqnl_handle *h);
+extern int nfqnl_fd(struct nfqnl_handle *h);
+
+typedef nfqnl_callback(struct nfqnl_q_handle *gh, struct nfgenmsg *nfmsg,
+ struct nfattr *nfa[], void *data);
+
+
+extern struct nfqnl_handle *nfqnl_open(void);
extern int nfqnl_close(struct nfqnl_handle *h);
extern int nfqnl_bind_pf(struct nfqnl_handle *h, u_int16_t pf);
extern int nfqnl_unbind_pf(struct nfqnl_handle *h, u_int16_t pf);
-extern int nfqnl_create_queue(struct nfqnl_handle *h,
- struct nfqnl_q_handle *qh, u_int16_t num);
+extern struct nfqnl_q_handle *nfqnl_create_queue(struct nfqnl_handle *h,
+ u_int16_t num,
+ nfqnl_callback *cb,
+ void *data);
extern int nfqnl_destroy_queue(struct nfqnl_q_handle *qh);
+extern int nfqnl_handle_packet(struct nfqnl_handle *h, char *buf, int len);
+
extern int nfqnl_set_mode(struct nfqnl_q_handle *qh,
u_int8_t mode, unsigned int len);
@@ -54,8 +47,10 @@ extern int nfqnl_set_verdict(struct nfqnl_q_handle *qh,
u_int32_t verdict,
u_int32_t data_len,
unsigned char *buf);
-
-extern int nfqnl_set_verdict_mark(struct nfqnl_q_handle *qh, u_int32_t id,
- u_int32_t verdict, u_int32_t mark,
- u_int32_t datalen, unsigned char *buf);
+extern int nfqnl_set_verdict_mark(struct nfqnl_q_handle *qh,
+ u_int32_t id,
+ u_int32_t verdict,
+ u_int32_t mark,
+ u_int32_t datalen,
+ unsigned char *buf);
#endif /* __LIBNFQNETLINK_H */