Home
last modified time | relevance | path

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

123

/net/ipv4/
Ddatagram.c25 struct inet_sock *inet = inet_sk(sk); in ip4_datagram_connect() local
45 saddr = inet->inet_saddr; in ip4_datagram_connect()
48 oif = inet->mc_index; in ip4_datagram_connect()
50 saddr = inet->mc_addr; in ip4_datagram_connect()
52 fl4 = &inet->cork.fl.u.ip4; in ip4_datagram_connect()
56 inet->inet_sport, usin->sin_port, sk, true); in ip4_datagram_connect()
69 if (!inet->inet_saddr) in ip4_datagram_connect()
70 inet->inet_saddr = fl4->saddr; /* Update source address */ in ip4_datagram_connect()
71 if (!inet->inet_rcv_saddr) { in ip4_datagram_connect()
72 inet->inet_rcv_saddr = fl4->saddr; in ip4_datagram_connect()
[all …]
Dip_sockglue.c150 struct inet_sock *inet = inet_sk(skb->sk); in ip_cmsg_recv() local
151 unsigned int flags = inet->cmsg_flags; in ip_cmsg_recv()
333 struct inet_sock *inet = inet_sk(sk); in ip_local_error() local
338 if (!inet->recverr) in ip_local_error()
415 struct inet_sock *inet = inet_sk(sk); in ip_recv_error() local
421 if (inet->cmsg_flags) in ip_recv_error()
458 struct inet_sock *inet = inet_sk(sk); in do_ip_setsockopt() local
514 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt()
516 if (inet->is_icsk) { in do_ip_setsockopt()
522 inet->inet_daddr != LOOPBACK4_IPV6)) { in do_ip_setsockopt()
[all …]
Daf_inet.c150 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local
172 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct()
191 struct inet_sock *inet; in inet_autobind() local
194 inet = inet_sk(sk); in inet_autobind()
195 if (!inet->inet_num) { in inet_autobind()
200 inet->inet_sport = htons(inet->inet_num); in inet_autobind()
296 struct inet_sock *inet; in inet_create() local
379 inet = inet_sk(sk); in inet_create()
380 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet_create()
382 inet->nodefrag = 0; in inet_create()
[all …]
Draw.c115 struct inet_sock *inet = inet_sk(sk); in __raw_v4_lookup() local
117 if (net_eq(sock_net(sk), net) && inet->inet_num == num && in __raw_v4_lookup()
118 !(inet->inet_daddr && inet->inet_daddr != raddr) && in __raw_v4_lookup()
119 !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && in __raw_v4_lookup()
213 struct inet_sock *inet = inet_sk(sk); in raw_err() local
229 if (!inet->recverr && sk->sk_state != TCP_ESTABLISHED) in raw_err()
250 harderr = inet->pmtudisc != IP_PMTUDISC_DONT; in raw_err()
255 if (inet->recverr) { in raw_err()
259 if (inet->hdrincl) in raw_err()
264 if (inet->recverr || harderr) { in raw_err()
[all …]
Dudp.c344 struct inet_sock *inet = inet_sk(sk); in compute_score() local
347 if (inet->inet_rcv_saddr) { in compute_score()
348 if (inet->inet_rcv_saddr != daddr) in compute_score()
352 if (inet->inet_daddr) { in compute_score()
353 if (inet->inet_daddr != saddr) in compute_score()
357 if (inet->inet_dport) { in compute_score()
358 if (inet->inet_dport != sport) in compute_score()
381 struct inet_sock *inet = inet_sk(sk); in compute_score2() local
383 if (inet->inet_rcv_saddr != daddr) in compute_score2()
385 if (inet->inet_num != hnum) in compute_score2()
[all …]
Dip_output.c116 static inline int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst) in ip_select_ttl() argument
118 int ttl = inet->uc_ttl; in ip_select_ttl()
132 struct inet_sock *inet = inet_sk(sk); in ip_build_and_send_pkt() local
142 iph->tos = inet->tos; in ip_build_and_send_pkt()
147 iph->ttl = ip_select_ttl(inet, &rt->dst); in ip_build_and_send_pkt()
216 struct inet_sock *inet = skb->sk ? inet_sk(skb->sk) : NULL; in ip_skb_dst_mtu() local
218 return (inet && inet->pmtudisc == IP_PMTUDISC_PROBE) ? in ip_skb_dst_mtu()
329 struct inet_sock *inet = inet_sk(sk); in ip_queue_xmit() local
340 inet_opt = rcu_dereference(inet->inet_opt); in ip_queue_xmit()
352 daddr = inet->inet_daddr; in ip_queue_xmit()
[all …]
Dtcp_probe.c97 const struct inet_sock *inet = inet_sk(sk); in jtcp_rcv_established() local
100 if ((port == 0 || ntohs(inet->inet_dport) == port || in jtcp_rcv_established()
101 ntohs(inet->inet_sport) == port) && in jtcp_rcv_established()
110 p->saddr = inet->inet_saddr; in jtcp_rcv_established()
111 p->sport = inet->inet_sport; in jtcp_rcv_established()
112 p->daddr = inet->inet_daddr; in jtcp_rcv_established()
113 p->dport = inet->inet_dport; in jtcp_rcv_established()
Dinet_hashtables.c149 struct inet_sock *inet = inet_sk(sk); in compute_score() local
151 if (net_eq(sock_net(sk), net) && inet->inet_num == hnum && in compute_score()
153 __be32 rcv_saddr = inet->inet_rcv_saddr; in compute_score()
316 struct inet_sock *inet = inet_sk(sk); in __inet_check_established() local
317 __be32 daddr = inet->inet_rcv_saddr; in __inet_check_established()
318 __be32 saddr = inet->inet_daddr; in __inet_check_established()
321 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet_check_established()
324 saddr, inet->inet_dport); in __inet_check_established()
362 inet->inet_num = lport; in __inet_check_established()
363 inet->inet_sport = htons(lport); in __inet_check_established()
[all …]
Dinet_timewait_sock.c129 const struct inet_sock *inet = inet_sk(sk); in __inet_twsk_hashdance() local
138 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, in __inet_twsk_hashdance()
179 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_alloc() local
184 tw->tw_daddr = inet->inet_daddr; in inet_twsk_alloc()
185 tw->tw_rcv_saddr = inet->inet_rcv_saddr; in inet_twsk_alloc()
187 tw->tw_tos = inet->tos; in inet_twsk_alloc()
188 tw->tw_num = inet->inet_num; in inet_twsk_alloc()
191 tw->tw_sport = inet->inet_sport; in inet_twsk_alloc()
192 tw->tw_dport = inet->inet_dport; in inet_twsk_alloc()
197 tw->tw_transparent = inet->transparent; in inet_twsk_alloc()
Dinet_connection_sock.c759 struct inet_sock *inet = inet_sk(sk); in inet_csk_listen_start() local
776 if (!sk->sk_prot->get_port(sk, inet->inet_num)) { in inet_csk_listen_start()
777 inet->inet_sport = htons(inet->inet_num); in inet_csk_listen_start()
873 const struct inet_sock *inet = inet_sk(sk); in inet_csk_addr2sockaddr() local
876 sin->sin_addr.s_addr = inet->inet_daddr; in inet_csk_addr2sockaddr()
877 sin->sin_port = inet->inet_dport; in inet_csk_addr2sockaddr()
911 const struct inet_sock *inet = inet_sk(sk); in inet_csk_rebuild_route() local
913 __be32 daddr = inet->inet_daddr; in inet_csk_rebuild_route()
918 inet_opt = rcu_dereference(inet->inet_opt); in inet_csk_rebuild_route()
923 inet->inet_saddr, inet->inet_dport, in inet_csk_rebuild_route()
[all …]
Dinet_diag.c82 const struct inet_sock *inet = inet_sk(sk); in inet_sk_diag_fill() local
109 r->id.idiag_sport = inet->inet_sport; in inet_sk_diag_fill()
110 r->id.idiag_dport = inet->inet_dport; in inet_sk_diag_fill()
115 r->id.idiag_src[0] = inet->inet_rcv_saddr; in inet_sk_diag_fill()
116 r->id.idiag_dst[0] = inet->inet_daddr; in inet_sk_diag_fill()
125 if (nla_put_u8(skb, INET_DIAG_TOS, inet->tos) < 0) in inet_sk_diag_fill()
548 struct inet_sock *inet = inet_sk(sk); in inet_diag_bc_sk() local
563 entry.saddr = &inet->inet_rcv_saddr; in inet_diag_bc_sk()
564 entry.daddr = &inet->inet_daddr; in inet_diag_bc_sk()
566 entry.sport = inet->inet_num; in inet_diag_bc_sk()
[all …]
Dping.c696 struct inet_sock *inet = inet_sk(sk); in ping_v4_sendmsg() local
707 pr_debug("ping_v4_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v4_sendmsg()
729 daddr = inet->inet_daddr; in ping_v4_sendmsg()
733 ipc.addr = inet->inet_saddr; in ping_v4_sendmsg()
751 inet_opt = rcu_dereference(inet->inet_opt); in ping_v4_sendmsg()
768 tos = RT_TOS(inet->tos); in ping_v4_sendmsg()
777 ipc.oif = inet->mc_index; in ping_v4_sendmsg()
779 saddr = inet->mc_addr; in ping_v4_sendmsg()
781 ipc.oif = inet->uc_index; in ping_v4_sendmsg()
815 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v4_sendmsg()
[all …]
Dtcp_ipv4.c145 struct inet_sock *inet = inet_sk(sk); in tcp_v4_connect() local
161 inet_opt = rcu_dereference_protected(inet->inet_opt, in tcp_v4_connect()
169 orig_sport = inet->inet_sport; in tcp_v4_connect()
171 fl4 = &inet->cork.fl.u.ip4; in tcp_v4_connect()
172 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in tcp_v4_connect()
191 if (!inet->inet_saddr) in tcp_v4_connect()
192 inet->inet_saddr = fl4->saddr; in tcp_v4_connect()
193 inet->inet_rcv_saddr = inet->inet_saddr; in tcp_v4_connect()
195 if (tp->rx_opt.ts_recent_stamp && inet->inet_daddr != daddr) { in tcp_v4_connect()
207 inet->inet_dport = usin->sin_port; in tcp_v4_connect()
[all …]
Dtcp_timer.c368 struct inet_sock *inet = inet_sk(sk); in tcp_retransmit_timer() local
371 &inet->inet_daddr, in tcp_retransmit_timer()
372 ntohs(inet->inet_dport), inet->inet_num, in tcp_retransmit_timer()
380 ntohs(inet->inet_dport), inet->inet_num, in tcp_retransmit_timer()
/net/ipv6/
Daf_inet6.c116 struct inet_sock *inet; in inet6_create() local
203 inet = inet_sk(sk); in inet6_create()
204 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet6_create()
207 inet->inet_num = protocol; in inet6_create()
209 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 inet->mc_list = NULL; in inet6_create()
[all …]
Dinet6_hashtables.c238 struct inet_sock *inet = inet_sk(sk); in __inet6_check_established() local
243 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet6_check_established()
246 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()
314 const struct inet_sock *inet = inet_sk(sk); in inet6_sk_port_offset() local
318 inet->inet_dport); in inet6_sk_port_offset()
Dudp.c136 struct inet_sock *inet = inet_sk(sk); in compute_score() local
139 if (inet->inet_dport) { in compute_score()
140 if (inet->inet_dport != sport) in compute_score()
174 struct inet_sock *inet = inet_sk(sk); in compute_score2() local
179 if (inet->inet_dport) { in compute_score2()
180 if (inet->inet_dport != sport) in compute_score2()
367 struct inet_sock *inet = inet_sk(sk); in udpv6_recvmsg() local
466 if (inet->cmsg_flags) in udpv6_recvmsg()
680 struct inet_sock *inet = inet_sk(s); in udp_v6_mcast_next() local
688 if (inet->inet_dport) { in udp_v6_mcast_next()
[all …]
Dping.c108 struct inet_sock *inet = inet_sk(sk); in ping_v6_sendmsg() local
121 pr_debug("ping_v6_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v6_sendmsg()
192 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg()
Draw.c240 struct inet_sock *inet = inet_sk(sk); in rawv6_bind() local
299 inet->inet_rcv_saddr = inet->inet_saddr = v4addr; in rawv6_bind()
315 struct inet_sock *inet = inet_sk(sk); in rawv6_err() local
337 if (!inet->hdrincl) in rawv6_err()
405 struct inet_sock *inet = inet_sk(sk); in rawv6_rcv() local
422 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv()
429 inet->inet_num, 0)); in rawv6_rcv()
431 if (inet->hdrincl) { in rawv6_rcv()
733 struct inet_sock *inet = inet_sk(sk); in rawv6_sendmsg() local
776 proto = inet->inet_num; in rawv6_sendmsg()
[all …]
Ddatagram.c46 struct inet_sock *inet = inet_sk(sk); in ip6_datagram_connect() local
110 ipv6_addr_set_v4mapped(inet->inet_daddr, &np->daddr); in ip6_datagram_connect()
114 ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); in ip6_datagram_connect()
118 ipv6_addr_set_v4mapped(inet->inet_rcv_saddr, in ip6_datagram_connect()
151 inet->inet_dport = usin->sin6_port; in ip6_datagram_connect()
163 fl6.fl6_dport = inet->inet_dport; in ip6_datagram_connect()
164 fl6.fl6_sport = inet->inet_sport; in ip6_datagram_connect()
191 inet->inet_rcv_saddr = LOOPBACK4_IPV6; in ip6_datagram_connect()
392 struct inet_sock *inet = inet_sk(sk); in ipv6_recv_error() local
397 if (inet->cmsg_flags) in ipv6_recv_error()
/net/dccp/
Dprobe.c78 const struct inet_sock *inet = inet_sk(sk); in jdccp_sendmsg() local
84 if (port == 0 || ntohs(inet->inet_dport) == port || in jdccp_sendmsg()
85 ntohs(inet->inet_sport) == port) { in jdccp_sendmsg()
88 &inet->inet_saddr, ntohs(inet->inet_sport), in jdccp_sendmsg()
89 &inet->inet_daddr, ntohs(inet->inet_dport), size, in jdccp_sendmsg()
95 &inet->inet_saddr, ntohs(inet->inet_sport), in jdccp_sendmsg()
96 &inet->inet_daddr, ntohs(inet->inet_dport), in jdccp_sendmsg()
Dipv4.c45 struct inet_sock *inet = inet_sk(sk); in dccp_v4_connect() local
64 inet_opt = rcu_dereference_protected(inet->inet_opt, in dccp_v4_connect()
72 orig_sport = inet->inet_sport; in dccp_v4_connect()
74 fl4 = &inet->cork.fl.u.ip4; in dccp_v4_connect()
75 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in dccp_v4_connect()
90 if (inet->inet_saddr == 0) in dccp_v4_connect()
91 inet->inet_saddr = fl4->saddr; in dccp_v4_connect()
92 inet->inet_rcv_saddr = inet->inet_saddr; in dccp_v4_connect()
94 inet->inet_dport = usin->sin_port; in dccp_v4_connect()
95 inet->inet_daddr = daddr; in dccp_v4_connect()
[all …]
/net/l2tp/
Dl2tp_ip.c35 struct inet_sock inet; member
55 struct inet_sock *inet = inet_sk(sk); in __l2tp_ip_bind_lookup() local
63 !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && in __l2tp_ip_bind_lookup()
246 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_bind() local
279 inet->inet_rcv_saddr = inet->inet_saddr = addr->l2tp_addr.s_addr; in l2tp_ip_bind()
281 inet->inet_saddr = 0; /* Use device */ in l2tp_ip_bind()
347 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_getname() local
354 if (!inet->inet_dport) in l2tp_ip_getname()
357 lsa->l2tp_addr.s_addr = inet->inet_daddr; in l2tp_ip_getname()
359 __be32 addr = inet->inet_rcv_saddr; in l2tp_ip_getname()
[all …]
Dl2tp_debugfs.c126 struct inet_sock *inet = inet_sk(tunnel->sock); in l2tp_dfs_seq_tunnel_show() local
136 &inet->inet_saddr, &inet->inet_daddr); in l2tp_dfs_seq_tunnel_show()
139 ntohs(inet->inet_sport), ntohs(inet->inet_dport)); in l2tp_dfs_seq_tunnel_show()
/net/rds/
Dtcp_listen.c53 struct inet_sock *inet; in rds_tcp_accept_one() local
68 inet = inet_sk(new_sock->sk); in rds_tcp_accept_one()
71 &inet->inet_saddr, ntohs(inet->inet_sport), in rds_tcp_accept_one()
72 &inet->inet_daddr, ntohs(inet->inet_dport)); in rds_tcp_accept_one()
74 conn = rds_conn_create(inet->inet_saddr, inet->inet_daddr, in rds_tcp_accept_one()

123