From 4db878d6f81fd64029c48003f4e1ae57069a7c65 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 1 May 2007 18:30:03 +0000 Subject: introduce the new expectation API --- src/expect/getter.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/expect/getter.c (limited to 'src/expect/getter.c') diff --git a/src/expect/getter.c b/src/expect/getter.c new file mode 100644 index 0000000..2cbebe6 --- /dev/null +++ b/src/expect/getter.c @@ -0,0 +1,35 @@ +/* + * (C) 2006-2007 by Pablo Neira Ayuso + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + */ + +#include "internal.h" + +static const void *get_exp_attr_master(const struct nf_expect *exp) +{ + return &exp->master; +} + +static const void *get_exp_attr_expected(const struct nf_expect *exp) +{ + return &exp->expected; +} + +static const void *get_exp_attr_mask(const struct nf_expect *exp) +{ + return &exp->mask; +} + +static const void *get_exp_attr_timeout(const struct nf_expect *exp) +{ + return &exp->timeout; +} + +get_exp_attr get_exp_attr_array[] = { + [ATTR_EXP_MASTER] = get_exp_attr_master, + [ATTR_EXP_EXPECTED] = get_exp_attr_expected, + [ATTR_EXP_MASK] = get_exp_attr_mask, + [ATTR_EXP_TIMEOUT] = get_exp_attr_timeout, +}; -- cgit v1.2.3