/Linux-v5.15/net/core/ |
D | secure_seq.c | 55 const __be32 *saddr, const __be32 *daddr) in secure_tcpv6_ts_off() argument 58 struct in6_addr saddr; in secure_tcpv6_ts_off() member 61 .saddr = *(struct in6_addr *)saddr, in secure_tcpv6_ts_off() 74 u32 secure_tcpv6_seq(const __be32 *saddr, const __be32 *daddr, in secure_tcpv6_seq() argument 78 struct in6_addr saddr; in secure_tcpv6_seq() member 83 .saddr = *(struct in6_addr *)saddr, in secure_tcpv6_seq() 97 u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, in secure_ipv6_port_ephemeral() argument 101 struct in6_addr saddr; in secure_ipv6_port_ephemeral() member 105 .saddr = *(struct in6_addr *)saddr, in secure_ipv6_port_ephemeral() 117 u32 secure_tcp_ts_off(const struct net *net, __be32 saddr, __be32 daddr) in secure_tcp_ts_off() argument [all …]
|
D | dst_cache.c | 72 struct rtable *dst_cache_get_ip4(struct dst_cache *dst_cache, __be32 *saddr) in dst_cache_get_ip4() argument 85 *saddr = idst->in_saddr.s_addr; in dst_cache_get_ip4() 91 __be32 saddr) in dst_cache_set_ip4() argument 100 idst->in_saddr.s_addr = saddr; in dst_cache_set_ip4() 106 const struct in6_addr *saddr) in dst_cache_set_ip6() argument 116 idst->in6_saddr = *saddr; in dst_cache_set_ip6() 121 struct in6_addr *saddr) in dst_cache_get_ip6() argument 134 *saddr = idst->in6_saddr; in dst_cache_get_ip6()
|
/Linux-v5.15/net/xfrm/ |
D | xfrm_hash.h | 20 const xfrm_address_t *saddr) in __xfrm4_daddr_saddr_hash() argument 22 u32 sum = (__force u32)daddr->a4 + (__force u32)saddr->a4; in __xfrm4_daddr_saddr_hash() 27 const xfrm_address_t *saddr) in __xfrm6_daddr_saddr_hash() argument 29 return __xfrm6_addr_hash(daddr) ^ __xfrm6_addr_hash(saddr); in __xfrm6_daddr_saddr_hash() 45 const xfrm_address_t *saddr, in __xfrm4_dpref_spref_hash() argument 50 ntohl(saddr->a4) & __bits2mask32(sbits), in __xfrm4_dpref_spref_hash() 76 const xfrm_address_t *saddr, in __xfrm6_dpref_spref_hash() argument 81 __xfrm6_pref_hash(saddr, sbits); in __xfrm6_dpref_spref_hash() 85 const xfrm_address_t *saddr, in __xfrm_dst_hash() argument 92 h ^= __xfrm4_daddr_saddr_hash(daddr, saddr); in __xfrm_dst_hash() [all …]
|
/Linux-v5.15/include/net/ |
D | ip6_checksum.h | 34 __sum16 csum_ipv6_magic(const struct in6_addr *saddr, 41 return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in ip6_compute_pseudo() 50 return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip6_gro_compute_pseudo() 55 const struct in6_addr *saddr, in tcp_v6_check() argument 59 return csum_ipv6_magic(saddr, daddr, len, IPPROTO_TCP, base); in tcp_v6_check() 63 const struct in6_addr *saddr, in __tcp_v6_send_check() argument 69 th->check = ~tcp_v6_check(skb->len, saddr, daddr, 0); in __tcp_v6_send_check() 73 th->check = tcp_v6_check(skb->len, saddr, daddr, in __tcp_v6_send_check() 85 th->check = ~tcp_v6_check(0, &ipv6h->saddr, &ipv6h->daddr, 0); in tcp_v6_gso_csum_prep() 89 const struct in6_addr *saddr, in udp_v6_check() argument [all …]
|
D | secure_seq.h | 7 u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); 8 u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, 10 u32 secure_tcp_seq(__be32 saddr, __be32 daddr, 12 u32 secure_tcp_ts_off(const struct net *net, __be32 saddr, __be32 daddr); 13 u32 secure_tcpv6_seq(const __be32 *saddr, const __be32 *daddr, 16 const __be32 *saddr, const __be32 *daddr); 17 u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, 19 u64 secure_dccpv6_sequence_number(__be32 *saddr, __be32 *daddr,
|
/Linux-v5.15/net/ipv6/ |
D | ip6_checksum.c | 8 __sum16 csum_ipv6_magic(const struct in6_addr *saddr, in csum_ipv6_magic() argument 18 sum += (__force u32)saddr->s6_addr32[0]; in csum_ipv6_magic() 19 carry = (sum < (__force u32)saddr->s6_addr32[0]); in csum_ipv6_magic() 22 sum += (__force u32)saddr->s6_addr32[1]; in csum_ipv6_magic() 23 carry = (sum < (__force u32)saddr->s6_addr32[1]); in csum_ipv6_magic() 26 sum += (__force u32)saddr->s6_addr32[2]; in csum_ipv6_magic() 27 carry = (sum < (__force u32)saddr->s6_addr32[2]); in csum_ipv6_magic() 30 sum += (__force u32)saddr->s6_addr32[3]; in csum_ipv6_magic() 31 carry = (sum < (__force u32)saddr->s6_addr32[3]); in csum_ipv6_magic() 116 const struct in6_addr *saddr, in udp6_set_csum() argument [all …]
|
D | inet6_hashtables.c | 53 const struct in6_addr *saddr, in __inet6_lookup_established() argument 65 unsigned int hash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in __inet6_lookup_established() 74 if (!INET6_MATCH(sk, net, saddr, daddr, ports, dif, sdif)) in __inet6_lookup_established() 79 if (unlikely(!INET6_MATCH(sk, net, saddr, daddr, ports, dif, sdif))) { in __inet6_lookup_established() 118 const struct in6_addr *saddr, in lookup_reuseport() argument 127 phash = inet6_ehashfn(net, daddr, hnum, saddr, sport); in lookup_reuseport() 137 const struct in6_addr *saddr, in inet6_lhash2_lookup() argument 150 saddr, sport, daddr, hnum); in inet6_lhash2_lookup() 165 const struct in6_addr *saddr, in inet6_lookup_run_bpf() argument 177 saddr, sport, daddr, hnum, &sk); in inet6_lookup_run_bpf() [all …]
|
D | xfrm6_tunnel.c | 74 …ic struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) in __xfrm6_tunnel_spi_lookup() argument 80 &xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)], in __xfrm6_tunnel_spi_lookup() 82 if (xfrm6_addr_equal(&x6spi->addr, saddr)) in __xfrm6_tunnel_spi_lookup() 89 __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *saddr) in xfrm6_tunnel_spi_lookup() argument 95 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); in xfrm6_tunnel_spi_lookup() 117 static u32 __xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) in __xfrm6_tunnel_alloc_spi() argument 151 memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); in __xfrm6_tunnel_alloc_spi() 157 index = xfrm6_tunnel_spi_hash_byaddr(saddr); in __xfrm6_tunnel_alloc_spi() 163 __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr) in xfrm6_tunnel_alloc_spi() argument 169 x6spi = __xfrm6_tunnel_spi_lookup(net, saddr); in xfrm6_tunnel_alloc_spi() [all …]
|
D | syncookies.c | 40 static u32 cookie_hash(const struct in6_addr *saddr, in cookie_hash() argument 45 struct in6_addr saddr; in cookie_hash() member 51 .saddr = *saddr, in cookie_hash() 63 static __u32 secure_tcp_syn_cookie(const struct in6_addr *saddr, in secure_tcp_syn_cookie() argument 69 return (cookie_hash(saddr, daddr, sport, dport, 0, 0) + in secure_tcp_syn_cookie() 71 ((cookie_hash(saddr, daddr, sport, dport, count, 1) + data) in secure_tcp_syn_cookie() 75 static __u32 check_tcp_syn_cookie(__u32 cookie, const struct in6_addr *saddr, in check_tcp_syn_cookie() argument 81 cookie -= cookie_hash(saddr, daddr, sport, dport, 0, 0) + sseq; in check_tcp_syn_cookie() 88 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie() 104 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in __cookie_v6_init_sequence() [all …]
|
D | icmp.c | 292 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames() 305 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl6->saddr, in icmpv6_push_pending_frames() 346 tmp = iph->saddr; in mip6_addr_swap() 347 iph->saddr = hao->addr; in mip6_addr_swap() 456 const struct in6_addr *saddr = NULL; in icmp6_send() local 485 saddr = &hdr->daddr; in icmp6_send() 498 saddr = NULL; in icmp6_send() 501 addr_type = ipv6_addr_type(&hdr->saddr); in icmp6_send() 525 &hdr->saddr, &hdr->daddr); in icmp6_send() 534 &hdr->saddr, &hdr->daddr); in icmp6_send() [all …]
|
/Linux-v5.15/include/trace/events/ |
D | tcp.h | 15 #define TP_STORE_V4MAPPED(__entry, saddr, daddr) \ argument 20 ipv6_addr_set_v4mapped(saddr, pin6); \ 26 #define TP_STORE_ADDRS(__entry, saddr, daddr, saddr6, daddr6) \ argument 36 TP_STORE_V4MAPPED(__entry, saddr, daddr); \ 40 #define TP_STORE_ADDRS(__entry, saddr, daddr, saddr6, daddr6) \ argument 41 TP_STORE_V4MAPPED(__entry, saddr, daddr) 63 __array(__u8, saddr, 4) 81 p32 = (__be32 *) __entry->saddr; 93 __entry->sport, __entry->dport, __entry->saddr, __entry->daddr, 132 __array(__u8, saddr, 4) [all …]
|
/Linux-v5.15/drivers/net/wireguard/selftest/ |
D | ratelimiter.c | 56 hdr4->saddr = htonl(ntohl(hdr4->saddr) + i + 1); in timings_test() 64 hdr4->saddr = htonl(ntohl(hdr4->saddr) - i - 1); in timings_test() 67 hdr6->saddr.in6_u.u6_addr32[2] = htonl(i); in timings_test() 68 hdr6->saddr.in6_u.u6_addr32[3] = htonl(i); in timings_test() 77 hdr6->saddr.in6_u.u6_addr32[0] = in timings_test() 78 htonl(ntohl(hdr6->saddr.in6_u.u6_addr32[0]) + i + 1); in timings_test() 86 hdr6->saddr.in6_u.u6_addr32[0] = in timings_test() 87 htonl(ntohl(hdr6->saddr.in6_u.u6_addr32[0]) - i - 1); in timings_test() 110 hdr4->saddr = htonl(i); in capacity_test() 152 hdr4->saddr = htonl(8182); in wg_ratelimiter_selftest() [all …]
|
/Linux-v5.15/net/netfilter/ |
D | nft_chain_route.c | 22 __be32 saddr, daddr; in nf_route_table_hook4() local 33 saddr = iph->saddr; in nf_route_table_hook4() 41 if (iph->saddr != saddr || in nf_route_table_hook4() 69 struct in6_addr saddr, daddr; in nf_route_table_hook6() local 80 memcpy(&saddr, &ipv6_hdr(skb)->saddr, sizeof(saddr)); in nf_route_table_hook6() 90 (memcmp(&ipv6_hdr(skb)->saddr, &saddr, sizeof(saddr)) || in nf_route_table_hook6()
|
/Linux-v5.15/arch/s390/include/asm/ |
D | checksum.h | 80 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, in csum_tcpudp_nofold() argument 85 csum += (__force __u32)saddr; in csum_tcpudp_nofold() 97 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, in csum_tcpudp_magic() argument 100 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic() 112 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, in csum_ipv6_magic() argument 118 sum += (__force __u32)saddr->s6_addr32[0]; in csum_ipv6_magic() 119 sum += (__force __u32)saddr->s6_addr32[1]; in csum_ipv6_magic() 120 sum += (__force __u32)saddr->s6_addr32[2]; in csum_ipv6_magic() 121 sum += (__force __u32)saddr->s6_addr32[3]; in csum_ipv6_magic()
|
/Linux-v5.15/tools/testing/selftests/net/ |
D | psock_lib.h | 77 struct sockaddr_in saddr, daddr; in pair_udp_open() local 86 memset(&saddr, 0, sizeof(saddr)); in pair_udp_open() 87 saddr.sin_family = AF_INET; in pair_udp_open() 88 saddr.sin_port = htons(port); in pair_udp_open() 89 saddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in pair_udp_open() 101 if (bind(fds[0], (void *) &saddr, sizeof(saddr))) { in pair_udp_open()
|
/Linux-v5.15/arch/arm/include/asm/ |
D | checksum.h | 99 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, __u32 len, in csum_tcpudp_nofold() argument 113 : "r" (daddr), "r" (saddr), "r" (lenprot) in csum_tcpudp_nofold() 126 : "r" (sum), "r" (daddr), "r" (saddr), "r" (lenprot) in csum_tcpudp_nofold() 136 csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len, in csum_tcpudp_magic() argument 139 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic() 155 __csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len, 159 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, in csum_ipv6_magic() argument 162 return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl(len), in csum_ipv6_magic()
|
/Linux-v5.15/arch/parisc/include/asm/ |
D | checksum.h | 74 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, in csum_tcpudp_nofold() argument 84 : "r" (daddr), "r"(saddr), "r"(proto+len), "0"(sum)); in csum_tcpudp_nofold() 92 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, in csum_tcpudp_magic() argument 96 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic() 110 static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, in csum_ipv6_magic() argument 169 : "=r" (sum), "=r" (saddr), "=r" (daddr), "=r" (len), in csum_ipv6_magic() 171 : "0" (sum), "1" (saddr), "2" (daddr), "3" (len) in csum_ipv6_magic()
|
/Linux-v5.15/arch/m68k/include/asm/ |
D | checksum.h | 82 csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, in csum_tcpudp_nofold() argument 90 : "=&d" (sum), "=d" (saddr) in csum_tcpudp_nofold() 91 : "g" (daddr), "1" (saddr), "d" (len + proto), in csum_tcpudp_nofold() 102 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, in csum_tcpudp_magic() argument 105 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic() 120 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, in csum_ipv6_magic() argument 143 : "a" (saddr), "a" (daddr), "d" (len + proto), in csum_ipv6_magic()
|
/Linux-v5.15/arch/sparc/include/asm/ |
D | checksum_64.h | 66 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, in csum_tcpudp_nofold() argument 75 : "=r" (sum), "=r" (saddr) in csum_tcpudp_nofold() 76 : "r" (daddr), "r" (proto + len), "0" (sum), "1" (saddr) in csum_tcpudp_nofold() 85 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, in csum_tcpudp_magic() argument 89 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic() 94 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, in csum_ipv6_magic() argument 119 : "r" (saddr), "r" (daddr), "r"(htonl(len)), in csum_ipv6_magic()
|
D | checksum_32.h | 132 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, in csum_tcpudp_nofold() argument 140 : "=r" (sum), "=r" (saddr) in csum_tcpudp_nofold() 142 "1" (saddr) in csum_tcpudp_nofold() 151 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, in csum_tcpudp_magic() argument 155 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic() 160 static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, in csum_ipv6_magic() argument 185 : "r" (saddr), "r" (daddr), in csum_ipv6_magic()
|
/Linux-v5.15/net/ipv6/netfilter/ |
D | nf_socket_ipv6.c | 69 *laddr = &inside_iph->saddr; in extract_icmp6_fields() 80 const struct in6_addr *saddr, const struct in6_addr *daddr, in nf_socket_get_sock_v6() argument 87 saddr, sport, daddr, dport, in nf_socket_get_sock_v6() 90 return udp6_lib_lookup(net, saddr, sport, daddr, dport, in nf_socket_get_sock_v6() 101 const struct in6_addr *daddr = NULL, *saddr = NULL; in nf_sk_lookup_slow_v6() local 122 saddr = &iph->saddr; in nf_sk_lookup_slow_v6() 132 if (extract_icmp6_fields(skb, thoff, &tproto, &saddr, &daddr, in nf_sk_lookup_slow_v6() 139 return nf_socket_get_sock_v6(net, data_skb, doff, tproto, saddr, daddr, in nf_sk_lookup_slow_v6()
|
/Linux-v5.15/net/ieee802154/6lowpan/ |
D | tx.c | 15 struct ieee802154_addr saddr; member 35 const void *saddr, unsigned int len) in lowpan_header_create() argument 53 info->saddr.pan_id = wpan_dev->pan_id; in lowpan_header_create() 54 info->daddr.pan_id = info->saddr.pan_id; in lowpan_header_create() 84 if (!saddr) { in lowpan_header_create() 86 info->saddr.mode = IEEE802154_ADDR_SHORT; in lowpan_header_create() 87 info->saddr.short_addr = wpan_dev->short_addr; in lowpan_header_create() 89 info->saddr.mode = IEEE802154_ADDR_LONG; in lowpan_header_create() 90 info->saddr.extended_addr = wpan_dev->extended_addr; in lowpan_header_create() 93 info->saddr.mode = IEEE802154_ADDR_LONG; in lowpan_header_create() [all …]
|
/Linux-v5.15/net/ipv4/netfilter/ |
D | nf_socket_ipv4.c | 57 *laddr = inside_iph->saddr; in extract_icmp4_fields() 68 const __be32 saddr, const __be32 daddr, in nf_socket_get_sock_v4() argument 75 saddr, sport, daddr, dport, in nf_socket_get_sock_v4() 78 return udp4_lib_lookup(net, saddr, sport, daddr, dport, in nf_socket_get_sock_v4() 87 __be32 daddr, saddr; in nf_sk_lookup_slow_v4() local 109 saddr = iph->saddr; in nf_sk_lookup_slow_v4() 119 if (extract_icmp4_fields(skb, &protocol, &saddr, &daddr, in nf_sk_lookup_slow_v4() 146 return nf_socket_get_sock_v4(net, data_skb, doff, protocol, saddr, in nf_sk_lookup_slow_v4()
|
/Linux-v5.15/include/net/netfilter/ |
D | nf_queue.h | 52 if ((__force u32)iph->saddr < (__force u32)iph->daddr) in hash_v4() 53 return jhash_3words((__force u32)iph->saddr, in hash_v4() 57 (__force u32)iph->saddr, iph->protocol, initval); in hash_v4() 64 if ((__force u32)ip6h->saddr.s6_addr32[3] < in hash_v6() 66 a = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6() 69 b = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6() 73 if ((__force u32)ip6h->saddr.s6_addr32[1] < in hash_v6() 75 c = (__force u32) ip6h->saddr.s6_addr32[1]; in hash_v6()
|
/Linux-v5.15/arch/nios2/include/asm/ |
D | checksum.h | 40 static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, in csum_tcpudp_nofold() argument 54 : "=r" (sum), "=r" (saddr) in csum_tcpudp_nofold() 57 "1" (saddr) in csum_tcpudp_nofold() 63 static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, in csum_tcpudp_magic() argument 67 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
|