Lines Matching refs:tuple

93 /* The following nat helper functions check if the inverted reverse tuple
94 * (target) is different then the current dir tuple - meaning nat for ports
98 tcf_ct_flow_table_add_action_nat_ipv4(const struct nf_conntrack_tuple *tuple,
102 if (memcmp(&target.src.u3, &tuple->src.u3, sizeof(target.src.u3)))
107 if (memcmp(&target.dst.u3, &tuple->dst.u3, sizeof(target.dst.u3)))
128 tcf_ct_flow_table_add_action_nat_ipv6(const struct nf_conntrack_tuple *tuple,
132 if (memcmp(&target.src.u3, &tuple->src.u3, sizeof(target.src.u3)))
136 if (memcmp(&target.dst.u3, &tuple->dst.u3, sizeof(target.dst.u3)))
143 tcf_ct_flow_table_add_action_nat_tcp(const struct nf_conntrack_tuple *tuple,
150 if (target_src != tuple->src.u.tcp.port)
154 if (target_dst != tuple->dst.u.tcp.port)
161 tcf_ct_flow_table_add_action_nat_udp(const struct nf_conntrack_tuple *tuple,
168 if (target_src != tuple->src.u.udp.port)
172 if (target_dst != tuple->dst.u.udp.port)
209 const struct nf_conntrack_tuple *tuple = &ct->tuplehash[dir].tuple;
215 nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple);
217 switch (tuple->src.l3num) {
219 tcf_ct_flow_table_add_action_nat_ipv4(tuple, target,
223 tcf_ct_flow_table_add_action_nat_ipv6(tuple, target,
232 tcf_ct_flow_table_add_action_nat_tcp(tuple, target, action);
235 tcf_ct_flow_table_add_action_nat_udp(tuple, target, action);
409 entry->tuplehash[dir].tuple.xmit_type = FLOW_OFFLOAD_XMIT_TC;
410 entry->tuplehash[dir].tuple.tc.iifidx = act_ct_ext->ifindex[dir];
490 struct nf_conntrack_tuple *tuple;
498 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
500 if (tuple->src.u.gre.key || tuple->dst.u.gre.key)
518 struct flow_offload_tuple *tuple,
566 tuple->src_port = ports->source;
567 tuple->dst_port = ports->dest;
581 tuple->src_v4.s_addr = iph->saddr;
582 tuple->dst_v4.s_addr = iph->daddr;
583 tuple->l3proto = AF_INET;
584 tuple->l4proto = ipproto;
591 struct flow_offload_tuple *tuple,
635 tuple->src_port = ports->source;
636 tuple->dst_port = ports->dest;
650 tuple->src_v6 = ip6h->saddr;
651 tuple->dst_v6 = ip6h->daddr;
652 tuple->l3proto = AF_INET6;
653 tuple->l4proto = nexthdr;
664 struct flow_offload_tuple tuple = {};
674 if (!tcf_ct_flow_table_fill_tuple_ipv4(skb, &tuple, &tcph))
678 if (!tcf_ct_flow_table_fill_tuple_ipv6(skb, &tuple, &tcph))
685 tuplehash = flow_offload_lookup(nf_ft, &tuple);
689 dir = tuplehash->tuple.dir;
1530 nla_put_u8(skb, TCA_CT_HELPER_FAMILY, helper->tuple.src.l3num) ||
1531 nla_put_u8(skb, TCA_CT_HELPER_PROTO, helper->tuple.dst.protonum))