Home
last modified time | relevance | path

Searched refs:tuple (Results 1 – 25 of 60) sorted by relevance

123

/net/ipv4/netfilter/
A Dnf_nat_h323.c123 tuple.dst.u3, in set_sig_addr()
135 tuple.src.u3, in set_sig_addr()
309 &exp->tuple.src.u3.ip, in nat_t120()
311 &exp->tuple.dst.u3.ip, in nat_t120()
356 &exp->tuple.src.u3.ip, in nat_h245()
358 &exp->tuple.dst.u3.ip, in nat_h245()
448 &exp->tuple.src.u3.ip, in nat_q931()
450 &exp->tuple.dst.u3.ip, in nat_q931()
491 exp->tuple.dst.u3.ip = ct->tuplehash[!dir].tuple.dst.u3.ip; in nat_callforwarding()
512 &exp->tuple.src.u3.ip, in nat_callforwarding()
[all …]
/net/netfilter/
A Dnf_flow_table_ip.c241 tuple->l3proto = AF_INET; in nf_flow_tuple_ip()
242 tuple->l4proto = ipproto; in nf_flow_tuple_ip()
267 return dst_check(tuple->dst_cache, tuple->dst_cookie); in nf_flow_dst_check()
380 dir = tuplehash->tuple.dir; in nf_flow_offload_forward()
451 dir = tuplehash->tuple.dir; in nf_flow_offload_ip_hook()
639 tuple->src_v6 = ip6h->saddr; in nf_flow_tuple_ipv6()
640 tuple->dst_v6 = ip6h->daddr; in nf_flow_tuple_ipv6()
641 tuple->l3proto = AF_INET6; in nf_flow_tuple_ipv6()
642 tuple->l4proto = nexthdr; in nf_flow_tuple_ipv6()
659 dir = tuplehash->tuple.dir; in nf_flow_offload_ipv6_forward()
[all …]
A Dnf_nat_sip.c189 &ct->tuplehash[dir].tuple.src.u3) || in nf_nat_sip()
194 &ct->tuplehash[dir].tuple.dst.u3) || in nf_nat_sip()
216 &ct->tuplehash[!dir].tuple.dst.u3, in nf_nat_sip()
233 &ct->tuplehash[!dir].tuple.src.u3, in nf_nat_sip()
342 pair_exp->tuple.dst.protonum == ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum && in nf_nat_sip_expected()
393 newaddr = exp->tuple.dst.u3; in nf_nat_sip_expect()
407 exp->saved_addr = exp->tuple.dst.u3; in nf_nat_sip_expect()
408 exp->tuple.dst.u3 = newaddr; in nf_nat_sip_expect()
576 *rtp_addr = rtp_exp->tuple.dst.u3; in nf_nat_sdp_media()
581 rtp_exp->tuple.dst.u3 = *rtp_addr; in nf_nat_sdp_media()
[all …]
A Dnf_nat_core.c169 combined.src = tuple->src; in hash_by_src()
433 port = tuple->src.u.all; in l4proto_in_range()
435 port = tuple->dst.u.all; in l4proto_in_range()
488 if (same_src(ct, tuple) && in find_appropriate_src()
494 result->dst = tuple->dst; in find_appropriate_src()
527 var_ipp = &tuple->src.u3; in find_best_ips_proto()
529 var_ipp = &tuple->dst.u3; in find_best_ips_proto()
549 j = jhash2((u32 *)&tuple->src.u3, sizeof(tuple->src.u3) / sizeof(u32), in find_best_ips_proto()
631 keyptr = &tuple->src.u.all; in nf_nat_l4proto_unique_tuple()
731 *tuple = *orig_tuple; in get_unique_tuple()
[all …]
A Dnf_conntrack_expect.c97 combined.dst_addr = tuple->dst.u3; in nf_ct_expect_dst_hash()
114 return nf_ct_tuple_mask_cmp(tuple, &i->tuple, &i->mask) && in nf_ct_exp_equal()
262 return nf_ct_tuple_mask_cmp(&a->tuple, &b->tuple, &intersect_mask) && in expect_clash()
270 return nf_ct_tuple_equal(&a->tuple, &b->tuple) && in expect_matches()
329 exp->tuple.src.l3num = family; in nf_ct_expect_init()
343 memset(&exp->tuple.src.u3, 0x00, sizeof(exp->tuple.src.u3)); in nf_ct_expect_init()
348 exp->tuple.src.u.all = *src; in nf_ct_expect_init()
351 exp->tuple.src.u.all = 0; in nf_ct_expect_init()
361 exp->tuple.dst.u.all = *dst; in nf_ct_expect_init()
641 expect->tuple.src.l3num, in exp_seq_show()
[all …]
A Dnf_nat_proto.c48 newport = tuple->src.u.udp.port; in __udp_manip_pkt()
52 newport = tuple->dst.u.udp.port; in __udp_manip_pkt()
163 newport = tuple->src.u.tcp.port; in tcp_manip_pkt()
282 switch (tuple->dst.protonum) { in l4proto_manip_pkt()
285 tuple, maniptype); in l4proto_manip_pkt()
288 tuple, maniptype); in l4proto_manip_pkt()
291 tuple, maniptype); in l4proto_manip_pkt()
294 tuple, maniptype); in l4proto_manip_pkt()
297 tuple, maniptype); in l4proto_manip_pkt()
300 tuple, maniptype); in l4proto_manip_pkt()
[all …]
A Dxt_conntrack.c79 const struct nf_conntrack_tuple *tuple; in ct_proto_port_check() local
81 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ct_proto_port_check()
89 (tuple->src.u.all == info->origsrc_port) ^ in ct_proto_port_check()
98 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ct_proto_port_check()
123 const struct nf_conntrack_tuple *tuple; in ct_proto_port_check_v3() local
125 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ct_proto_port_check_v3()
134 ntohs(tuple->src.u.all), in ct_proto_port_check_v3()
140 ntohs(tuple->dst.u.all), in ct_proto_port_check_v3()
144 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ct_proto_port_check_v3()
148 ntohs(tuple->src.u.all), in ct_proto_port_check_v3()
[all …]
A Dnf_conntrack_h323_main.c321 nf_ct_dump_tuple(&exp->tuple); in expect_t120()
582 .tuple.src.l3num = AF_UNSPEC,
1146 .tuple.src.l3num = AF_INET,
1155 .tuple.src.l3num = AF_INET6,
1191 memset(&tuple.src.u3, 0, sizeof(tuple.src.u3)); in find_expect()
1192 tuple.src.u.tcp.port = 0; in find_expect()
1193 memcpy(&tuple.dst.u3, addr, sizeof(tuple.dst.u3)); in find_expect()
1194 tuple.dst.u.tcp.port = port; in find_expect()
1312 nf_ct_dump_tuple(&exp->tuple); in process_gcf()
1717 .tuple.src.l3num = AF_INET,
[all …]
A Dnf_flow_table_offload.c119 if (tuple->encap_num > 0 && !(tuple->in_vlan_ingress & BIT(0)) && in nf_flow_rule_match()
123 tuple->encap[0].id, in nf_flow_rule_match()
124 tuple->encap[0].proto); in nf_flow_rule_match()
128 if (tuple->encap_num > 1 && !(tuple->in_vlan_ingress & BIT(1)) && in nf_flow_rule_match()
134 tuple->encap[1].id, in nf_flow_rule_match()
140 tuple->encap[1].id, in nf_flow_rule_match()
145 switch (tuple->l3proto) { in nf_flow_rule_match()
169 switch (tuple->l4proto) { in nf_flow_rule_match()
189 switch (tuple->l4proto) { in nf_flow_rule_match()
642 tuple = &flow->tuplehash[dir].tuple; in nf_flow_rule_route_common()
[all …]
A Dnf_flow_table_core.c89 struct dst_entry *dst = route->tuple[dir].dst; in nft_route_dst_fetch()
91 route->tuple[dir].dst = NULL; in nft_route_dst_fetch()
113 flow_tuple->iifidx = route->tuple[dir].in.ifindex; in flow_offload_fill_route()
117 if (route->tuple[dir].in.ingress_vlans & BIT(i)) in flow_offload_fill_route()
123 switch (route->tuple[dir].xmit_type) { in flow_offload_fill_route()
152 dst_release(flow->tuplehash[dir].tuple.dst_cache); in nft_flow_dst_release()
268 const struct flow_offload_tuple *tuple = data; in flow_offload_hash() local
286 if (memcmp(&x->tuple, tuple, offsetof(struct flow_offload_tuple, __hash))) in flow_offload_hash_cmp()
393 struct flow_offload_tuple *tuple) in flow_offload_lookup() argument
404 dir = tuplehash->tuple.dir; in flow_offload_lookup()
[all …]
A Dnf_conntrack_proto_icmp.c37 tuple->dst.u.icmp.type = hp->type; in icmp_pkt_to_tuple()
38 tuple->src.u.icmp.id = hp->un.echo.id; in icmp_pkt_to_tuple()
39 tuple->dst.u.icmp.code = hp->code; in icmp_pkt_to_tuple()
63 tuple->src.u.icmp.id = orig->src.u.icmp.id; in nf_conntrack_invert_icmp_tuple()
65 tuple->dst.u.icmp.code = orig->dst.u.icmp.code; in nf_conntrack_invert_icmp_tuple()
93 ct->tuplehash[0].tuple.dst.u.icmp.type); in nf_conntrack_icmp_packet()
94 nf_ct_dump_tuple_ip(&ct->tuplehash[0].tuple); in nf_conntrack_icmp_packet()
170 ct_daddr = &ct->tuplehash[dir].tuple.dst.u3; in nf_conntrack_inet_error()
275 struct nf_conntrack_tuple *tuple, in icmp_nlattr_to_tuple() argument
283 if (tuple->dst.u.icmp.type >= sizeof(invmap) || in icmp_nlattr_to_tuple()
[all …]
A Dnft_flow_offload.c35 route->tuple[!dir].in.ifindex = dst_cache->dev->ifindex; in nft_default_forward_path()
36 route->tuple[dir].dst = dst_cache; in nft_default_forward_path()
37 route->tuple[dir].xmit_type = nft_xmit_type(dst_cache); in nft_default_forward_path()
55 const void *daddr = &ct->tuplehash[!dir].tuple.src.u3; in nft_dev_fill_forward_path()
210 route->tuple[!dir].in.num_encaps = info.num_encaps; in nft_dev_forward_path()
218 route->tuple[dir].xmit_type = info.xmit_type; in nft_dev_forward_path()
334 struct nf_conntrack_tuple *tuple; in nft_flow_offload_eval() local
338 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in nft_flow_offload_eval()
340 if (tuple->src.u.gre.key || tuple->dst.u.gre.key) in nft_flow_offload_eval()
381 dst_release(route.tuple[dir].dst); in nft_flow_offload_eval()
[all …]
A Dnf_conntrack_core.c223 return siphash((void *)tuple, in hash_conntrack_raw()
273 struct nf_conntrack_tuple *tuple) in nf_ct_get_tuple() argument
279 memset(tuple, 0, sizeof(*tuple)); in nf_ct_get_tuple()
281 tuple->src.l3num = l3num; in nf_ct_get_tuple()
301 tuple->src.u3.ip = ap[0]; in nf_ct_get_tuple()
302 tuple->dst.u3.ip = ap[1]; in nf_ct_get_tuple()
305 memcpy(tuple->src.u3.ip6, ap, sizeof(tuple->src.u3.ip6)); in nf_ct_get_tuple()
306 memcpy(tuple->dst.u3.ip6, ap + 4, sizeof(tuple->dst.u3.ip6)); in nf_ct_get_tuple()
310 tuple->dst.protonum = protonum; in nf_ct_get_tuple()
696 return nf_ct_tuple_equal(tuple, &h->tuple) && in nf_ct_key_equal()
[all …]
A Dnf_conntrack_proto_icmpv6.c34 struct nf_conntrack_tuple *tuple) in icmpv6_pkt_to_tuple() argument
42 tuple->dst.u.icmp.type = hp->icmp6_type; in icmpv6_pkt_to_tuple()
43 tuple->src.u.icmp.id = hp->icmp6_identifier; in icmpv6_pkt_to_tuple()
44 tuple->dst.u.icmp.code = hp->icmp6_code; in icmpv6_pkt_to_tuple()
77 tuple->src.u.icmp.id = orig->src.u.icmp.id; in nf_conntrack_invert_icmpv6_tuple()
78 tuple->dst.u.icmp.type = invmap[type] - 1; in nf_conntrack_invert_icmpv6_tuple()
79 tuple->dst.u.icmp.code = orig->dst.u.icmp.code; in nf_conntrack_invert_icmpv6_tuple()
110 nf_ct_dump_tuple_ipv6(&ct->tuplehash[0].tuple); in nf_conntrack_icmpv6_packet()
252 struct nf_conntrack_tuple *tuple, in icmpv6_nlattr_to_tuple() argument
260 if (tuple->dst.u.icmp.type < 128 || in icmpv6_nlattr_to_tuple()
[all …]
A Dnf_conntrack_proto.c269 struct nf_conntrack_tuple tuple; in getorigdst() local
271 memset(&tuple, 0, sizeof(tuple)); in getorigdst()
274 tuple.src.u3.ip = inet->inet_rcv_saddr; in getorigdst()
276 tuple.dst.u3.ip = inet->inet_daddr; in getorigdst()
278 tuple.src.l3num = PF_INET; in getorigdst()
279 tuple.dst.protonum = sk->sk_protocol; in getorigdst()
284 tuple.dst.protonum != IPPROTO_SCTP) in getorigdst()
297 .tuple.dst.u.tcp.port; in getorigdst()
299 .tuple.dst.u3.ip; in getorigdst()
335 tuple.dst.u3.in6 = sk->sk_v6_daddr; in ipv6_getorigdst()
[all …]
A Dnfnetlink_cthelper.c250 memcpy(&helper->tuple, tuple, sizeof(struct nf_conntrack_tuple)); in nfnl_cthelper_create()
424 struct nf_conntrack_tuple tuple; in nfnl_cthelper_new() local
446 if ((tuple.src.l3num != cur->tuple.src.l3num || in nfnl_cthelper_new()
447 tuple.dst.protonum != cur->tuple.dst.protonum)) in nfnl_cthelper_new()
476 htons(helper->tuple.src.l3num))) in nfnl_cthelper_dump_tuple()
623 struct nf_conntrack_tuple tuple; in nfnl_cthelper_get() local
655 (tuple.src.l3num != cur->tuple.src.l3num || in nfnl_cthelper_get()
656 tuple.dst.protonum != cur->tuple.dst.protonum)) in nfnl_cthelper_get()
686 struct nf_conntrack_tuple tuple; in nfnl_cthelper_del() local
715 (tuple.src.l3num != cur->tuple.src.l3num || in nfnl_cthelper_del()
[all …]
A Dnf_flow_table_bpf.c37 struct flow_offload_tuple *tuple, __be16 proto) in bpf_xdp_flow_tuple_lookup() argument
47 tuplehash = flow_offload_lookup(nf_flow_table, tuple); in bpf_xdp_flow_tuple_lookup()
52 tuplehash[tuplehash->tuple.dir]); in bpf_xdp_flow_tuple_lookup()
63 struct flow_offload_tuple tuple = { in bpf_xdp_flow_lookup() local
80 tuple.src_v4.s_addr = fib_tuple->ipv4_src; in bpf_xdp_flow_lookup()
81 tuple.dst_v4.s_addr = fib_tuple->ipv4_dst; in bpf_xdp_flow_lookup()
85 tuple.src_v6 = *(struct in6_addr *)&fib_tuple->ipv6_src; in bpf_xdp_flow_lookup()
86 tuple.dst_v6 = *(struct in6_addr *)&fib_tuple->ipv6_dst; in bpf_xdp_flow_lookup()
94 tuplehash = bpf_xdp_flow_tuple_lookup(xdp->rxq->dev, &tuple, proto); in bpf_xdp_flow_lookup()
A Dnf_conncount.c43 struct nf_conntrack_tuple tuple; member
147 if (nf_ct_tuple_equal(&conn->tuple, tuple) && in __nf_conncount_add()
159 if (nf_ct_tuple_equal(&conn->tuple, tuple) && in __nf_conncount_add()
191 conn->tuple = *tuple; in __nf_conncount_add()
203 const struct nf_conntrack_tuple *tuple, in nf_conncount_add() argument
316 const struct nf_conntrack_tuple *tuple, in insert_tree() argument
378 conn->tuple = *tuple; in insert_tree()
400 const struct nf_conntrack_tuple *tuple, in count_tree() argument
425 if (!tuple) { in count_tree()
449 if (!tuple) in count_tree()
[all …]
A Dnf_conntrack_proto_gre.c61 return km->tuple.src.l3num == t->src.l3num && in gre_key_cmpfn()
64 km->tuple.dst.protonum == t->dst.protonum && in gre_key_cmpfn()
65 km->tuple.dst.u.all == t->dst.u.all; in gre_key_cmpfn()
77 key = km->tuple.src.u.gre.key; in gre_keymap_lookup()
112 memcpy(&km->tuple, t, sizeof(*t)); in nf_ct_gre_keymap_add()
116 nf_ct_dump_tuple(&km->tuple); in nf_ct_gre_keymap_add()
164 tuple->src.u.all = 0; in gre_pkt_to_tuple()
165 tuple->dst.u.all = 0; in gre_pkt_to_tuple()
179 tuple->dst.u.gre.key = pgrehdr->call_id; in gre_pkt_to_tuple()
180 srckey = gre_keymap_lookup(net, tuple); in gre_pkt_to_tuple()
[all …]
A Dnf_conntrack_bpf.c69 struct nf_conntrack_tuple *tuple) in bpf_nf_ct_tuple_parse() argument
71 union nf_inet_addr *src = dir ? &tuple->dst.u3 : &tuple->src.u3; in bpf_nf_ct_tuple_parse()
72 union nf_inet_addr *dst = dir ? &tuple->src.u3 : &tuple->dst.u3; in bpf_nf_ct_tuple_parse()
74 : &tuple->src.u; in bpf_nf_ct_tuple_parse()
76 : (void *)&tuple->dst.u; in bpf_nf_ct_tuple_parse()
81 memset(tuple, 0, sizeof(*tuple)); in bpf_nf_ct_tuple_parse()
85 tuple->src.l3num = AF_INET; in bpf_nf_ct_tuple_parse()
92 tuple->src.l3num = AF_INET6; in bpf_nf_ct_tuple_parse()
101 tuple->dst.protonum = protonum; in bpf_nf_ct_tuple_parse()
102 tuple->dst.dir = dir; in bpf_nf_ct_tuple_parse()
[all …]
A Dnf_conntrack_helper.c47 return (((tuple->src.l3num << 8) | tuple->dst.protonum) ^ in helper_hash()
62 if (h->tuple.src.l3num != NFPROTO_UNSPEC && in __nf_conntrack_helper_find()
63 h->tuple.src.l3num != l3num) in __nf_conntrack_helper_find()
66 if (h->tuple.dst.protonum == protonum) in __nf_conntrack_helper_find()
350 unsigned int h = helper_hash(&me->tuple); in nf_conntrack_helper_register()
369 cur->tuple.src.l3num == me->tuple.src.l3num) && in nf_conntrack_helper_register()
370 cur->tuple.dst.protonum == me->tuple.dst.protonum) { in nf_conntrack_helper_register()
380 if (nf_ct_tuple_src_mask_cmp(&cur->tuple, &me->tuple, in nf_conntrack_helper_register()
439 helper->tuple.src.l3num = l3num; in nf_ct_helper_init()
440 helper->tuple.dst.protonum = protonum; in nf_ct_helper_init()
[all …]
A Dnf_conntrack_tftp.c48 struct nf_conntrack_tuple *tuple; in tftp_help() local
61 nf_ct_dump_tuple(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in tftp_help()
62 nf_ct_dump_tuple(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); in tftp_help()
69 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in tftp_help()
72 &tuple->src.u3, &tuple->dst.u3, in tftp_help()
73 IPPROTO_UDP, NULL, &tuple->dst.u.udp.port); in tftp_help()
76 nf_ct_dump_tuple(&exp->tuple); in tftp_help()
A Dnf_conntrack_amanda.c95 struct nf_conntrack_tuple *tuple; in amanda_help() local
152 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in amanda_help()
155 &tuple->src.u3, &tuple->dst.u3, in amanda_help()
183 .tuple.src.l3num = AF_INET,
184 .tuple.src.u.udp.port = cpu_to_be16(10080),
185 .tuple.dst.protonum = IPPROTO_UDP,
193 .tuple.src.l3num = AF_INET6,
194 .tuple.src.u.udp.port = cpu_to_be16(10080),
195 .tuple.dst.protonum = IPPROTO_UDP,
/net/netfilter/ipvs/
A Dip_vs_nfct.c233 __func__, ct, ARG_TUPLE(&exp->tuple)); in ip_vs_nfct_expect_related()
246 struct nf_conntrack_tuple tuple; in ip_vs_conn_drop_conntrack() local
251 tuple = (struct nf_conntrack_tuple) { in ip_vs_conn_drop_conntrack()
253 tuple.src.u3 = cp->caddr; in ip_vs_conn_drop_conntrack()
254 tuple.src.u.all = cp->cport; in ip_vs_conn_drop_conntrack()
255 tuple.src.l3num = cp->af; in ip_vs_conn_drop_conntrack()
256 tuple.dst.u3 = cp->vaddr; in ip_vs_conn_drop_conntrack()
257 tuple.dst.u.all = cp->vport; in ip_vs_conn_drop_conntrack()
268 __func__, ct, ARG_TUPLE(&tuple)); in ip_vs_conn_drop_conntrack()
272 __func__, ct, ARG_TUPLE(&tuple)); in ip_vs_conn_drop_conntrack()
[all …]
/net/sched/
A Dact_ct.c207 const struct nf_conntrack_tuple *tuple = &ct->tuplehash[dir].tuple; in tcf_ct_flow_table_add_action_nat() local
215 switch (tuple->src.l3num) { in tcf_ct_flow_table_add_action_nat()
492 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in tcf_ct_flow_table_process_conn()
494 if (tuple->src.u.gre.key || tuple->dst.u.gre.key) in tcf_ct_flow_table_process_conn()
577 tuple->l3proto = AF_INET; in tcf_ct_flow_table_fill_tuple_ipv4()
578 tuple->l4proto = ipproto; in tcf_ct_flow_table_fill_tuple_ipv4()
644 tuple->src_v6 = ip6h->saddr; in tcf_ct_flow_table_fill_tuple_ipv6()
645 tuple->dst_v6 = ip6h->daddr; in tcf_ct_flow_table_fill_tuple_ipv6()
646 tuple->l3proto = AF_INET6; in tcf_ct_flow_table_fill_tuple_ipv6()
647 tuple->l4proto = nexthdr; in tcf_ct_flow_table_fill_tuple_ipv6()
[all …]

Completed in 59 milliseconds

123