/linux-6.1.9/tools/testing/selftests/bpf/progs/ |
D | bpf_iter_udp4.c | 29 struct inet_sock *inet; in dump_udp4() local 46 inet = &udp_sk->inet; in dump_udp4() 47 if (inet->sk.sk_family == AF_INET6) in dump_udp4() 50 inet = &udp_sk->inet; in dump_udp4() 51 dest = inet->inet_daddr; in dump_udp4() 52 src = inet->inet_rcv_saddr; in dump_udp4() 53 srcp = bpf_ntohs(inet->inet_sport); in dump_udp4() 54 destp = bpf_ntohs(inet->inet_dport); in dump_udp4() 55 rqueue = inet->sk.sk_rmem_alloc.counter - udp_sk->forward_deficit; in dump_udp4() 61 inet->sk.sk_state, in dump_udp4() [all …]
|
D | bpf_iter_udp6.c | 38 struct inet_sock *inet; in dump_udp6() local 54 inet = &udp_sk->inet; in dump_udp6() 55 srcp = bpf_ntohs(inet->inet_sport); in dump_udp6() 56 destp = bpf_ntohs(inet->inet_dport); in dump_udp6() 57 rqueue = inet->sk.sk_rmem_alloc.counter - udp_sk->forward_deficit; in dump_udp6() 58 dest = &inet->sk.sk_v6_daddr; in dump_udp6() 59 src = &inet->sk.sk_v6_rcv_saddr; in dump_udp6() 69 inet->sk.sk_state, in dump_udp6() 70 inet->sk.sk_wmem_alloc.refs.counter - 1, in dump_udp6() 73 sock_i_ino(&inet->sk), in dump_udp6() [all …]
|
D | bpf_iter_tcp4.c | 79 const struct inet_sock *inet; in dump_tcp_sock() local 89 inet = &icsk->icsk_inet; in dump_tcp_sock() 90 sp = &inet->sk; in dump_tcp_sock() 93 dest = inet->inet_daddr; in dump_tcp_sock() 94 src = inet->inet_rcv_saddr; in dump_tcp_sock() 95 destp = bpf_ntohs(inet->inet_dport); in dump_tcp_sock() 96 srcp = bpf_ntohs(inet->inet_sport); in dump_tcp_sock()
|
D | bpf_iter_tcp6.c | 80 const struct inet_sock *inet; in dump_tcp6_sock() local 89 inet = &icsk->icsk_inet; in dump_tcp6_sock() 90 sp = &inet->sk; in dump_tcp6_sock() 95 destp = bpf_ntohs(inet->inet_dport); in dump_tcp6_sock() 96 srcp = bpf_ntohs(inet->inet_sport); in dump_tcp6_sock()
|
/linux-6.1.9/net/ipv4/ |
D | datagram.c | 21 struct inet_sock *inet = inet_sk(sk); in __ip4_datagram_connect() local 39 saddr = inet->inet_saddr; in __ip4_datagram_connect() 42 oif = inet->mc_index; in __ip4_datagram_connect() 44 saddr = inet->mc_addr; in __ip4_datagram_connect() 46 oif = inet->uc_index; in __ip4_datagram_connect() 48 fl4 = &inet->cork.fl.u.ip4; in __ip4_datagram_connect() 50 sk->sk_protocol, inet->inet_sport, in __ip4_datagram_connect() 64 if (!inet->inet_saddr) in __ip4_datagram_connect() 65 inet->inet_saddr = fl4->saddr; /* Update source address */ in __ip4_datagram_connect() 66 if (!inet->inet_rcv_saddr) { in __ip4_datagram_connect() [all …]
|
D | ip_sockglue.c | 174 struct inet_sock *inet = inet_sk(sk); in ip_cmsg_recv_offset() local 175 unsigned int flags = inet->cmsg_flags; in ip_cmsg_recv_offset() 439 struct inet_sock *inet = inet_sk(sk); in ip_local_error() local 444 if (!inet->recverr) in ip_local_error() 894 struct inet_sock *inet = inet_sk(sk); in do_ip_setsockopt() local 959 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt() 961 if (inet->is_icsk) { in do_ip_setsockopt() 967 inet->inet_daddr != LOOPBACK4_IPV6)) { in do_ip_setsockopt() 978 rcu_assign_pointer(inet->inet_opt, opt); in do_ip_setsockopt() 985 inet->cmsg_flags |= IP_CMSG_PKTINFO; in do_ip_setsockopt() [all …]
|
D | af_inet.c | 134 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local 156 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct() 175 struct inet_sock *inet; in inet_autobind() local 178 inet = inet_sk(sk); in inet_autobind() 179 if (!inet->inet_num) { in inet_autobind() 184 inet->inet_sport = htons(inet->inet_num); in inet_autobind() 250 struct inet_sock *inet; in inet_create() local 327 inet = inet_sk(sk); in inet_create() 328 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet_create() 330 inet->nodefrag = 0; in inet_create() [all …]
|
D | raw.c | 122 struct inet_sock *inet = inet_sk(sk); in raw_v4_match() local 124 if (net_eq(sock_net(sk), net) && inet->inet_num == num && in raw_v4_match() 125 !(inet->inet_daddr && inet->inet_daddr != raddr) && in raw_v4_match() 126 !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && in raw_v4_match() 203 struct inet_sock *inet = inet_sk(sk); in raw_err() local 221 if (!inet->recverr && sk->sk_state != TCP_ESTABLISHED) in raw_err() 240 harderr = inet->pmtudisc != IP_PMTUDISC_DONT; in raw_err() 248 if (inet->recverr) { in raw_err() 252 if (inet->hdrincl) in raw_err() 257 if (inet->recverr || harderr) { in raw_err() [all …]
|
D | inet_timewait_sock.c | 120 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_hashdance() local 130 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, in inet_twsk_hashdance() 132 bhead2 = inet_bhashfn_portaddr(hashinfo, sk, twsk_net(tw), inet->inet_num); in inet_twsk_hashdance() 191 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_alloc() local 195 tw->tw_daddr = inet->inet_daddr; in inet_twsk_alloc() 196 tw->tw_rcv_saddr = inet->inet_rcv_saddr; in inet_twsk_alloc() 198 tw->tw_tos = inet->tos; in inet_twsk_alloc() 199 tw->tw_num = inet->inet_num; in inet_twsk_alloc() 202 tw->tw_sport = inet->inet_sport; in inet_twsk_alloc() 203 tw->tw_dport = inet->inet_dport; in inet_twsk_alloc() [all …]
|
D | udp.c | 365 struct inet_sock *inet; in compute_score() local 378 inet = inet_sk(sk); in compute_score() 379 if (inet->inet_daddr) { in compute_score() 380 if (inet->inet_daddr != saddr) in compute_score() 385 if (inet->inet_dport) { in compute_score() 386 if (inet->inet_dport != sport) in compute_score() 580 struct inet_sock *inet = inet_sk(sk); in __udp_is_mcast_sock() local 584 (inet->inet_daddr && inet->inet_daddr != rmt_addr) || in __udp_is_mcast_sock() 585 (inet->inet_dport != rmt_port && inet->inet_dport) || in __udp_is_mcast_sock() 586 (inet->inet_rcv_saddr && inet->inet_rcv_saddr != loc_addr) || in __udp_is_mcast_sock() [all …]
|
D | ip_output.c | 132 static inline int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst) in ip_select_ttl() argument 134 int ttl = inet->uc_ttl; in ip_select_ttl() 149 struct inet_sock *inet = inet_sk(sk); in ip_build_and_send_pkt() local 161 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_build_and_send_pkt() 456 struct inet_sock *inet = inet_sk(sk); in __ip_queue_xmit() local 468 inet_opt = rcu_dereference(inet->inet_opt); in __ip_queue_xmit() 480 daddr = inet->inet_daddr; in __ip_queue_xmit() 489 daddr, inet->inet_saddr, in __ip_queue_xmit() 490 inet->inet_dport, in __ip_queue_xmit() 491 inet->inet_sport, in __ip_queue_xmit() [all …]
|
/linux-6.1.9/include/trace/events/ |
D | net_probe_common.h | 6 #define TP_STORE_ADDR_PORTS_V4(__entry, inet, sk) \ argument 11 v4->sin_port = inet->inet_sport; \ 12 v4->sin_addr.s_addr = inet->inet_saddr; \ 15 v4->sin_port = inet->inet_dport; \ 16 v4->sin_addr.s_addr = inet->inet_daddr; \ 21 #define TP_STORE_ADDR_PORTS(__entry, inet, sk) \ argument 27 v6->sin6_port = inet->inet_sport; \ 31 v6->sin6_port = inet->inet_dport; \ 34 TP_STORE_ADDR_PORTS_V4(__entry, inet, sk); \ 39 #define TP_STORE_ADDR_PORTS(__entry, inet, sk) \ argument [all …]
|
D | tcp.h | 70 struct inet_sock *inet = inet_sk(sk); 77 __entry->sport = ntohs(inet->inet_sport); 78 __entry->dport = ntohs(inet->inet_dport); 82 *p32 = inet->inet_saddr; 85 *p32 = inet->inet_daddr; 87 TP_STORE_ADDRS(__entry, inet->inet_saddr, inet->inet_daddr, 140 struct inet_sock *inet = inet_sk(sk); 145 __entry->sport = ntohs(inet->inet_sport); 146 __entry->dport = ntohs(inet->inet_dport); 150 *p32 = inet->inet_saddr; [all …]
|
D | sock.h | 161 struct inet_sock *inet = inet_sk(sk); 171 __entry->sport = ntohs(inet->inet_sport); 172 __entry->dport = ntohs(inet->inet_dport); 175 *p32 = inet->inet_saddr; 178 *p32 = inet->inet_daddr; 190 ipv6_addr_set_v4mapped(inet->inet_saddr, pin6); 192 ipv6_addr_set_v4mapped(inet->inet_daddr, pin6); 225 struct inet_sock *inet = inet_sk(sk); 232 __entry->sport = ntohs(inet->inet_sport); 233 __entry->dport = ntohs(inet->inet_dport); [all …]
|
/linux-6.1.9/tools/testing/selftests/netfilter/ |
D | nft_nat.sh | 86 ip netns exec $ns nft list counter inet filter $counter 1>&2 94 cnt=$(ip netns exec $ns nft list counter inet filter ns0in | grep -q "packets 1 bytes 84") 99 cnt=$(ip netns exec $ns nft list counter inet filter ns0out | grep -q "packets 1 bytes 84") 106 cnt=$(ip netns exec $ns nft list counter inet filter ns0in6 | grep -q "$expect") 111 cnt=$(ip netns exec $ns nft list counter inet filter ns0out6 | grep -q "$expect") 125 cnt=$(ip netns exec "$ns0" nft list counter inet filter ns0in | grep -q "packets 0 bytes 0") 131 cnt=$(ip netns exec "$ns0" nft list counter inet filter ns0in6 | grep -q "packets 0 bytes 0") 137 cnt=$(ip netns exec "$ns0" nft list counter inet filter ns0out | grep -q "packets 0 bytes 0") 142 cnt=$(ip netns exec "$ns0" nft list counter inet filter ns0out6 | grep -q "packets 0 bytes 0") 150 cnt=$(ip netns exec "$ns0" nft list counter inet filter ${ns}${dir} | grep -q "$expect") [all …]
|
/linux-6.1.9/net/l2tp/ |
D | l2tp_ip.c | 30 struct inet_sock inet; member 52 const struct inet_sock *inet = inet_sk(sk); in __l2tp_ip_bind_lookup() local 62 if (inet->inet_rcv_saddr && laddr && in __l2tp_ip_bind_lookup() 63 inet->inet_rcv_saddr != laddr) in __l2tp_ip_bind_lookup() 66 if (inet->inet_daddr && raddr && inet->inet_daddr != raddr) in __l2tp_ip_bind_lookup() 250 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_bind() local 277 inet->inet_rcv_saddr = addr->l2tp_addr.s_addr; in l2tp_ip_bind() 278 inet->inet_saddr = addr->l2tp_addr.s_addr; in l2tp_ip_bind() 281 inet->inet_saddr = 0; /* Use device */ in l2tp_ip_bind() 355 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_getname() local [all …]
|
/linux-6.1.9/net/ipv6/ |
D | af_inet6.c | 121 struct inet_sock *inet; in inet6_create() local 201 inet = inet_sk(sk); in inet6_create() 202 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet6_create() 205 inet->inet_num = protocol; in inet6_create() 207 inet->hdrincl = 1; in inet6_create() 228 inet->uc_ttl = -1; in inet6_create() 230 inet->mc_loop = 1; in inet6_create() 231 inet->mc_ttl = 1; in inet6_create() 232 inet->mc_index = 0; in inet6_create() 233 RCU_INIT_POINTER(inet->mc_list, NULL); in inet6_create() [all …]
|
D | inet6_hashtables.c | 248 struct inet_sock *inet = inet_sk(sk); in __inet6_check_established() local 254 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet6_check_established() 256 inet->inet_dport); in __inet6_check_established() 283 inet->inet_num = lport; in __inet6_check_established() 284 inet->inet_sport = htons(lport); in __inet6_check_established() 310 const struct inet_sock *inet = inet_sk(sk); in inet6_sk_port_offset() local 314 inet->inet_dport); in inet6_sk_port_offset()
|
/linux-6.1.9/net/dccp/ |
D | ipv4.c | 48 struct inet_sock *inet = inet_sk(sk); in dccp_v4_connect() local 67 inet_opt = rcu_dereference_protected(inet->inet_opt, in dccp_v4_connect() 75 orig_sport = inet->inet_sport; in dccp_v4_connect() 77 fl4 = &inet->cork.fl.u.ip4; in dccp_v4_connect() 78 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in dccp_v4_connect() 92 if (inet->inet_saddr == 0) { in dccp_v4_connect() 99 sk_rcv_saddr_set(sk, inet->inet_saddr); in dccp_v4_connect() 102 inet->inet_dport = usin->sin_port; in dccp_v4_connect() 120 inet->inet_sport, inet->inet_dport, sk); in dccp_v4_connect() 129 dp->dccps_iss = secure_dccp_sequence_number(inet->inet_saddr, in dccp_v4_connect() [all …]
|
D | trace.h | 37 const struct inet_sock *inet = inet_sk(sk); 46 TP_STORE_ADDR_PORTS(__entry, inet, sk); 49 __entry->sport = ntohs(inet->inet_sport); 50 __entry->dport = ntohs(inet->inet_dport);
|
/linux-6.1.9/include/linux/ |
D | udp.h | 35 struct inet_sock inet; member 36 #define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0] 37 #define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1] 38 #define udp_portaddr_node inet.sk.__sk_common.skc_portaddr_node
|
/linux-6.1.9/net/rds/ |
D | tcp_listen.c | 102 struct inet_sock *inet; in rds_tcp_accept_one() local 141 inet = inet_sk(new_sock->sk); in rds_tcp_accept_one() 147 ipv6_addr_set_v4mapped(inet->inet_saddr, &saddr); in rds_tcp_accept_one() 148 ipv6_addr_set_v4mapped(inet->inet_daddr, &daddr); in rds_tcp_accept_one() 154 my_addr, ntohs(inet->inet_sport), in rds_tcp_accept_one() 155 peer_addr, ntohs(inet->inet_dport)); in rds_tcp_accept_one()
|
/linux-6.1.9/fs/ocfs2/cluster/ |
D | netdebug.c | 297 struct inet_sock *inet = NULL; in sc_show_sock_container() local 305 inet = inet_sk(sc->sc_sock->sk); in sc_show_sock_container() 307 saddr = (__force __be32)inet->inet_saddr; in sc_show_sock_container() 308 daddr = (__force __be32)inet->inet_daddr; in sc_show_sock_container() 309 sport = (__force __be16)inet->inet_sport; in sc_show_sock_container() 310 dport = (__force __be16)inet->inet_dport; in sc_show_sock_container() 332 &saddr, inet ? ntohs(sport) : 0, in sc_show_sock_container() 333 &daddr, inet ? ntohs(dport) : 0, in sc_show_sock_container()
|
/linux-6.1.9/security/ |
D | lsm_audit.c | 319 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() local 321 print_ipv4_addr(ab, inet->inet_rcv_saddr, in dump_common_audit_data() 322 inet->inet_sport, in dump_common_audit_data() 324 print_ipv4_addr(ab, inet->inet_daddr, in dump_common_audit_data() 325 inet->inet_dport, in dump_common_audit_data() 331 struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() local 334 inet->inet_sport, in dump_common_audit_data() 337 inet->inet_dport, in dump_common_audit_data()
|
/linux-6.1.9/net/mptcp/ |
D | mptcp_diag.c | 101 struct inet_sock *inet = inet_sk(sk); in mptcp_diag_dump_listeners() local 118 if (r->id.idiag_sport != inet->inet_sport && in mptcp_diag_dump_listeners() 169 struct inet_sock *inet = (struct inet_sock *)msk; in mptcp_diag_dump() local 178 if (r->id.idiag_sport != inet->inet_sport && in mptcp_diag_dump() 181 if (r->id.idiag_dport != inet->inet_dport && in mptcp_diag_dump()
|