]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/netfilter/nf_conntrack.h
[NETFILTER]: nf_conntrack: add tuplehash l3num/protonum accessors
[linux-2.6-omap-h63xx.git] / include / net / netfilter / nf_conntrack.h
index 4a0496aa32d553dc41534a3ff90cbe5126d2a5f6..26e6a6e2b5a2590c8e990cac7830d3f82a71ee7d 100644 (file)
@@ -140,6 +140,16 @@ nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash)
                            tuplehash[hash->tuple.dst.dir]);
 }
 
+static inline u_int16_t nf_ct_l3num(const struct nf_conn *ct)
+{
+       return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num;
+}
+
+static inline u_int8_t nf_ct_protonum(const struct nf_conn *ct)
+{
+       return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum;
+}
+
 /* get master conntrack via master expectation */
 #define master_ct(conntr) (conntr->master)