Home
last modified time | relevance | path

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

123

/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.c136 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local
158 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct()
176 struct inet_sock *inet; in inet_autobind() local
179 inet = inet_sk(sk); in inet_autobind()
180 if (!inet->inet_num) { in inet_autobind()
185 inet->inet_sport = htons(inet->inet_num); in inet_autobind()
257 struct inet_sock *inet; in inet_create() local
337 inet = inet_sk(sk); in inet_create()
343 inet->inet_num = protocol; in inet_create()
349 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()
477 struct inet_sock *inet = inet_sk(sk); in raw_sendmsg() local
530 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.c375 struct inet_sock *inet; in compute_score() local
388 inet = inet_sk(sk); in compute_score()
389 if (inet->inet_daddr) { in compute_score()
390 if (inet->inet_daddr != saddr) in compute_score()
395 if (inet->inet_dport) { in compute_score()
396 if (inet->inet_dport != sport) in compute_score()
586 const struct inet_sock *inet = inet_sk(sk); in __udp_is_mcast_sock() local
590 (inet->inet_daddr && inet->inet_daddr != rmt_addr) || in __udp_is_mcast_sock()
591 (inet->inet_dport != rmt_port && inet->inet_dport) || in __udp_is_mcast_sock()
592 (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 …]
Dip_output.c135 static inline int ip_select_ttl(const struct inet_sock *inet, in ip_select_ttl() argument
138 int ttl = READ_ONCE(inet->uc_ttl); in ip_select_ttl()
153 const struct inet_sock *inet = inet_sk(sk); in ip_build_and_send_pkt() local
165 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_build_and_send_pkt()
459 struct inet_sock *inet = inet_sk(sk); in __ip_queue_xmit() local
471 inet_opt = rcu_dereference(inet->inet_opt); in __ip_queue_xmit()
483 daddr = inet->inet_daddr; in __ip_queue_xmit()
492 daddr, inet->inet_saddr, in __ip_queue_xmit()
493 inet->inet_dport, in __ip_queue_xmit()
494 inet->inet_sport, in __ip_queue_xmit()
[all …]
Dinet_connection_sock.c136 const struct inet_sock *inet = inet_sk(sk); in inet_sk_get_local_port_range() local
142 sk_lo = inet->local_port_range.lo; in inet_sk_get_local_port_range()
143 sk_hi = inet->local_port_range.hi; in inet_sk_get_local_port_range()
1270 struct inet_sock *inet = inet_sk(sk); in inet_csk_listen_start() local
1288 err = sk->sk_prot->get_port(sk, inet->inet_num); in inet_csk_listen_start()
1290 inet->inet_sport = htons(inet->inet_num); in inet_csk_listen_start()
1478 const struct inet_sock *inet = inet_sk(sk); in inet_csk_addr2sockaddr() local
1481 sin->sin_addr.s_addr = inet->inet_daddr; in inet_csk_addr2sockaddr()
1482 sin->sin_port = inet->inet_dport; in inet_csk_addr2sockaddr()
1488 const struct inet_sock *inet = inet_sk(sk); in inet_csk_rebuild_route() local
[all …]
Dtcp_ipv4.c214 struct inet_sock *inet = inet_sk(sk); in tcp_v4_connect() local
233 inet_opt = rcu_dereference_protected(inet->inet_opt, in tcp_v4_connect()
241 orig_sport = inet->inet_sport; in tcp_v4_connect()
243 fl4 = &inet->cork.fl.u.ip4; in tcp_v4_connect()
244 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in tcp_v4_connect()
264 if (!inet->inet_saddr) { in tcp_v4_connect()
271 sk_rcv_saddr_set(sk, inet->inet_saddr); in tcp_v4_connect()
274 if (tp->rx_opt.ts_recent_stamp && inet->inet_daddr != daddr) { in tcp_v4_connect()
282 inet->inet_dport = usin->sin_port; in tcp_v4_connect()
304 inet->inet_sport, inet->inet_dport, sk); in tcp_v4_connect()
[all …]
/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 …]
Dl2tp_debugfs.c142 struct inet_sock *inet = inet_sk(tunnel->sock); in l2tp_dfs_seq_tunnel_show() local
154 &inet->inet_saddr, &inet->inet_daddr); in l2tp_dfs_seq_tunnel_show()
158 ntohs(inet->inet_sport), ntohs(inet->inet_dport)); in l2tp_dfs_seq_tunnel_show()
/net/ipv6/
Daf_inet6.c124 struct inet_sock *inet; in inet6_create() local
207 inet = inet_sk(sk); in inet6_create()
211 inet->inet_num = protocol; in inet6_create()
235 inet->uc_ttl = -1; in inet6_create()
238 inet->mc_ttl = 1; in inet6_create()
239 inet->mc_index = 0; in inet6_create()
240 RCU_INIT_POINTER(inet->mc_list, NULL); in inet6_create()
241 inet->rcv_tos = 0; in inet6_create()
244 inet->pmtudisc = IP_PMTUDISC_DONT; in inet6_create()
246 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()
Dping.c64 struct inet_sock *inet = inet_sk(sk); in ping_v6_sendmsg() local
167 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
242 struct inet_sock *inet = inet_sk((struct sock *)v); in ping_v6_seq_show() local
243 __u16 srcp = ntohs(inet->inet_sport); in ping_v6_seq_show()
244 __u16 destp = ntohs(inet->inet_dport); in ping_v6_seq_show()
Ddatagram.c44 const struct inet_sock *inet = inet_sk(sk); in ip6_datagram_flow_key_init() local
53 fl6->fl6_dport = inet->inet_dport; in ip6_datagram_flow_key_init()
54 fl6->fl6_sport = inet->inet_sport; in ip6_datagram_flow_key_init()
78 struct inet_sock *inet = inet_sk(sk); in ip6_datagram_dst_update() local
107 inet->inet_rcv_saddr = LOOPBACK4_IPV6; in ip6_datagram_dst_update()
144 struct inet_sock *inet = inet_sk(sk); in __ip6_datagram_connect() local
203 ipv6_addr_set_v4mapped(inet->inet_daddr, &sk->sk_v6_daddr); in __ip6_datagram_connect()
207 ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); in __ip6_datagram_connect()
211 ipv6_addr_set_v4mapped(inet->inet_rcv_saddr, in __ip6_datagram_connect()
243 old_dport = inet->inet_dport; in __ip6_datagram_connect()
[all …]
Draw.c212 struct inet_sock *inet = inet_sk(sk); in rawv6_bind() local
269 !ipv6_can_nonlocal_bind(sock_net(sk), inet)) { in rawv6_bind()
278 inet->inet_rcv_saddr = inet->inet_saddr = v4addr; in rawv6_bind()
381 struct inet_sock *inet = inet_sk(sk); in rawv6_rcv() local
399 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv()
406 inet->inet_num, 0)); in rawv6_rcv()
740 struct inet_sock *inet = inet_sk(sk); in rawv6_sendmsg() local
789 proto = inet->inet_num; in rawv6_sendmsg()
790 else if (proto != inet->inet_num && in rawv6_sendmsg()
791 inet->inet_num != IPPROTO_RAW) in rawv6_sendmsg()
[all …]
Dudp.c127 struct inet_sock *inet; in compute_score() local
139 inet = inet_sk(sk); in compute_score()
141 if (inet->inet_dport) { in compute_score()
142 if (inet->inet_dport != sport) in compute_score()
339 struct inet_sock *inet = inet_sk(sk); in udpv6_recvmsg() local
438 if (inet_cmsg_flags(inet)) in udpv6_recvmsg()
815 const struct inet_sock *inet = inet_sk(sk); in __udp_v6_is_mcast_sock() local
822 (inet->inet_dport && inet->inet_dport != rmt_port) || in __udp_v6_is_mcast_sock()
1340 struct inet_sock *inet = inet_sk(sk); in udpv6_sendmsg() local
1402 sin.sin_port = sin6 ? sin6->sin6_port : inet->inet_dport; in udpv6_sendmsg()
[all …]
/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);
/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()
Dtcp.c245 struct inet_sock *inet = inet_sk(tc->t_sock->sk); in rds_tcp_tc_info() local
250 tsinfo.local_addr = inet->inet_saddr; in rds_tcp_tc_info()
251 tsinfo.local_port = inet->inet_sport; in rds_tcp_tc_info()
252 tsinfo.peer_addr = inet->inet_daddr; in rds_tcp_tc_info()
253 tsinfo.peer_port = inet->inet_dport; in rds_tcp_tc_info()
292 struct inet_sock *inet = inet_sk(sk); in rds6_tcp_tc_info() local
295 tsinfo6.local_port = inet->inet_sport; in rds6_tcp_tc_info()
297 tsinfo6.peer_port = inet->inet_dport; in rds6_tcp_tc_info()
/net/mptcp/
Dmptcp_diag.c101 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()
/net/netfilter/
Dnf_conntrack_proto.c270 const struct inet_sock *inet = inet_sk(sk); in getorigdst() local
277 tuple.src.u3.ip = inet->inet_rcv_saddr; in getorigdst()
278 tuple.src.u.tcp.port = inet->inet_sport; in getorigdst()
279 tuple.dst.u3.ip = inet->inet_daddr; in getorigdst()
280 tuple.dst.u.tcp.port = inet->inet_dport; in getorigdst()
328 const struct inet_sock *inet = inet_sk(sk); in ipv6_getorigdst() local
337 tuple.src.u.tcp.port = inet->inet_sport; in ipv6_getorigdst()
339 tuple.dst.u.tcp.port = inet->inet_dport; in ipv6_getorigdst()
/net/sunrpc/
Dxprtsock.c829 struct sock *sk = transport->inet; in xs_nospace()
855 struct sock *sk = transport->inet; in xs_sock_nospace()
869 struct sock *sk = transport->inet; in xs_stream_nospace()
942 vm_wait = sk_stream_is_writeable(transport->inet) ? true : false; in xs_local_send_request()
1025 if (status == -EAGAIN && sock_writeable(transport->inet)) in xs_udp_send_request()
1095 if (!transport->inet) in xs_tcp_send_request()
1111 tcp_sock_set_cork(transport->inet, true); in xs_tcp_send_request()
1113 vm_wait = sk_stream_is_writeable(transport->inet) ? true : false; in xs_tcp_send_request()
1130 tcp_sock_set_cork(transport->inet, false); in xs_tcp_send_request()
1238 struct sock *sk = transport->inet; in xs_reset_transport()
[all …]

123