From c5e567d6f8ae35456f1ec08cd1db3e1523e4454d Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org" Date: Fri, 21 Oct 2005 02:47:07 +0000 Subject: Some API changes, still some slighty modification are about to come before the first 1.0 release --- .../libnetfilter_conntrack.h | 48 ++++++++++------------ 1 file changed, 21 insertions(+), 27 deletions(-) (limited to 'include/libnetfilter_conntrack') diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h index e514e16..c6a4e8b 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h @@ -17,7 +17,7 @@ #include #include "linux_list.h" -#define LIBNETFILTER_CONNTRACK_VERSION "0.1.1" +#define LIBNETFILTER_CONNTRACK_VERSION "0.1.2" enum { CONNTRACK = NFNL_SUBSYS_CTNETLINK, @@ -149,6 +149,17 @@ struct nfct_handle { struct nfct_msg_handler *handler[IPCTNL_MSG_MAX]; }; +extern struct nfct_conntrack * +nfct_conntrack_alloc(struct nfct_tuple *orig, struct nfct_tuple *reply, + unsigned long timeout, union nfct_protoinfo *proto, + unsigned int status, struct nfct_nat *range); +extern void nfct_conntrack_free(struct nfct_conntrack *ct); + +extern struct nfct_expect * +nfct_expect_alloc(struct nfct_tuple *master, struct nfct_tuple *tuple, + struct nfct_tuple *mask, unsigned long timeout); +extern void nfct_expect_free(struct nfct_expect *exp); + extern void nfct_register_proto(struct nfct_proto *h); extern void nfct_unregister_proto(struct nfct_proto *h); @@ -162,29 +173,16 @@ extern void nfct_set_callback(struct nfct_handle *cth, nfct_callback callback); extern void nfct_default_conntrack_display(void *arg, unsigned int flags); extern void nfct_default_expect_display(void *arg, unsigned int flags); -extern int nfct_create_conntrack(struct nfct_handle *cth, - struct nfct_tuple *orig, - struct nfct_tuple *reply, - unsigned long timeout, - union nfct_protoinfo *proto, - unsigned int status); -extern int nfct_create_conntrack_nat(struct nfct_handle *cth, - struct nfct_tuple *orig, - struct nfct_tuple *reply, - unsigned long timeout, - union nfct_protoinfo *proto, - unsigned int status, - struct nfct_nat *nat); +extern int nfct_create_conntrack(struct nfct_handle *cth, + struct nfct_conntrack *ct); extern int nfct_update_conntrack(struct nfct_handle *cth, - struct nfct_tuple *orig, - struct nfct_tuple *reply, - unsigned long timeout, - union nfct_protoinfo *proto, - unsigned int status); -extern int nfct_delete_conntrack(struct nfct_handle *cth,struct nfct_tuple *tuple, int dir); -extern int nfct_get_conntrack(struct nfct_handle *cth,struct nfct_tuple *tuple, int dir); + struct nfct_conntrack *ct); +extern int nfct_delete_conntrack(struct nfct_handle *cth, + struct nfct_tuple *tuple, int dir); +extern int nfct_get_conntrack(struct nfct_handle *cth, + struct nfct_tuple *tuple, int dir); extern int nfct_dump_conntrack_table(struct nfct_handle *cth); -extern int nfct_dump_conntrack_table_zero(struct nfct_handle *cth); +extern int nfct_dump_conntrack_table_reset_counters(struct nfct_handle *cth); extern int nfct_event_conntrack(struct nfct_handle *cth); /* @@ -193,11 +191,7 @@ extern int nfct_event_conntrack(struct nfct_handle *cth); extern int nfct_dump_expect_list(struct nfct_handle *cth); extern int nfct_flush_conntrack_table(struct nfct_handle *cth); extern int nfct_get_expectation(struct nfct_handle *cth,struct nfct_tuple *tuple); -extern int nfct_create_expectation(struct nfct_handle *cth, - struct nfct_tuple *master, - struct nfct_tuple *tuple, - struct nfct_tuple *mask, - unsigned long timeout); +extern int nfct_create_expectation(struct nfct_handle *cth, struct nfct_expect *); extern int nfct_delete_expectation(struct nfct_handle *cth,struct nfct_tuple *tuple); extern int nfct_event_expectation(struct nfct_handle *cth); extern int nfct_flush_expectation_table(struct nfct_handle *cth); -- cgit v1.2.3