diff options
author | Patrick McHardy <kaber@trash.net> | 2008-04-14 05:15:52 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-04-14 05:15:52 -0400 |
commit | 5e8fbe2ac8a3f1e34e7004c5750ef59bf9304f82 (patch) | |
tree | 7a42f4fa1825e215e3ca3f2d3b2f66a865294ce0 /include | |
parent | 5f7da4d26d421f3bdf10c3bbdb86ffc3a12a84f2 (diff) |
[NETFILTER]: nf_conntrack: add tuplehash l3num/protonum accessors
Add accessors for l3num and protonum and get rid of some overly long
expressions.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 4a0496aa32d5..26e6a6e2b5a2 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -140,6 +140,16 @@ nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash) | |||
140 | tuplehash[hash->tuple.dst.dir]); | 140 | tuplehash[hash->tuple.dst.dir]); |
141 | } | 141 | } |
142 | 142 | ||
143 | static inline u_int16_t nf_ct_l3num(const struct nf_conn *ct) | ||
144 | { | ||
145 | return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; | ||
146 | } | ||
147 | |||
148 | static inline u_int8_t nf_ct_protonum(const struct nf_conn *ct) | ||
149 | { | ||
150 | return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum; | ||
151 | } | ||
152 | |||
143 | /* get master conntrack via master expectation */ | 153 | /* get master conntrack via master expectation */ |
144 | #define master_ct(conntr) (conntr->master) | 154 | #define master_ct(conntr) (conntr->master) |
145 | 155 | ||