/kernel/linux/linux-6.6/tools/testing/selftests/net/ |
H A D | nat6to4.c | 55 const struct ipv6hdr * const ip6 = (void *)(eth + 1); in sched_cls_ingress6_nat_6_prog() local 66 if (data + l2_header_size + sizeof(*ip6) > data_end) in sched_cls_ingress6_nat_6_prog() 74 if (ip6->version != 6) in sched_cls_ingress6_nat_6_prog() 77 if (bpf_ntohs(ip6->payload_len) > 0xFFFF - sizeof(struct iphdr)) in sched_cls_ingress6_nat_6_prog() 79 switch (ip6->nexthdr) { in sched_cls_ingress6_nat_6_prog() 97 .tos = (ip6->priority << 4) + (ip6->flow_lbl[0] >> 4), // u8 in sched_cls_ingress6_nat_6_prog() 98 .tot_len = bpf_htons(bpf_ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 in sched_cls_ingress6_nat_6_prog() 101 .ttl = ip6->hop_limit, // u8 in sched_cls_ingress6_nat_6_prog() 102 .protocol = ip6 in sched_cls_ingress6_nat_6_prog() 229 struct ipv6hdr ip6 = { sched_cls_egress4_snat4_prog() local [all...] |
/kernel/linux/linux-5.10/include/linux/netfilter/ipset/ |
H A D | pfxlen.h | 22 return &ip_set_netmask_map[pfxlen].ip6[0]; in ip_set_netmask6() 34 return &ip_set_hostmask_map[pfxlen].ip6[0]; in ip_set_hostmask6() 48 ip->ip6[0] &= ip_set_netmask6(prefix)[0]; in ip6_netmask() 49 ip->ip6[1] &= ip_set_netmask6(prefix)[1]; in ip6_netmask() 50 ip->ip6[2] &= ip_set_netmask6(prefix)[2]; in ip6_netmask() 51 ip->ip6[3] &= ip_set_netmask6(prefix)[3]; in ip6_netmask()
|
/kernel/linux/linux-6.6/include/linux/netfilter/ipset/ |
H A D | pfxlen.h | 22 return &ip_set_netmask_map[pfxlen].ip6[0]; in ip_set_netmask6() 34 return &ip_set_hostmask_map[pfxlen].ip6[0]; in ip_set_hostmask6() 48 ip->ip6[0] &= ip_set_netmask6(prefix)[0]; in ip6_netmask() 49 ip->ip6[1] &= ip_set_netmask6(prefix)[1]; in ip6_netmask() 50 ip->ip6[2] &= ip_set_netmask6(prefix)[2]; in ip6_netmask() 51 ip->ip6[3] &= ip_set_netmask6(prefix)[3]; in ip6_netmask()
|
/kernel/linux/linux-5.10/net/netfilter/ |
H A D | xt_NETMAP.c | 29 for (i = 0; i < ARRAY_SIZE(range->min_addr.ip6); i++) in netmap_tg6() 30 netmask.ip6[i] = ~(range->min_addr.ip6[i] ^ in netmap_tg6() 31 range->max_addr.ip6[i]); in netmap_tg6() 39 for (i = 0; i < ARRAY_SIZE(new_addr.ip6); i++) { in netmap_tg6() 40 new_addr.ip6[i] &= ~netmask.ip6[i]; in netmap_tg6() 41 new_addr.ip6[i] |= range->min_addr.ip6[i] & in netmap_tg6() 42 netmask.ip6[ in netmap_tg6() [all...] |
H A D | xt_HMARK.c | 92 t->src = hmark_addr_mask(otuple->src.l3num, otuple->src.u3.ip6, in hmark_ct_set_htuple() 93 info->src_mask.ip6); in hmark_ct_set_htuple() 94 t->dst = hmark_addr_mask(otuple->src.l3num, rtuple->src.u3.ip6, in hmark_ct_set_htuple() 95 info->dst_mask.ip6); in hmark_ct_set_htuple() 168 struct ipv6hdr *ip6, _ip6; in hmark_pkt_set_htuple_ipv6() local 174 ip6 = (struct ipv6hdr *) (skb->data + skb_network_offset(skb)); in hmark_pkt_set_htuple_ipv6() 183 ip6 = skb_header_pointer(skb, nhoff, sizeof(_ip6), &_ip6); in hmark_pkt_set_htuple_ipv6() 184 if (ip6 == NULL) in hmark_pkt_set_htuple_ipv6() 193 t->src = hmark_addr6_mask(ip6->saddr.s6_addr32, info->src_mask.ip6); in hmark_pkt_set_htuple_ipv6() [all...] |
H A D | xt_connlimit.c | 56 memcpy(&addr.ip6, (info->flags & XT_CONNLIMIT_DADDR) ? in connlimit_mt() 57 &iph->daddr : &iph->saddr, sizeof(addr.ip6)); in connlimit_mt() 59 for (i = 0; i < ARRAY_SIZE(addr.ip6); ++i) in connlimit_mt() 60 addr.ip6[i] &= info->mask.ip6[i]; in connlimit_mt() 61 memcpy(key, &addr, sizeof(addr.ip6)); in connlimit_mt()
|
H A D | nft_nat.c | 45 memcpy(range->min_addr.ip6, ®s->data[priv->sreg_addr_min], in nft_nat_setup_addr() 46 sizeof(range->min_addr.ip6)); in nft_nat_setup_addr() 47 memcpy(range->max_addr.ip6, ®s->data[priv->sreg_addr_max], in nft_nat_setup_addr() 48 sizeof(range->max_addr.ip6)); in nft_nat_setup_addr() 94 netmask = ~(range->min_addr.ip6[i] ^ range->max_addr.ip6[i]); in nft_nat_setup_netmap() 95 new_addr.ip6[i] &= ~netmask; in nft_nat_setup_netmap() 96 new_addr.ip6[i] |= range->min_addr.ip6[i] & netmask; in nft_nat_setup_netmap() 206 alen = sizeof_field(struct nf_nat_range, min_addr.ip6); in nft_nat_init() [all...] |
/kernel/linux/linux-6.6/net/netfilter/ |
H A D | xt_NETMAP.c | 29 for (i = 0; i < ARRAY_SIZE(range->min_addr.ip6); i++) in netmap_tg6() 30 netmask.ip6[i] = ~(range->min_addr.ip6[i] ^ in netmap_tg6() 31 range->max_addr.ip6[i]); in netmap_tg6() 39 for (i = 0; i < ARRAY_SIZE(new_addr.ip6); i++) { in netmap_tg6() 40 new_addr.ip6[i] &= ~netmask.ip6[i]; in netmap_tg6() 41 new_addr.ip6[i] |= range->min_addr.ip6[i] & in netmap_tg6() 42 netmask.ip6[ in netmap_tg6() [all...] |
H A D | xt_HMARK.c | 92 t->src = hmark_addr_mask(otuple->src.l3num, otuple->src.u3.ip6, in hmark_ct_set_htuple() 93 info->src_mask.ip6); in hmark_ct_set_htuple() 94 t->dst = hmark_addr_mask(otuple->src.l3num, rtuple->src.u3.ip6, in hmark_ct_set_htuple() 95 info->dst_mask.ip6); in hmark_ct_set_htuple() 168 struct ipv6hdr *ip6, _ip6; in hmark_pkt_set_htuple_ipv6() local 174 ip6 = (struct ipv6hdr *) (skb->data + skb_network_offset(skb)); in hmark_pkt_set_htuple_ipv6() 183 ip6 = skb_header_pointer(skb, nhoff, sizeof(_ip6), &_ip6); in hmark_pkt_set_htuple_ipv6() 184 if (ip6 == NULL) in hmark_pkt_set_htuple_ipv6() 193 t->src = hmark_addr6_mask(ip6->saddr.s6_addr32, info->src_mask.ip6); in hmark_pkt_set_htuple_ipv6() [all...] |
H A D | xt_connlimit.c | 56 memcpy(&addr.ip6, (info->flags & XT_CONNLIMIT_DADDR) ? in connlimit_mt() 57 &iph->daddr : &iph->saddr, sizeof(addr.ip6)); in connlimit_mt() 59 for (i = 0; i < ARRAY_SIZE(addr.ip6); ++i) in connlimit_mt() 60 addr.ip6[i] &= info->mask.ip6[i]; in connlimit_mt() 61 memcpy(key, &addr, sizeof(addr.ip6)); in connlimit_mt()
|
H A D | nft_nat.c | 45 memcpy(range->min_addr.ip6, ®s->data[priv->sreg_addr_min], in nft_nat_setup_addr() 46 sizeof(range->min_addr.ip6)); in nft_nat_setup_addr() 47 memcpy(range->max_addr.ip6, ®s->data[priv->sreg_addr_max], in nft_nat_setup_addr() 48 sizeof(range->max_addr.ip6)); in nft_nat_setup_addr() 94 netmask = ~(range->min_addr.ip6[i] ^ range->max_addr.ip6[i]); in nft_nat_setup_netmap() 95 new_addr.ip6[i] &= ~netmask; in nft_nat_setup_netmap() 96 new_addr.ip6[i] |= range->min_addr.ip6[i] & netmask; in nft_nat_setup_netmap() 207 alen = sizeof_field(struct nf_nat_range, min_addr.ip6); in nft_nat_init() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | fexit_bpf2bpf.c | 121 struct ipv6hdr ip6, *ip6p; in new_get_skb_ifindex() local 127 if (data + 14 + sizeof(ip6) > data_end) in new_get_skb_ifindex() 135 if (bpf_skb_load_bytes(skb, 14, &ip6, sizeof(ip6)) < 0) in new_get_skb_ifindex() 137 ip6p = &ip6; in new_get_skb_ifindex()
|
H A D | test_misc_tcp_hdr_options.c | 36 struct ipv6hdr ip6; in __check_active_hdr_in() member 97 ret = bpf_getsockopt(skops, SOL_TCP, TCP_BPF_SYN_IP, &hdr.ip6, in __check_active_hdr_in() 98 sizeof(hdr.ip6)); in __check_active_hdr_in() 102 if (hdr.ip6.saddr.s6_addr16[7] != last_addr16_n || in __check_active_hdr_in() 103 hdr.ip6.daddr.s6_addr16[7] != last_addr16_n) in __check_active_hdr_in() 110 pth = (struct tcphdr *)(&hdr.ip6 + 1); in __check_active_hdr_in()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | fexit_bpf2bpf.c | 121 struct ipv6hdr ip6, *ip6p; in new_get_skb_ifindex() local 125 if (data + 14 + sizeof(ip6) > data_end) in new_get_skb_ifindex() 133 if (bpf_skb_load_bytes(skb, 14, &ip6, sizeof(ip6)) < 0) in new_get_skb_ifindex() 135 ip6p = &ip6; in new_get_skb_ifindex()
|
H A D | test_misc_tcp_hdr_options.c | 37 struct ipv6hdr ip6; in __check_active_hdr_in() member 98 ret = bpf_getsockopt(skops, SOL_TCP, TCP_BPF_SYN_IP, &hdr.ip6, in __check_active_hdr_in() 99 sizeof(hdr.ip6)); in __check_active_hdr_in() 103 if (hdr.ip6.saddr.s6_addr16[7] != last_addr16_n || in __check_active_hdr_in() 104 hdr.ip6.daddr.s6_addr16[7] != last_addr16_n) in __check_active_hdr_in() 111 pth = (struct tcphdr *)(&hdr.ip6 + 1); in __check_active_hdr_in()
|
/kernel/linux/linux-5.10/drivers/net/wireguard/selftest/ |
H A D | allowedips.c | 130 node->ip.ip6[0] &= node->mask.ip6[0]; in horrible_mask_self() 131 node->ip.ip6[1] &= node->mask.ip6[1]; in horrible_mask_self() 132 node->ip.ip6[2] &= node->mask.ip6[2]; in horrible_mask_self() 133 node->ip.ip6[3] &= node->mask.ip6[3]; in horrible_mask_self() 146 return (ip->in6_u.u6_addr32[0] & node->mask.ip6[0]) == node->ip.ip6[ in horrible_match_v6() 437 static __init inline struct in6_addr *ip6(u32 a, u32 b, u32 c, u32 d) ip6() function [all...] |
/kernel/linux/linux-6.6/drivers/net/wireguard/selftest/ |
H A D | allowedips.c | 130 node->ip.ip6[0] &= node->mask.ip6[0]; in horrible_mask_self() 131 node->ip.ip6[1] &= node->mask.ip6[1]; in horrible_mask_self() 132 node->ip.ip6[2] &= node->mask.ip6[2]; in horrible_mask_self() 133 node->ip.ip6[3] &= node->mask.ip6[3]; in horrible_mask_self() 146 return (ip->in6_u.u6_addr32[0] & node->mask.ip6[0]) == node->ip.ip6[ in horrible_match_v6() 437 static __init inline struct in6_addr *ip6(u32 a, u32 b, u32 c, u32 d) ip6() function [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/libcxgb/ |
H A D | libcxgb_cm.c | 53 struct ipv6hdr *ip6 = (struct ipv6hdr *)((u8 *)(req + 1) + eth_len); in cxgb_get_4tuple() local 66 __func__, ip6->saddr.s6_addr, ip6->daddr.s6_addr, in cxgb_get_4tuple() 69 memcpy(peer_ip, ip6->saddr.s6_addr, 16); in cxgb_get_4tuple() 70 memcpy(local_ip, ip6->daddr.s6_addr, 16); in cxgb_get_4tuple()
|
/kernel/linux/linux-5.10/net/ipv6/ |
H A D | exthdrs_core.c | 199 struct ipv6hdr _ip6, *ip6; in ipv6_find_hdr() local 201 ip6 = skb_header_pointer(skb, *offset, sizeof(_ip6), &_ip6); in ipv6_find_hdr() 202 if (!ip6 || (ip6->version != 6)) in ipv6_find_hdr() 205 nexthdr = ip6->nexthdr; in ipv6_find_hdr()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/chelsio/libcxgb/ |
H A D | libcxgb_cm.c | 53 struct ipv6hdr *ip6 = (struct ipv6hdr *)((u8 *)(req + 1) + eth_len); in cxgb_get_4tuple() local 66 __func__, ip6->saddr.s6_addr, ip6->daddr.s6_addr, in cxgb_get_4tuple() 69 memcpy(peer_ip, ip6->saddr.s6_addr, 16); in cxgb_get_4tuple() 70 memcpy(local_ip, ip6->daddr.s6_addr, 16); in cxgb_get_4tuple()
|
/kernel/linux/linux-6.6/net/ipv6/ |
H A D | exthdrs_core.c | 199 struct ipv6hdr _ip6, *ip6; in ipv6_find_hdr() local 201 ip6 = skb_header_pointer(skb, *offset, sizeof(_ip6), &_ip6); in ipv6_find_hdr() 202 if (!ip6 || (ip6->version != 6)) in ipv6_find_hdr() 205 nexthdr = ip6->nexthdr; in ipv6_find_hdr()
|
/kernel/linux/linux-5.10/net/netfilter/ipvs/ |
H A D | ip_vs_dh.c | 77 addr_fold = addr->ip6[0]^addr->ip6[1]^ in ip_vs_dh_hashkey() 78 addr->ip6[2]^addr->ip6[3]; in ip_vs_dh_hashkey()
|
/kernel/linux/linux-6.6/net/netfilter/ipvs/ |
H A D | ip_vs_dh.c | 77 addr_fold = addr->ip6[0]^addr->ip6[1]^ in ip_vs_dh_hashkey() 78 addr->ip6[2]^addr->ip6[3]; in ip_vs_dh_hashkey()
|
/kernel/linux/linux-5.10/net/tipc/ |
H A D | udp_media.c | 433 struct sockaddr_in6 ip6; in __tipc_nl_add_udp_addr() local 435 memset(&ip6, 0, sizeof(ip6)); in __tipc_nl_add_udp_addr() 436 ip6.sin6_family = AF_INET6; in __tipc_nl_add_udp_addr() 437 ip6.sin6_port = addr->port; in __tipc_nl_add_udp_addr() 438 memcpy(&ip6.sin6_addr, &addr->ipv6, sizeof(struct in6_addr)); in __tipc_nl_add_udp_addr() 439 if (nla_put(skb, nla_t, sizeof(ip6), &ip6)) in __tipc_nl_add_udp_addr() 590 struct sockaddr_in6 *ip6 = (struct sockaddr_in6 *)&sa; in tipc_parse_udp_addr() local 593 addr->port = ip6 in tipc_parse_udp_addr() [all...] |
/kernel/linux/linux-6.6/net/tipc/ |
H A D | udp_media.c | 441 struct sockaddr_in6 ip6; in __tipc_nl_add_udp_addr() local 443 memset(&ip6, 0, sizeof(ip6)); in __tipc_nl_add_udp_addr() 444 ip6.sin6_family = AF_INET6; in __tipc_nl_add_udp_addr() 445 ip6.sin6_port = addr->port; in __tipc_nl_add_udp_addr() 446 memcpy(&ip6.sin6_addr, &addr->ipv6, sizeof(struct in6_addr)); in __tipc_nl_add_udp_addr() 447 if (nla_put(skb, nla_t, sizeof(ip6), &ip6)) in __tipc_nl_add_udp_addr() 598 struct sockaddr_in6 *ip6 = (struct sockaddr_in6 *)&sa; in tipc_parse_udp_addr() local 601 addr->port = ip6 in tipc_parse_udp_addr() [all...] |