diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-04 14:28:50 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-10 01:54:26 +0100 |
commit | 65be3d49b0f4350a227dedd70ac17c7c9cf6274e (patch) | |
tree | ebe1954323cc40b05d1772f46b5a54d4948c2918 /include/internal.h | |
parent | 1f29809eac0b9d8c711c97e8fcec6833fcd30248 (diff) | |
download | conntrack-tools-65be3d49b0f4350a227dedd70ac17c7c9cf6274e.tar.gz conntrack-tools-65be3d49b0f4350a227dedd70ac17c7c9cf6274e.zip |
conntrackd: generalize caching infrastructure
This patch generalizes the caching infrastructure to store different
object types. This patch is the first in the series to prepare
support for the synchronization of expectations.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/internal.h')
-rw-r--r-- | include/internal.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/internal.h b/include/internal.h index 1f11340..f50eb79 100644 --- a/include/internal.h +++ b/include/internal.h @@ -12,25 +12,28 @@ enum { }; struct internal_handler { - void *data; unsigned int flags; int (*init)(void); void (*close)(void); - void (*new)(struct nf_conntrack *ct, int origin_type); - void (*update)(struct nf_conntrack *ct, int origin_type); - int (*destroy)(struct nf_conntrack *ct, int origin_type); + struct { + void *data; - void (*dump)(int fd, int type); - void (*populate)(struct nf_conntrack *ct); - void (*purge)(void); - int (*resync)(enum nf_conntrack_msg_type type, - struct nf_conntrack *ct, void *data); - void (*flush)(void); + void (*new)(struct nf_conntrack *ct, int origin_type); + void (*upd)(struct nf_conntrack *ct, int origin_type); + int (*del)(struct nf_conntrack *ct, int origin_type); - void (*stats)(int fd); - void (*stats_ext)(int fd); + void (*dump)(int fd, int type); + void (*populate)(struct nf_conntrack *ct); + void (*purge)(void); + int (*resync)(enum nf_conntrack_msg_type type, + struct nf_conntrack *ct, void *data); + void (*flush)(void); + + void (*stats)(int fd); + void (*stats_ext)(int fd); + } ct; }; extern struct internal_handler internal_cache; |