Home
last modified time | relevance | path

Searched refs:inet (Results 1 – 25 of 121) sorted by relevance

12345

/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dbpf_iter_udp4.c29 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 …]
Dbpf_iter_udp6.c38 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 …]
Dsock_destroy_prog.c78 const struct inet_sock *inet; in iter_tcp6_server() local
93 inet = &icsk->icsk_inet; in iter_tcp6_server()
94 srcp = inet->inet_sport; in iter_tcp6_server()
131 struct inet_sock *inet; in iter_udp6_server() local
137 inet = &udp_sk->inet; in iter_udp6_server()
138 srcp = inet->inet_sport; in iter_udp6_server()
Dbpf_iter_tcp4.c79 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()
/linux-6.6.21/net/ipv4/
Ddatagram.c21 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 …]
Daf_inet.c135 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local
157 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()
256 struct inet_sock *inet; in inet_create() local
336 inet = inet_sk(sk); in inet_create()
342 inet->inet_num = protocol; in inet_create()
348 inet->pmtudisc = IP_PMTUDISC_DONT; in inet_create()
[all …]
Draw.c122 const 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
242 harderr = inet->pmtudisc != IP_PMTUDISC_DONT; in raw_err()
324 struct inet_sock *inet = inet_sk(sk); in raw_send_hdrinc() local
334 ip_local_error(sk, EMSGSIZE, fl4->daddr, inet->inet_dport, in raw_send_hdrinc()
476 struct inet_sock *inet = inet_sk(sk); in raw_sendmsg() local
529 daddr = inet->inet_daddr; in raw_sendmsg()
[all …]
Dinet_timewait_sock.c117 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_hashdance() local
127 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, in inet_twsk_hashdance()
129 bhead2 = inet_bhashfn_portaddr(hashinfo, sk, twsk_net(tw), inet->inet_num); in inet_twsk_hashdance()
188 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_alloc() local
192 tw->tw_daddr = inet->inet_daddr; in inet_twsk_alloc()
193 tw->tw_rcv_saddr = inet->inet_rcv_saddr; in inet_twsk_alloc()
195 tw->tw_tos = inet->tos; in inet_twsk_alloc()
196 tw->tw_num = inet->inet_num; in inet_twsk_alloc()
199 tw->tw_sport = inet->inet_sport; in inet_twsk_alloc()
200 tw->tw_dport = inet->inet_dport; in inet_twsk_alloc()
Dip_sockglue.c897 struct inet_sock *inet = inet_sk(sk); in do_ip_setsockopt() local
1029 WRITE_ONCE(inet->uc_ttl, val); in do_ip_setsockopt()
1040 WRITE_ONCE(inet->min_ttl, val); in do_ip_setsockopt()
1059 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt()
1067 inet->inet_daddr != LOOPBACK4_IPV6)) { in do_ip_setsockopt()
1078 rcu_assign_pointer(inet->inet_opt, opt); in do_ip_setsockopt()
1102 inet->pmtudisc = val; in do_ip_setsockopt()
1113 inet->mc_ttl = val; in do_ip_setsockopt()
1126 inet->uc_index = 0; in do_ip_setsockopt()
1143 inet->uc_index = ifindex; in do_ip_setsockopt()
[all …]
Dudp.c372 struct inet_sock *inet; in compute_score() local
385 inet = inet_sk(sk); in compute_score()
386 if (inet->inet_daddr) { in compute_score()
387 if (inet->inet_daddr != saddr) in compute_score()
392 if (inet->inet_dport) { in compute_score()
393 if (inet->inet_dport != sport) in compute_score()
571 const struct inet_sock *inet = inet_sk(sk); in __udp_is_mcast_sock() local
575 (inet->inet_daddr && inet->inet_daddr != rmt_addr) || in __udp_is_mcast_sock()
576 (inet->inet_dport != rmt_port && inet->inet_dport) || in __udp_is_mcast_sock()
577 (inet->inet_rcv_saddr && inet->inet_rcv_saddr != loc_addr) || in __udp_is_mcast_sock()
[all …]
Dping.c700 struct inet_sock *inet = inet_sk(sk); in ping_v4_sendmsg() local
711 pr_debug("ping_v4_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v4_sendmsg()
733 daddr = inet->inet_daddr; in ping_v4_sendmsg()
737 ipcm_init_sk(&ipc, inet); in ping_v4_sendmsg()
752 inet_opt = rcu_dereference(inet->inet_opt); in ping_v4_sendmsg()
771 tos = get_rttos(&ipc, inet); in ping_v4_sendmsg()
772 scope = ip_sendmsg_scope(inet, &ipc, msg); in ping_v4_sendmsg()
776 ipc.oif = inet->mc_index; in ping_v4_sendmsg()
778 saddr = inet->mc_addr; in ping_v4_sendmsg()
780 ipc.oif = inet->uc_index; in ping_v4_sendmsg()
[all …]
/linux-6.6.21/include/trace/events/
Dnet_probe_common.h6 #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 …]
Dtcp.h70 const 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 …]
Dsock.h161 const 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 const struct inet_sock *inet = inet_sk(sk);
232 __entry->sport = ntohs(inet->inet_sport);
233 __entry->dport = ntohs(inet->inet_dport);
[all …]
/linux-6.6.21/tools/testing/selftests/netfilter/
Dnft_nat.sh86 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.6.21/net/l2tp/
Dl2tp_ip.c30 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.6.21/net/ipv6/
Daf_inet6.c122 struct inet_sock *inet; in inet6_create() local
205 inet = inet_sk(sk); in inet6_create()
209 inet->inet_num = protocol; in inet6_create()
233 inet->uc_ttl = -1; in inet6_create()
236 inet->mc_ttl = 1; in inet6_create()
237 inet->mc_index = 0; in inet6_create()
238 RCU_INIT_POINTER(inet->mc_list, NULL); in inet6_create()
239 inet->rcv_tos = 0; in inet6_create()
242 inet->pmtudisc = IP_PMTUDISC_DONT; in inet6_create()
244 inet->pmtudisc = IP_PMTUDISC_WANT; in inet6_create()
[all …]
Dinet6_hashtables.c269 struct inet_sock *inet = inet_sk(sk); in __inet6_check_established() local
275 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet6_check_established()
277 inet->inet_dport); in __inet6_check_established()
304 inet->inet_num = lport; in __inet6_check_established()
305 inet->inet_sport = htons(lport); in __inet6_check_established()
331 const struct inet_sock *inet = inet_sk(sk); in inet6_sk_port_offset() local
335 inet->inet_dport); in inet6_sk_port_offset()
/linux-6.6.21/net/dccp/
Dipv4.c48 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 …]
Dtrace.h37 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.6.21/include/linux/
Dudp.h49 struct inet_sock inet; member
50 #define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0]
51 #define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1]
52 #define udp_portaddr_node inet.sk.__sk_common.skc_portaddr_node
110 #define udp_sk(ptr) container_of_const(ptr, struct udp_sock, inet.sk)
/linux-6.6.21/include/net/
Dinet_sock.h290 static inline unsigned long inet_cmsg_flags(const struct inet_sock *inet) in inet_cmsg_flags() argument
292 return READ_ONCE(inet->inet_flags) & IP_CMSG_ALL; in inet_cmsg_flags()
415 struct inet_sock *inet) in inet_can_nonlocal_bind() argument
418 test_bit(INET_FLAGS_FREEBIND, &inet->inet_flags) || in inet_can_nonlocal_bind()
419 test_bit(INET_FLAGS_TRANSPARENT, &inet->inet_flags); in inet_can_nonlocal_bind()
423 struct inet_sock *inet, in inet_addr_valid_or_nonlocal() argument
427 return inet_can_nonlocal_bind(net, inet) || in inet_addr_valid_or_nonlocal()
/linux-6.6.21/net/rds/
Dtcp_listen.c103 struct inet_sock *inet; in rds_tcp_accept_one() local
142 inet = inet_sk(new_sock->sk); in rds_tcp_accept_one()
148 ipv6_addr_set_v4mapped(inet->inet_saddr, &saddr); in rds_tcp_accept_one()
149 ipv6_addr_set_v4mapped(inet->inet_daddr, &daddr); in rds_tcp_accept_one()
155 my_addr, ntohs(inet->inet_sport), in rds_tcp_accept_one()
156 peer_addr, ntohs(inet->inet_dport)); in rds_tcp_accept_one()
/linux-6.6.21/fs/ocfs2/cluster/
Dnetdebug.c297 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.6.21/security/
Dlsm_audit.c320 const struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() local
322 print_ipv4_addr(ab, inet->inet_rcv_saddr, in dump_common_audit_data()
323 inet->inet_sport, in dump_common_audit_data()
325 print_ipv4_addr(ab, inet->inet_daddr, in dump_common_audit_data()
326 inet->inet_dport, in dump_common_audit_data()
332 const struct inet_sock *inet = inet_sk(sk); in dump_common_audit_data() local
335 inet->inet_sport, in dump_common_audit_data()
338 inet->inet_dport, in dump_common_audit_data()

12345