/* >= this indicates reply direction */ /*数据包是reply方向*/ IP_CT_IS_REPLY, /...
int nf_ct_exts_add(const struct nf_conn *ct, void *ext); void *nf_ct_exts_get(const struct nf_conn *ct, int idx); void nf_ct_exts_remove(const struct nf_conn *ct, int idx); struct nf_conntrack_ext *nf_conn_exts_find(const struct nf_conn *ct); struct nf_conntrack_ext *nf...
void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) { struct nf_ct_ext *new; int i, newlen, newoff; struct nf_ct_ext_type *t;/* Conntrack must not be confirmed to avoid races on reallocation. */ NF_CT_ASSERT(!nf_ct_is_confirmed(ct));...
可以发现,struct nf_ct_ext_type仅仅只是保存了struct nf_ct_ext所必要的一些信息而已。 至于为何要对齐,是因为扩展不只是一种,它们的数组结构也不一样,对齐方式都不一样,所以得保存自己的对齐方式,再对齐。 2.添加一个acct扩展 nf_ct_acct_ext_add:/include/net/netfilter/nf_conntrack_acct.h ...
if (nat_ipv6_dev_get_saddr(nf_ct_net(ct), out, &ipv6_hdr(skb)->daddr, 0, &src) < 0) return NF_DROP; nat = nf_ct_nat_ext_add(ct); if (nat) nat->masq_index = out->ifindex; newrange.flags = range->flags | NF_NAT_RANGE_MAP_IPS; newrange.min_addr.in6 = ...
MAX_EXT_SLOTS 8 #define BITINT 1 struct nf_conntrack_ext { /* 必须有一个数组用于自省或者反射 */ int bits_idx[MAX_EXT_SLOTS]; int bits[BITINT]; char *slot[MAX_EXT_SLOTS]; }; int nf_ct_exts_add(const struct nf_conn *ct, void *ext); void *nf_ct_exts_get(const struct nf_...
Cut Tape (CT) & Digi-Reel® QuantityUnit PriceExt Price 1$6.63000$6.63 10$6.16900$61.69 25$5.98240$149.56 50$5.84080$292.04 100$5.69990$569.99 250$5.51520$1,378.80 500$5.37736$2,688.68 * All Digi-Reel orders will add a $7.00 reeling fee. ...
320&net->ct.hash[hash]); 321hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_REPLY].hnnode, 322&net->ct.hash[repl_hash]); 323} 3.记录的删除 59staticinlinevoidhlist_nulls_del_rcu(structhlist_nulls_node*n) 60{ 61__hlist_nulls_del(n); ...
ipv4 / netfilter / nf_nat_pptp.c v6 v6.14 v6.13 v6.13.7 v6.13.6 v6.13.5 v6.13.4 v6.13.3 v6.13.2 v6.13.1 v6.13 v6.13-rc7 v6.13-rc6 v6.13-rc5 v6.13-rc4 v6.13-rc3 v6.13-rc2 v6.13-rc1 v6.12
help (compared against server response) */structnf_conntrack_tupletuple;/* Function to call when data passes; return verdict, or -1 toinvalidate. */int(*help)(structsk_buff*skb,unsignedintprotoff,structnf_conn*ct,enumip_conntrack_infoconntrackinfo);void(*destroy)(structnf_conn*ct);int(*...