Home
last modified time | relevance | path

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

1234567

/linux-6.3-rc2/tools/testing/selftests/bpf/progs/
A Dtest_sk_lookup_kern.c61 struct bpf_sock_tuple *tuple; in sk_lookup_success() local
70 if (!tuple || tuple + sizeof *tuple > data_end) in sk_lookup_success()
73 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in sk_lookup_success()
87 sk = bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in sk_lookup_success_simple()
100 sk = bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in err_use_after_free()
115 sk = bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in err_modify_sk_pointer()
130 sk = bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in err_modify_sk_or_null_pointer()
142 bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in err_no_release()
152 sk = bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in err_release_twice()
164 sk = bpf_sk_lookup_tcp(skb, &tuple, sizeof(tuple), BPF_F_CURRENT_NETNS, 0); in err_release_unchecked()
[all …]
A Dconnect6_prog.c30 struct bpf_sock_tuple tuple = {}; in connect_v6_prog() local
35 memset(&tuple.ipv6.saddr, 0, sizeof(tuple.ipv6.saddr)); in connect_v6_prog()
36 memset(&tuple.ipv6.sport, 0, sizeof(tuple.ipv6.sport)); in connect_v6_prog()
38 tuple.ipv6.daddr[0] = bpf_htonl(DST_REWRITE_IP6_0); in connect_v6_prog()
43 tuple.ipv6.dport = bpf_htons(DST_REWRITE_PORT6); in connect_v6_prog()
48 sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof(tuple.ipv6), in connect_v6_prog()
51 sk = bpf_sk_lookup_udp(ctx, &tuple, sizeof(tuple.ipv6), in connect_v6_prog()
57 if (sk->src_ip6[0] != tuple.ipv6.daddr[0] || in connect_v6_prog()
58 sk->src_ip6[1] != tuple.ipv6.daddr[1] || in connect_v6_prog()
59 sk->src_ip6[2] != tuple.ipv6.daddr[2] || in connect_v6_prog()
[all …]
A Dtest_sk_assign.c109 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp()
110 if ((void *)tuple + tuple_len > (void *)(long)skb->data_end) in handle_udp()
117 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp()
140 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp()
141 if ((void *)tuple + tuple_len > (void *)(long)skb->data_end) in handle_tcp()
151 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp()
173 struct bpf_sock_tuple *tuple; in bpf_sk_assign_test() local
179 tuple = get_tuple(skb, &ipv4, &tcp); in bpf_sk_assign_test()
180 if (!tuple) in bpf_sk_assign_test()
189 ret = handle_tcp(skb, tuple, ipv4); in bpf_sk_assign_test()
[all …]
A Dcgroup_skb_sk_lookup_kern.c29 static inline void set_tuple(struct bpf_sock_tuple *tuple, in set_tuple() argument
33 set_ip(tuple->ipv6.saddr, &ip6h->daddr); in set_tuple()
34 set_ip(tuple->ipv6.daddr, &ip6h->saddr); in set_tuple()
35 tuple->ipv6.sport = tcph->dest; in set_tuple()
36 tuple->ipv6.dport = tcph->source; in set_tuple()
44 struct bpf_sock_tuple tuple; in is_allowed_peer_cg() local
45 size_t tuple_len = sizeof(tuple.ipv6); in is_allowed_peer_cg()
48 set_tuple(&tuple, ip6h, tcph); in is_allowed_peer_cg()
50 peer_sk = bpf_sk_lookup_tcp(skb, &tuple, tuple_len, in is_allowed_peer_cg()
A Dtest_cls_redirect.c626 tuple->ipv4.sport = sport; in fill_tuple()
627 tuple->ipv4.dport = dport; in fill_tuple()
628 return sizeof(tuple->ipv4); in fill_tuple()
637 tuple->ipv6.sport = sport; in fill_tuple()
638 tuple->ipv6.dport = dport; in fill_tuple()
639 return sizeof(tuple->ipv6); in fill_tuple()
749 struct bpf_sock_tuple tuple; in process_icmpv4() local
801 struct bpf_sock_tuple tuple; in process_icmpv6() local
802 memcpy(&tuple.ipv6.saddr, &ipv6->daddr, sizeof(tuple.ipv6.saddr)); in process_icmpv6()
803 memcpy(&tuple.ipv6.daddr, &ipv6->saddr, sizeof(tuple.ipv6.daddr)); in process_icmpv6()
[all …]
A Dconnect4_prog.c149 struct bpf_sock_tuple tuple = {}; in connect_v4_prog() local
153 memset(&tuple.ipv4.saddr, 0, sizeof(tuple.ipv4.saddr)); in connect_v4_prog()
154 memset(&tuple.ipv4.sport, 0, sizeof(tuple.ipv4.sport)); in connect_v4_prog()
156 tuple.ipv4.daddr = bpf_htonl(DST_REWRITE_IP4); in connect_v4_prog()
157 tuple.ipv4.dport = bpf_htons(DST_REWRITE_PORT4); in connect_v4_prog()
172 sk = bpf_sk_lookup_tcp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog()
175 sk = bpf_sk_lookup_udp(ctx, &tuple, sizeof(tuple.ipv4), in connect_v4_prog()
181 if (sk->src_ip4 != tuple.ipv4.daddr || in connect_v4_prog()
/linux-6.3-rc2/drivers/pcmcia/
A Dcistpl.c454 tuple->TupleLink = tuple->Flags = 0; in pccard_get_first_tuple()
457 tuple->CISOffset = tuple->LinkOffset = 0; in pccard_get_first_tuple()
468 tuple->CISOffset = tuple->TupleLink = 0; in pccard_get_first_tuple()
493 SPACE(tuple->Flags) = LINK_SPACE(tuple->Flags); in follow_link()
534 ofs = tuple->CISOffset + tuple->TupleLink; in pccard_get_next_tuple()
641 if (tuple->TupleLink < tuple->TupleOffset) in pccard_get_tuple_data()
643 len = tuple->TupleLink - tuple->TupleOffset; in pccard_get_tuple_data()
644 tuple->TupleDataLen = tuple->TupleLink; in pccard_get_tuple_data()
648 tuple->CISOffset + tuple->TupleOffset, in pccard_get_tuple_data()
1292 if (tuple->TupleDataLen > tuple->TupleDataMax) in pcmcia_parse_tuple()
[all …]
A Dpcmcia_cis.c38 tuple_t tuple; in pccard_read_tuple() local
48 tuple.Attributes = 0; in pccard_read_tuple()
54 tuple.TupleData = buf; in pccard_read_tuple()
55 tuple.TupleOffset = 0; in pccard_read_tuple()
88 tuple_t tuple; in pccard_loop_tuple() local
98 tuple.TupleData = buf; in pccard_loop_tuple()
100 tuple.TupleOffset = 0; in pccard_loop_tuple()
102 tuple.Attributes = 0; in pccard_loop_tuple()
289 tuple_t *tuple,
321 tuple_t *tuple, in pcmcia_loop_tuple() argument
[all …]
/linux-6.3-rc2/drivers/ssb/
A Dsdio.c477 struct sdio_func_tuple *tuple; in ssb_sdio_get_invariants() local
485 while (tuple) { in ssb_sdio_get_invariants()
486 switch (tuple->code) { in ssb_sdio_get_invariants()
488 switch (tuple->data[0]) { in ssb_sdio_get_invariants()
494 mac = tuple->data + 2; in ssb_sdio_get_invariants()
503 switch (tuple->data[0]) { in ssb_sdio_get_invariants()
511 (tuple->size != 7), in ssb_sdio_get_invariants()
514 (tuple->data[2]<<8); in ssb_sdio_get_invariants()
523 (tuple->size != 10), in ssb_sdio_get_invariants()
560 (tuple->size != 5), in ssb_sdio_get_invariants()
[all …]
A Dpcmcia.c597 tuple_t *tuple, in ssb_pcmcia_get_mac() argument
613 tuple_t *tuple, in ssb_pcmcia_do_get_invariants() argument
622 switch (tuple->TupleData[0]) { in ssb_pcmcia_do_get_invariants()
625 (tuple->TupleDataLen != 7), in ssb_pcmcia_do_get_invariants()
628 ((u16)tuple->TupleData[2] << 8); in ssb_pcmcia_do_get_invariants()
637 (tuple->TupleDataLen != 10), in ssb_pcmcia_do_get_invariants()
640 ((u16)tuple->TupleData[2] << 8); in ssb_pcmcia_do_get_invariants()
642 ((u16)tuple->TupleData[4] << 8); in ssb_pcmcia_do_get_invariants()
644 ((u16)tuple->TupleData[6] << 8); in ssb_pcmcia_do_get_invariants()
674 (tuple->TupleDataLen != 5), in ssb_pcmcia_do_get_invariants()
[all …]
/linux-6.3-rc2/net/netfilter/
A Dnf_flow_table_ip.c231 tuple->l3proto = AF_INET; in nf_flow_tuple_ip()
232 tuple->l4proto = ipproto; in nf_flow_tuple_ip()
233 tuple->iifidx = dev->ifindex; in nf_flow_tuple_ip()
257 return dst_check(tuple->dst_cache, tuple->dst_cookie); in nf_flow_dst_check()
367 dir = tuplehash->tuple.dir; in nf_flow_offload_ip_hook()
595 tuple->src_v6 = ip6h->saddr; in nf_flow_tuple_ipv6()
596 tuple->dst_v6 = ip6h->daddr; in nf_flow_tuple_ipv6()
597 tuple->l3proto = AF_INET6; in nf_flow_tuple_ipv6()
598 tuple->l4proto = nexthdr; in nf_flow_tuple_ipv6()
599 tuple->iifidx = dev->ifindex; in nf_flow_tuple_ipv6()
[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_proto.c48 newport = tuple->src.u.udp.port; in __udp_manip_pkt()
52 newport = tuple->dst.u.udp.port; in __udp_manip_pkt()
322 switch (tuple->dst.protonum) { in l4proto_manip_pkt()
325 tuple, maniptype); in l4proto_manip_pkt()
328 tuple, maniptype); in l4proto_manip_pkt()
331 tuple, maniptype); in l4proto_manip_pkt()
334 tuple, maniptype); in l4proto_manip_pkt()
337 tuple, maniptype); in l4proto_manip_pkt()
340 tuple, maniptype); in l4proto_manip_pkt()
343 tuple, maniptype); in l4proto_manip_pkt()
[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 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_nat_core.c170 combined.src = tuple->src; in hash_by_src()
219 switch (tuple->dst.protonum) { in l4proto_in_range()
231 port = tuple->src.u.all; in l4proto_in_range()
233 port = tuple->dst.u.all; in l4proto_in_range()
286 if (same_src(ct, tuple) && in find_appropriate_src()
292 result->dst = tuple->dst; in find_appropriate_src()
325 var_ipp = &tuple->src.u3; in find_best_ips_proto()
327 var_ipp = &tuple->dst.u3; in find_best_ips_proto()
347 j = jhash2((u32 *)&tuple->src.u3, sizeof(tuple->src.u3) / sizeof(u32), in find_best_ips_proto()
528 *tuple = *orig_tuple; in get_unique_tuple()
[all …]
A Dnf_flow_table_core.c95 struct dst_entry *dst = route->tuple[dir].dst; in flow_offload_fill_route()
107 flow_tuple->iifidx = route->tuple[dir].in.ifindex; in flow_offload_fill_route()
111 if (route->tuple[dir].in.ingress_vlans & BIT(i)) in flow_offload_fill_route()
117 switch (route->tuple[dir].xmit_type) { in flow_offload_fill_route()
128 if (!dst_hold_safe(route->tuple[dir].dst)) in flow_offload_fill_route()
148 dst_release(flow->tuplehash[dir].tuple.dst_cache); in nft_flow_dst_release()
235 const struct flow_offload_tuple *tuple = data; in flow_offload_hash() local
253 if (memcmp(&x->tuple, tuple, offsetof(struct flow_offload_tuple, __hash))) in flow_offload_hash_cmp()
364 struct flow_offload_tuple *tuple) in flow_offload_lookup() argument
375 dir = tuplehash->tuple.dir; in flow_offload_lookup()
[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_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.c34 route->tuple[!dir].in.ifindex = dst_cache->dev->ifindex; in nft_default_forward_path()
35 route->tuple[dir].dst = dst_cache; in nft_default_forward_path()
36 route->tuple[dir].xmit_type = nft_xmit_type(dst_cache); in nft_default_forward_path()
54 const void *daddr = &ct->tuplehash[!dir].tuple.src.u3; in nft_dev_fill_forward_path()
209 route->tuple[!dir].in.num_encaps = info.num_encaps; in nft_dev_forward_path()
217 route->tuple[dir].xmit_type = info.xmit_type; in nft_dev_forward_path()
319 struct nf_conntrack_tuple *tuple; in nft_flow_offload_eval() local
323 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in nft_flow_offload_eval()
325 if (tuple->src.u.gre.key || tuple->dst.u.gre.key) in nft_flow_offload_eval()
364 dst_release(route.tuple[!dir].dst); in nft_flow_offload_eval()
[all …]
/linux-6.3-rc2/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 …]
/linux-6.3-rc2/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 …]
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/
A Den_arfs.c89 struct arfs_tuple tuple; member
491 struct arfs_tuple *tuple = &arfs_rule->tuple; in arfs_add_rule() local
509 ntohs(tuple->etype)); in arfs_add_rule()
510 arfs_table = arfs_get_table(arfs, tuple->ip_proto, tuple->etype); in arfs_add_rule()
539 &tuple->src_ipv4, in arfs_add_rule()
543 &tuple->dst_ipv4, in arfs_add_rule()
552 &tuple->src_ipv6, in arfs_add_rule()
556 &tuple->dst_ipv6, in arfs_add_rule()
650 tuple = &rule->tuple; in arfs_alloc_rule()
670 tuple->dst_port)); in arfs_alloc_rule()
[all …]
/linux-6.3-rc2/drivers/net/wireless/broadcom/b43/
A Dsdio.c96 struct sdio_func_tuple *tuple; in b43_sdio_probe() local
101 tuple = func->tuples; in b43_sdio_probe()
102 while (tuple) { in b43_sdio_probe()
103 switch (tuple->code) { in b43_sdio_probe()
105 switch (tuple->data[0]) { in b43_sdio_probe()
107 if (tuple->size != 5) in b43_sdio_probe()
109 vendor = tuple->data[1] | (tuple->data[2]<<8); in b43_sdio_probe()
110 device = tuple->data[3] | (tuple->data[4]<<8); in b43_sdio_probe()
121 tuple = tuple->next; in b43_sdio_probe()

Completed in 203 milliseconds

1234567