From 269685fcecb0562420b99fa63329278dc49d2e8f Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org" Date: Fri, 23 Sep 2005 14:40:53 +0000 Subject: use new accessor functions (Eric Leblond, Harald Welte) --- include/libnfnetlink_queue/libnfnetlink_queue.h | 32 ++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'include/libnfnetlink_queue/libnfnetlink_queue.h') diff --git a/include/libnfnetlink_queue/libnfnetlink_queue.h b/include/libnfnetlink_queue/libnfnetlink_queue.h index b4d6f81..0c8bddd 100644 --- a/include/libnfnetlink_queue/libnfnetlink_queue.h +++ b/include/libnfnetlink_queue/libnfnetlink_queue.h @@ -2,6 +2,10 @@ * * (C) 2005 by Harald Welte * + * + * Changelog : + * (2005/08/11) added parsing function (Eric Leblond ) + * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. */ @@ -21,7 +25,7 @@ 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, +typedef int nfqnl_callback(struct nfqnl_q_handle *gh, struct nfgenmsg *nfmsg, struct nfattr *nfa[], void *data); @@ -47,10 +51,36 @@ 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); + +/* message parsing function */ + +extern struct nfqnl_msg_packet_hdr * + nfqnl_get_msg_packet_hdr(struct nfattr *nfa[]); + +extern u_int32_t nfqnl_get_nfmark(struct nfattr *nfa[]); + +extern struct nfqnl_msg_packet_timestamp * + nfqnl_get_timestamp(struct nfattr *nfa[]); + +/* return 0 if not set */ +extern u_int32_t nfqnl_get_indev(struct nfattr *nfa[]); +extern u_int32_t nfqnl_get_physindev(struct nfattr *nfa[]); +extern u_int32_t nfqnl_get_outdev(struct nfattr *nfa[]); +extern u_int32_t nfqnl_get_physoutdev(struct nfattr *nfa[]); + +extern struct nfqnl_msg_packet_hw *nfqnl_get_packet_hw(struct nfattr *nfa[]); + +/* return 0 if problem */ +extern int nfqnl_get_payload(struct nfattr *nfa[], + char ** data, unsigned int* datalen); + + + #endif /* __LIBNFQNETLINK_H */ -- cgit v1.2.3