/net/ipv4/ |
D | datagram.c | 22 struct inet_sock *inet = inet_sk(sk); in __ip4_datagram_connect() local 40 saddr = inet->inet_saddr; in __ip4_datagram_connect() 43 oif = inet->mc_index; in __ip4_datagram_connect() 45 saddr = inet->mc_addr; in __ip4_datagram_connect() 47 fl4 = &inet->cork.fl.u.ip4; in __ip4_datagram_connect() 51 inet->inet_sport, usin->sin_port, sk); 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() 67 inet->inet_rcv_saddr = fl4->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() 423 struct inet_sock *inet = inet_sk(sk); in ip_local_error() local 428 if (!inet->recverr) in ip_local_error() 593 struct inet_sock *inet = inet_sk(sk); in do_ip_setsockopt() local 658 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt() 660 if (inet->is_icsk) { in do_ip_setsockopt() 666 inet->inet_daddr != LOOPBACK4_IPV6)) { in do_ip_setsockopt() 677 rcu_assign_pointer(inet->inet_opt, opt); in do_ip_setsockopt() 684 inet->cmsg_flags |= IP_CMSG_PKTINFO; in do_ip_setsockopt() [all …]
|
D | af_inet.c | 132 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() 177 struct inet_sock *inet; in inet_autobind() local 180 inet = inet_sk(sk); in inet_autobind() 181 if (!inet->inet_num) { in inet_autobind() 186 inet->inet_sport = htons(inet->inet_num); in inet_autobind() 252 struct inet_sock *inet; in inet_create() local 329 inet = inet_sk(sk); in inet_create() 330 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet_create() 332 inet->nodefrag = 0; in inet_create() [all …]
|
D | raw.c | 125 struct inet_sock *inet = inet_sk(sk); in __raw_v4_lookup() local 127 if (net_eq(sock_net(sk), net) && inet->inet_num == num && in __raw_v4_lookup() 128 !(inet->inet_daddr && inet->inet_daddr != raddr) && in __raw_v4_lookup() 129 !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && in __raw_v4_lookup() 227 struct inet_sock *inet = inet_sk(sk); in raw_err() local 245 if (!inet->recverr && sk->sk_state != TCP_ESTABLISHED) in raw_err() 266 harderr = inet->pmtudisc != IP_PMTUDISC_DONT; in raw_err() 271 if (inet->recverr) { in raw_err() 275 if (inet->hdrincl) in raw_err() 280 if (inet->recverr || harderr) { in raw_err() [all …]
|
D | inet_timewait_sock.c | 104 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_hashdance() local 113 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, in inet_twsk_hashdance() 167 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_alloc() local 171 tw->tw_daddr = inet->inet_daddr; in inet_twsk_alloc() 172 tw->tw_rcv_saddr = inet->inet_rcv_saddr; in inet_twsk_alloc() 174 tw->tw_tos = inet->tos; in inet_twsk_alloc() 175 tw->tw_num = inet->inet_num; in inet_twsk_alloc() 178 tw->tw_sport = inet->inet_sport; in inet_twsk_alloc() 179 tw->tw_dport = inet->inet_dport; in inet_twsk_alloc() 185 tw->tw_transparent = inet->transparent; in inet_twsk_alloc()
|
D | udp.c | 359 struct inet_sock *inet; in compute_score() local 372 inet = inet_sk(sk); in compute_score() 373 if (inet->inet_daddr) { in compute_score() 374 if (inet->inet_daddr != saddr) in compute_score() 379 if (inet->inet_dport) { in compute_score() 380 if (inet->inet_dport != sport) in compute_score() 521 struct inet_sock *inet = inet_sk(sk); in __udp_is_mcast_sock() local 525 (inet->inet_daddr && inet->inet_daddr != rmt_addr) || in __udp_is_mcast_sock() 526 (inet->inet_dport != rmt_port && inet->inet_dport) || in __udp_is_mcast_sock() 527 (inet->inet_rcv_saddr && inet->inet_rcv_saddr != loc_addr) || in __udp_is_mcast_sock() [all …]
|
D | ip_output.c | 131 static inline int ip_select_ttl(struct inet_sock *inet, struct dst_entry *dst) in ip_select_ttl() argument 133 int ttl = inet->uc_ttl; in ip_select_ttl() 147 struct inet_sock *inet = inet_sk(sk); in ip_build_and_send_pkt() local 158 iph->tos = inet->tos; in ip_build_and_send_pkt() 159 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() [all …]
|
D | inet_connection_sock.c | 870 struct inet_sock *inet = inet_sk(sk); in inet_csk_listen_start() local 884 if (!sk->sk_prot->get_port(sk, inet->inet_num)) { in inet_csk_listen_start() 885 inet->inet_sport = htons(inet->inet_num); in inet_csk_listen_start() 1017 const struct inet_sock *inet = inet_sk(sk); in inet_csk_addr2sockaddr() local 1020 sin->sin_addr.s_addr = inet->inet_daddr; in inet_csk_addr2sockaddr() 1021 sin->sin_port = inet->inet_dport; in inet_csk_addr2sockaddr() 1055 const struct inet_sock *inet = inet_sk(sk); in inet_csk_rebuild_route() local 1057 __be32 daddr = inet->inet_daddr; in inet_csk_rebuild_route() 1062 inet_opt = rcu_dereference(inet->inet_opt); in inet_csk_rebuild_route() 1067 inet->inet_saddr, inet->inet_dport, in inet_csk_rebuild_route() [all …]
|
D | ping.c | 698 struct inet_sock *inet = inet_sk(sk); in ping_v4_sendmsg() local 709 pr_debug("ping_v4_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v4_sendmsg() 731 daddr = inet->inet_daddr; in ping_v4_sendmsg() 735 ipcm_init_sk(&ipc, inet); in ping_v4_sendmsg() 750 inet_opt = rcu_dereference(inet->inet_opt); in ping_v4_sendmsg() 769 tos = get_rttos(&ipc, inet); in ping_v4_sendmsg() 778 ipc.oif = inet->mc_index; in ping_v4_sendmsg() 780 saddr = inet->mc_addr; in ping_v4_sendmsg() 782 ipc.oif = inet->uc_index; in ping_v4_sendmsg() 816 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v4_sendmsg() [all …]
|
D | tcp_ipv4.c | 202 struct inet_sock *inet = inet_sk(sk); in tcp_v4_connect() local 219 inet_opt = rcu_dereference_protected(inet->inet_opt, in tcp_v4_connect() 227 orig_sport = inet->inet_sport; in tcp_v4_connect() 229 fl4 = &inet->cork.fl.u.ip4; in tcp_v4_connect() 230 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in tcp_v4_connect() 249 if (!inet->inet_saddr) in tcp_v4_connect() 250 inet->inet_saddr = fl4->saddr; in tcp_v4_connect() 251 sk_rcv_saddr_set(sk, inet->inet_saddr); in tcp_v4_connect() 253 if (tp->rx_opt.ts_recent_stamp && inet->inet_daddr != daddr) { in tcp_v4_connect() 261 inet->inet_dport = usin->sin_port; in tcp_v4_connect() [all …]
|
D | inet_hashtables.c | 400 struct inet_sock *inet = inet_sk(sk); in __inet_check_established() local 401 __be32 daddr = inet->inet_rcv_saddr; in __inet_check_established() 402 __be32 saddr = inet->inet_daddr; in __inet_check_established() 407 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet_check_established() 409 saddr, inet->inet_dport); in __inet_check_established() 436 inet->inet_num = lport; in __inet_check_established() 437 inet->inet_sport = htons(lport); in __inet_check_established() 463 const struct inet_sock *inet = inet_sk(sk); in inet_sk_port_offset() local 465 return secure_ipv4_port_ephemeral(inet->inet_rcv_saddr, in inet_sk_port_offset() 466 inet->inet_daddr, in inet_sk_port_offset() [all …]
|
/net/l2tp/ |
D | l2tp_ip.c | 32 struct inet_sock inet; member 54 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() 247 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_bind() local 274 inet->inet_rcv_saddr = inet->inet_saddr = addr->l2tp_addr.s_addr; in l2tp_ip_bind() 276 inet->inet_saddr = 0; /* Use device */ in l2tp_ip_bind() 350 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_getname() local 357 if (!inet->inet_dport) in l2tp_ip_getname() [all …]
|
D | l2tp_debugfs.c | 144 struct inet_sock *inet = inet_sk(tunnel->sock); in l2tp_dfs_seq_tunnel_show() local 155 &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/ |
D | af_inet6.c | 110 struct inet_sock *inet; in inet6_create() local 190 inet = inet_sk(sk); in inet6_create() 191 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet6_create() 194 inet->inet_num = protocol; in inet6_create() 196 inet->hdrincl = 1; in inet6_create() 217 inet->uc_ttl = -1; in inet6_create() 219 inet->mc_loop = 1; in inet6_create() 220 inet->mc_ttl = 1; in inet6_create() 221 inet->mc_index = 0; in inet6_create() 222 inet->mc_list = NULL; in inet6_create() [all …]
|
D | ping.c | 49 struct inet_sock *inet = inet_sk(sk); in ping_v6_sendmsg() local 62 pr_debug("ping_v6_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v6_sendmsg() 132 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg() 203 struct inet_sock *inet = inet_sk(v); in ping_v6_seq_show() local 204 __u16 srcp = ntohs(inet->inet_sport); in ping_v6_seq_show() 205 __u16 destp = ntohs(inet->inet_dport); in ping_v6_seq_show()
|
D | inet6_hashtables.c | 205 struct inet_sock *inet = inet_sk(sk); in __inet6_check_established() local 211 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet6_check_established() 213 inet->inet_dport); in __inet6_check_established() 240 inet->inet_num = lport; in __inet6_check_established() 241 inet->inet_sport = htons(lport); in __inet6_check_established() 267 const struct inet_sock *inet = inet_sk(sk); in inet6_sk_port_offset() local 271 inet->inet_dport); in inet6_sk_port_offset()
|
D | raw.c | 244 struct inet_sock *inet = inet_sk(sk); in rawv6_bind() local 310 inet->inet_rcv_saddr = inet->inet_saddr = v4addr; in rawv6_bind() 326 struct inet_sock *inet = inet_sk(sk); in rawv6_err() local 350 if (!inet->hdrincl) in rawv6_err() 418 struct inet_sock *inet = inet_sk(sk); in rawv6_rcv() local 435 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv() 442 inet->inet_num, 0)); in rawv6_rcv() 444 if (inet->hdrincl) { in rawv6_rcv() 772 struct inet_sock *inet = inet_sk(sk); in rawv6_sendmsg() local 800 hdrincl = inet->hdrincl; in rawv6_sendmsg() [all …]
|
D | datagram.c | 42 struct inet_sock *inet = inet_sk(sk); in ip6_datagram_flow_key_init() local 51 fl6->fl6_dport = inet->inet_dport; in ip6_datagram_flow_key_init() 52 fl6->fl6_sport = inet->inet_sport; in ip6_datagram_flow_key_init() 71 struct inet_sock *inet = inet_sk(sk); in ip6_datagram_dst_update() local 100 inet->inet_rcv_saddr = LOOPBACK4_IPV6; in ip6_datagram_dst_update() 137 struct inet_sock *inet = inet_sk(sk); in __ip6_datagram_connect() local 196 ipv6_addr_set_v4mapped(inet->inet_daddr, &sk->sk_v6_daddr); in __ip6_datagram_connect() 200 ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); in __ip6_datagram_connect() 204 ipv6_addr_set_v4mapped(inet->inet_rcv_saddr, in __ip6_datagram_connect() 236 old_dport = inet->inet_dport; in __ip6_datagram_connect() [all …]
|
D | udp.c | 107 struct inet_sock *inet; in compute_score() local 119 inet = inet_sk(sk); in compute_score() 121 if (inet->inet_dport) { in compute_score() 122 if (inet->inet_dport != sport) in compute_score() 271 struct inet_sock *inet = inet_sk(sk); in udpv6_recvmsg() local 370 if (inet->cmsg_flags) in udpv6_recvmsg() 710 struct inet_sock *inet = inet_sk(sk); in __udp_v6_is_mcast_sock() local 717 (inet->inet_dport && inet->inet_dport != rmt_port) || in __udp_v6_is_mcast_sock() 1218 struct inet_sock *inet = inet_sk(sk); in udpv6_sendmsg() local 1277 sin.sin_port = sin6 ? sin6->sin6_port : inet->inet_dport; in udpv6_sendmsg() [all …]
|
D | inet6_connection_sock.c | 82 struct inet_sock *inet = inet_sk(sk); in inet6_csk_route_socket() local 95 fl6->fl6_sport = inet->inet_sport; in inet6_csk_route_socket() 96 fl6->fl6_dport = inet->inet_dport; in inet6_csk_route_socket()
|
/net/dccp/ |
D | ipv4.c | 41 struct inet_sock *inet = inet_sk(sk); in dccp_v4_connect() local 60 inet_opt = rcu_dereference_protected(inet->inet_opt, in dccp_v4_connect() 68 orig_sport = inet->inet_sport; in dccp_v4_connect() 70 fl4 = &inet->cork.fl.u.ip4; in dccp_v4_connect() 71 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in dccp_v4_connect() 86 if (inet->inet_saddr == 0) in dccp_v4_connect() 87 inet->inet_saddr = fl4->saddr; in dccp_v4_connect() 88 sk_rcv_saddr_set(sk, inet->inet_saddr); in dccp_v4_connect() 89 inet->inet_dport = usin->sin_port; in dccp_v4_connect() 107 inet->inet_sport, inet->inet_dport, sk); 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);
|
/net/rds/ |
D | tcp_listen.c | 130 struct inet_sock *inet; in rds_tcp_accept_one() local 169 inet = inet_sk(new_sock->sk); in rds_tcp_accept_one() 175 ipv6_addr_set_v4mapped(inet->inet_saddr, &saddr); in rds_tcp_accept_one() 176 ipv6_addr_set_v4mapped(inet->inet_daddr, &daddr); in rds_tcp_accept_one() 182 my_addr, ntohs(inet->inet_sport), in rds_tcp_accept_one() 183 peer_addr, ntohs(inet->inet_dport)); in rds_tcp_accept_one()
|
D | tcp.c | 255 struct inet_sock *inet = inet_sk(tc->t_sock->sk); in rds_tcp_tc_info() local 260 tsinfo.local_addr = inet->inet_saddr; in rds_tcp_tc_info() 261 tsinfo.local_port = inet->inet_sport; in rds_tcp_tc_info() 262 tsinfo.peer_addr = inet->inet_daddr; in rds_tcp_tc_info() 263 tsinfo.peer_port = inet->inet_dport; in rds_tcp_tc_info() 302 struct inet_sock *inet = inet_sk(sk); in rds6_tcp_tc_info() local 305 tsinfo6.local_port = inet->inet_sport; in rds6_tcp_tc_info() 307 tsinfo6.peer_port = inet->inet_dport; in rds6_tcp_tc_info()
|
/net/netfilter/ |
D | nf_conntrack_proto.c | 241 const struct inet_sock *inet = inet_sk(sk); in getorigdst() local 248 tuple.src.u3.ip = inet->inet_rcv_saddr; in getorigdst() 249 tuple.src.u.tcp.port = inet->inet_sport; in getorigdst() 250 tuple.dst.u3.ip = inet->inet_daddr; in getorigdst() 251 tuple.dst.u.tcp.port = inet->inet_dport; in getorigdst() 309 const struct inet_sock *inet = inet_sk(sk); in ipv6_getorigdst() local 318 tuple.src.u.tcp.port = inet->inet_sport; in ipv6_getorigdst() 320 tuple.dst.u.tcp.port = inet->inet_dport; in ipv6_getorigdst()
|