summaryrefslogtreecommitdiffstats
path: root/src/conntrack/grp_getter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conntrack/grp_getter.c')
-rw-r--r--src/conntrack/grp_getter.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/conntrack/grp_getter.c b/src/conntrack/grp_getter.c
index db5b67d..a8d43cf 100644
--- a/src/conntrack/grp_getter.c
+++ b/src/conntrack/grp_getter.c
@@ -12,72 +12,72 @@
static void get_attr_grp_orig_ipv4(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_ipv4 *this = data;
- this->src = ct->tuple[__DIR_ORIG].src.v4;
- this->dst = ct->tuple[__DIR_ORIG].dst.v4;
+ this->src = ct->head.orig.src.v4;
+ this->dst = ct->head.orig.dst.v4;
}
static void get_attr_grp_repl_ipv4(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_ipv4 *this = data;
- this->src = ct->tuple[__DIR_REPL].src.v4;
- this->dst = ct->tuple[__DIR_REPL].dst.v4;
+ this->src = ct->repl.src.v4;
+ this->dst = ct->repl.dst.v4;
}
static void get_attr_grp_orig_ipv6(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_ipv6 *this = data;
- memcpy(this->src, &ct->tuple[__DIR_ORIG].src.v6, sizeof(u_int32_t)*4);
- memcpy(this->dst, &ct->tuple[__DIR_ORIG].dst.v6, sizeof(u_int32_t)*4);
+ memcpy(this->src, &ct->head.orig.src.v6, sizeof(u_int32_t)*4);
+ memcpy(this->dst, &ct->head.orig.dst.v6, sizeof(u_int32_t)*4);
}
static void get_attr_grp_repl_ipv6(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_ipv6 *this = data;
- memcpy(this->src, &ct->tuple[__DIR_REPL].src.v6, sizeof(u_int32_t)*4);
- memcpy(this->dst, &ct->tuple[__DIR_REPL].dst.v6, sizeof(u_int32_t)*4);
+ memcpy(this->src, &ct->repl.src.v6, sizeof(u_int32_t)*4);
+ memcpy(this->dst, &ct->repl.dst.v6, sizeof(u_int32_t)*4);
}
static void get_attr_grp_orig_port(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_port *this = data;
- this->sport = ct->tuple[__DIR_ORIG].l4src.all;
- this->dport = ct->tuple[__DIR_ORIG].l4dst.all;
+ this->sport = ct->head.orig.l4src.all;
+ this->dport = ct->head.orig.l4dst.all;
}
static void get_attr_grp_repl_port(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_port *this = data;
- this->sport = ct->tuple[__DIR_REPL].l4src.all;
- this->dport = ct->tuple[__DIR_REPL].l4dst.all;
+ this->sport = ct->repl.l4src.all;
+ this->dport = ct->repl.l4dst.all;
}
static void get_attr_grp_icmp(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_icmp *this = data;
- this->type = ct->tuple[__DIR_ORIG].l4dst.icmp.type;
- this->code = ct->tuple[__DIR_ORIG].l4dst.icmp.code;
- this->id = ct->tuple[__DIR_ORIG].l4src.icmp.id;
+ this->type = ct->head.orig.l4dst.icmp.type;
+ this->code = ct->head.orig.l4dst.icmp.code;
+ this->id = ct->head.orig.l4src.icmp.id;
}
static void get_attr_grp_master_ipv4(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_ipv4 *this = data;
- this->src = ct->tuple[__DIR_MASTER].src.v4;
- this->dst = ct->tuple[__DIR_MASTER].dst.v4;
+ this->src = ct->master.src.v4;
+ this->dst = ct->master.dst.v4;
}
static void get_attr_grp_master_ipv6(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_ipv6 *this = data;
- memcpy(this->src, &ct->tuple[__DIR_MASTER].src.v6, sizeof(u_int32_t)*4);
- memcpy(this->dst, &ct->tuple[__DIR_MASTER].dst.v6, sizeof(u_int32_t)*4);
+ memcpy(this->src, &ct->master.src.v6, sizeof(u_int32_t)*4);
+ memcpy(this->dst, &ct->master.dst.v6, sizeof(u_int32_t)*4);
}
static void get_attr_grp_master_port(const struct nf_conntrack *ct, void *data)
{
struct nfct_attr_grp_port *this = data;
- this->sport = ct->tuple[__DIR_MASTER].l4src.all;
- this->dport = ct->tuple[__DIR_MASTER].l4dst.all;
+ this->sport = ct->master.l4src.all;
+ this->dport = ct->master.l4dst.all;
}
static void get_attr_grp_orig_ctrs(const struct nf_conntrack *ct, void *data)