diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-05-20 21:13:06 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-05-20 21:13:06 +0000 |
commit | 9f1b4b2d028129966f7e6f23cec6ac0712c2b1b6 (patch) | |
tree | d635d4e4ad7dac6918470676bf222f27d21f192e /include | |
parent | 2932c6b8e6952ae84b221b854b43810c61e5c8fa (diff) | |
download | conntrack-tools-9f1b4b2d028129966f7e6f23cec6ac0712c2b1b6.tar.gz conntrack-tools-9f1b4b2d028129966f7e6f23cec6ac0712c2b1b6.zip |
- introduce cache_iterate
- empty debug_ct function if DEBUG_CT is not set
- revisit overrun handler: this is a hard battle, just try to do our best here, call Patrick :)
- explicit warning message when netlink_buffer_max_growth is reached
- fix silly bug in stats-mode when dumping in XML format
- fix UDP handler for conntrack
Diffstat (limited to 'include')
-rw-r--r-- | include/cache.h | 1 | ||||
-rw-r--r-- | include/conntrackd.h | 4 | ||||
-rw-r--r-- | include/debug.h | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/include/cache.h b/include/cache.h index 7d9559a..e755dbe 100644 --- a/include/cache.h +++ b/include/cache.h @@ -82,6 +82,7 @@ int cache_test(struct cache *c, struct nf_conntrack *ct); void cache_stats(struct cache *c, int fd); struct us_conntrack *cache_get_conntrack(struct cache *, void *); void *cache_get_extra(struct cache *, void *); +void cache_iterate(struct cache *c, void *data, int (*iterate)(void *data1, void *data2)); /* iterators */ void cache_dump(struct cache *c, int fd, int type); diff --git a/include/conntrackd.h b/include/conntrackd.h index a5f7a3a..76b9747 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -102,11 +102,9 @@ struct ct_general_state { struct ignore_pool *ignore_pool; struct nfnl_handle *event; /* event handler */ - struct nfnl_handle *sync; /* sync handler */ struct nfnl_handle *dump; /* dump handler */ struct nfnl_subsys_handle *subsys_event; /* events */ - struct nfnl_subsys_handle *subsys_sync; /* resync */ struct nfnl_subsys_handle *subsys_dump; /* dump */ /* statistics */ @@ -159,7 +157,7 @@ struct ct_mode { int (*local)(int fd, int type, void *data); void (*kill)(void); void (*dump)(struct nf_conntrack *ct, struct nlmsghdr *nlh); - void (*overrun)(struct nf_conntrack *ct, struct nlmsghdr *nlh); + void (*overrun)(void); void (*event_new)(struct nf_conntrack *ct, struct nlmsghdr *nlh); void (*event_upd)(struct nf_conntrack *ct, struct nlmsghdr *nlh); int (*event_dst)(struct nf_conntrack *ct, struct nlmsghdr *nlh); diff --git a/include/debug.h b/include/debug.h index 67f2c71..4d1f44f 100644 --- a/include/debug.h +++ b/include/debug.h @@ -11,8 +11,11 @@ #include <netinet/in.h> #include <libnetfilter_conntrack/libnetfilter_conntrack.h> +#undef DEBUG_CT + static inline void debug_ct(struct nf_conntrack *ct, char *msg) { +#ifdef DEBUG_CT struct in_addr addr, addr2, addr3, addr4; debug("----%s (%p) ----\n", msg, ct); @@ -48,6 +51,7 @@ static inline void debug_ct(struct nf_conntrack *ct, char *msg) inet_ntoa(addr4), ntohs(nfct_get_attr_u16(ct, ATTR_REPL_PORT_DST))); debug("-------------------------\n"); +#endif } #endif |