Lines Matching defs:tuple

83 /* The following nat helper functions check if the inverted reverse tuple
84 * (target) is different then the current dir tuple - meaning nat for ports
88 tcf_ct_flow_table_add_action_nat_ipv4(const struct nf_conntrack_tuple *tuple,
92 if (memcmp(&target.src.u3, &tuple->src.u3, sizeof(target.src.u3)))
97 if (memcmp(&target.dst.u3, &tuple->dst.u3, sizeof(target.dst.u3)))
118 tcf_ct_flow_table_add_action_nat_ipv6(const struct nf_conntrack_tuple *tuple,
122 if (memcmp(&target.src.u3, &tuple->src.u3, sizeof(target.src.u3)))
126 if (memcmp(&target.dst.u3, &tuple->dst.u3, sizeof(target.dst.u3)))
133 tcf_ct_flow_table_add_action_nat_tcp(const struct nf_conntrack_tuple *tuple,
140 if (target_src != tuple->src.u.tcp.port)
144 if (target_dst != tuple->dst.u.tcp.port)
151 tcf_ct_flow_table_add_action_nat_udp(const struct nf_conntrack_tuple *tuple,
158 if (target_src != tuple->src.u.udp.port)
162 if (target_dst != tuple->dst.u.udp.port)
200 const struct nf_conntrack_tuple *tuple = &ct->tuplehash[dir].tuple;
206 nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple);
208 switch (tuple->src.l3num) {
210 tcf_ct_flow_table_add_action_nat_ipv4(tuple, target,
214 tcf_ct_flow_table_add_action_nat_ipv6(tuple, target,
223 tcf_ct_flow_table_add_action_nat_tcp(tuple, target, action);
226 tcf_ct_flow_table_add_action_nat_udp(tuple, target, action);
418 struct flow_offload_tuple *tuple,
452 tuple->src_v4.s_addr = iph->saddr;
453 tuple->dst_v4.s_addr = iph->daddr;
454 tuple->src_port = ports->source;
455 tuple->dst_port = ports->dest;
456 tuple->l3proto = AF_INET;
457 tuple->l4proto = iph->protocol;
464 struct flow_offload_tuple *tuple,
494 tuple->src_v6 = ip6h->saddr;
495 tuple->dst_v6 = ip6h->daddr;
496 tuple->src_port = ports->source;
497 tuple->dst_port = ports->dest;
498 tuple->l3proto = AF_INET6;
499 tuple->l4proto = ip6h->nexthdr;
510 struct flow_offload_tuple tuple = {};
519 if (!tcf_ct_flow_table_fill_tuple_ipv4(skb, &tuple, &tcph))
523 if (!tcf_ct_flow_table_fill_tuple_ipv6(skb, &tuple, &tcph))
530 tuplehash = flow_offload_lookup(nf_ft, &tuple);
534 dir = tuplehash->tuple.dir;