/net/ipv4/ |
D | datagram.c | 25 struct inet_sock *inet = inet_sk(sk); in __ip4_datagram_connect() local 43 saddr = inet->inet_saddr; in __ip4_datagram_connect() 46 oif = inet->mc_index; in __ip4_datagram_connect() 48 saddr = inet->mc_addr; in __ip4_datagram_connect() 50 fl4 = &inet->cork.fl.u.ip4; in __ip4_datagram_connect() 54 inet->inet_sport, usin->sin_port, sk); in __ip4_datagram_connect() 67 if (!inet->inet_saddr) in __ip4_datagram_connect() 68 inet->inet_saddr = fl4->saddr; /* Update source address */ in __ip4_datagram_connect() 69 if (!inet->inet_rcv_saddr) { in __ip4_datagram_connect() 70 inet->inet_rcv_saddr = fl4->saddr; in __ip4_datagram_connect() [all …]
|
D | ip_sockglue.c | 149 struct inet_sock *inet = inet_sk(skb->sk); in ip_cmsg_recv() local 150 unsigned int flags = inet->cmsg_flags; in ip_cmsg_recv() 367 struct inet_sock *inet = inet_sk(sk); in ip_local_error() local 372 if (!inet->recverr) in ip_local_error() 476 struct inet_sock *inet = inet_sk(sk); in do_ip_setsockopt() local 532 old = rcu_dereference_protected(inet->inet_opt, in do_ip_setsockopt() 534 if (inet->is_icsk) { in do_ip_setsockopt() 540 inet->inet_daddr != LOOPBACK4_IPV6)) { in do_ip_setsockopt() 551 rcu_assign_pointer(inet->inet_opt, opt); in do_ip_setsockopt() 558 inet->cmsg_flags |= IP_CMSG_PKTINFO; in do_ip_setsockopt() [all …]
|
D | af_inet.c | 147 struct inet_sock *inet = inet_sk(sk); in inet_sock_destruct() local 169 kfree(rcu_dereference_protected(inet->inet_opt, 1)); in inet_sock_destruct() 188 struct inet_sock *inet; in inet_autobind() local 191 inet = inet_sk(sk); in inet_autobind() 192 if (!inet->inet_num) { in inet_autobind() 197 inet->inet_sport = htons(inet->inet_num); in inet_autobind() 270 struct inet_sock *inet; in inet_create() local 349 inet = inet_sk(sk); in inet_create() 350 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet_create() 352 inet->nodefrag = 0; in inet_create() [all …]
|
D | raw.c | 116 struct inet_sock *inet = inet_sk(sk); in __raw_v4_lookup() local 118 if (net_eq(sock_net(sk), net) && inet->inet_num == num && in __raw_v4_lookup() 119 !(inet->inet_daddr && inet->inet_daddr != raddr) && in __raw_v4_lookup() 120 !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && in __raw_v4_lookup() 216 struct inet_sock *inet = inet_sk(sk); in raw_err() local 234 if (!inet->recverr && sk->sk_state != TCP_ESTABLISHED) in raw_err() 255 harderr = inet->pmtudisc != IP_PMTUDISC_DONT; in raw_err() 260 if (inet->recverr) { in raw_err() 264 if (inet->hdrincl) in raw_err() 269 if (inet->recverr || harderr) { in raw_err() [all …]
|
D | inet_hashtables.c | 42 const struct inet_sock *inet = inet_sk(sk); in inet_sk_ehashfn() local 43 const __be32 laddr = inet->inet_rcv_saddr; in inet_sk_ehashfn() 44 const __u16 lport = inet->inet_num; in inet_sk_ehashfn() 45 const __be32 faddr = inet->inet_daddr; in inet_sk_ehashfn() 46 const __be16 fport = inet->inet_dport; in inet_sk_ehashfn() 174 struct inet_sock *inet = inet_sk(sk); in compute_score() local 176 if (net_eq(sock_net(sk), net) && inet->inet_num == hnum && in compute_score() 178 __be32 rcv_saddr = inet->inet_rcv_saddr; in compute_score() 326 struct inet_sock *inet = inet_sk(sk); in __inet_check_established() local 327 __be32 daddr = inet->inet_rcv_saddr; in __inet_check_established() [all …]
|
D | tcp_probe.c | 96 #define tcp_probe_copy_fl_to_si4(inet, si4, mem) \ argument 99 si4.sin_port = inet->inet_##mem##port; \ 100 si4.sin_addr.s_addr = inet->inet_##mem##addr; \ 111 const struct inet_sock *inet = inet_sk(sk); in jtcp_rcv_established() local 115 ntohs(inet->inet_dport) == port || in jtcp_rcv_established() 116 ntohs(inet->inet_sport) == port || in jtcp_rcv_established() 128 tcp_probe_copy_fl_to_si4(inet, p->src.v4, s); in jtcp_rcv_established() 129 tcp_probe_copy_fl_to_si4(inet, p->dst.v4, d); in jtcp_rcv_established() 136 p->src.v6.sin6_port = inet->inet_sport; in jtcp_rcv_established() 140 p->dst.v6.sin6_port = inet->inet_dport; in jtcp_rcv_established()
|
D | udp.c | 348 struct inet_sock *inet = inet_sk(sk); in compute_score() local 351 if (inet->inet_rcv_saddr) { in compute_score() 352 if (inet->inet_rcv_saddr != daddr) in compute_score() 356 if (inet->inet_daddr) { in compute_score() 357 if (inet->inet_daddr != saddr) in compute_score() 361 if (inet->inet_dport) { in compute_score() 362 if (inet->inet_dport != sport) in compute_score() 385 struct inet_sock *inet = inet_sk(sk); in compute_score2() local 387 if (inet->inet_rcv_saddr != daddr) in compute_score2() 389 if (inet->inet_num != hnum) in compute_score2() [all …]
|
D | ip_output.c | 116 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() 365 struct inet_sock *inet = inet_sk(sk); in ip_queue_xmit() local 376 inet_opt = rcu_dereference(inet->inet_opt); in ip_queue_xmit() 388 daddr = inet->inet_daddr; in ip_queue_xmit() 397 daddr, inet->inet_saddr, in ip_queue_xmit() 398 inet->inet_dport, in ip_queue_xmit() [all …]
|
D | inet_timewait_sock.c | 133 const struct inet_sock *inet = inet_sk(sk); in __inet_twsk_hashdance() local 142 bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, in __inet_twsk_hashdance() 178 const struct inet_sock *inet = inet_sk(sk); in inet_twsk_alloc() local 183 tw->tw_daddr = inet->inet_daddr; in inet_twsk_alloc() 184 tw->tw_rcv_saddr = inet->inet_rcv_saddr; in inet_twsk_alloc() 186 tw->tw_tos = inet->tos; in inet_twsk_alloc() 187 tw->tw_num = inet->inet_num; in inet_twsk_alloc() 190 tw->tw_sport = inet->inet_sport; in inet_twsk_alloc() 191 tw->tw_dport = inet->inet_dport; in inet_twsk_alloc() 196 tw->tw_transparent = inet->transparent; in inet_twsk_alloc()
|
D | inet_connection_sock.c | 748 struct inet_sock *inet = inet_sk(sk); in inet_csk_listen_start() local 765 if (!sk->sk_prot->get_port(sk, inet->inet_num)) { in inet_csk_listen_start() 766 inet->inet_sport = htons(inet->inet_num); in inet_csk_listen_start() 862 const struct inet_sock *inet = inet_sk(sk); in inet_csk_addr2sockaddr() local 865 sin->sin_addr.s_addr = inet->inet_daddr; in inet_csk_addr2sockaddr() 866 sin->sin_port = inet->inet_dport; in inet_csk_addr2sockaddr() 900 const struct inet_sock *inet = inet_sk(sk); in inet_csk_rebuild_route() local 902 __be32 daddr = inet->inet_daddr; in inet_csk_rebuild_route() 907 inet_opt = rcu_dereference(inet->inet_opt); in inet_csk_rebuild_route() 912 inet->inet_saddr, inet->inet_dport, in inet_csk_rebuild_route() [all …]
|
D | tcp_ipv4.c | 144 struct inet_sock *inet = inet_sk(sk); in tcp_v4_connect() local 160 inet_opt = rcu_dereference_protected(inet->inet_opt, in tcp_v4_connect() 168 orig_sport = inet->inet_sport; in tcp_v4_connect() 170 fl4 = &inet->cork.fl.u.ip4; in tcp_v4_connect() 171 rt = ip_route_connect(fl4, nexthop, inet->inet_saddr, in tcp_v4_connect() 190 if (!inet->inet_saddr) in tcp_v4_connect() 191 inet->inet_saddr = fl4->saddr; in tcp_v4_connect() 192 inet->inet_rcv_saddr = inet->inet_saddr; in tcp_v4_connect() 194 if (tp->rx_opt.ts_recent_stamp && inet->inet_daddr != daddr) { in tcp_v4_connect() 206 inet->inet_dport = usin->sin_port; in tcp_v4_connect() [all …]
|
D | ping.c | 708 struct inet_sock *inet = inet_sk(sk); in ping_v4_sendmsg() local 719 pr_debug("ping_v4_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v4_sendmsg() 741 daddr = inet->inet_daddr; in ping_v4_sendmsg() 745 ipc.addr = inet->inet_saddr; in ping_v4_sendmsg() 765 inet_opt = rcu_dereference(inet->inet_opt); in ping_v4_sendmsg() 782 tos = get_rttos(&ipc, inet); in ping_v4_sendmsg() 791 ipc.oif = inet->mc_index; in ping_v4_sendmsg() 793 saddr = inet->mc_addr; in ping_v4_sendmsg() 795 ipc.oif = inet->uc_index; in ping_v4_sendmsg() 829 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v4_sendmsg() [all …]
|
D | inet_diag.c | 96 const struct inet_sock *inet = inet_sk(sk); in inet_sk_diag_fill() local 123 r->id.idiag_sport = inet->inet_sport; in inet_sk_diag_fill() 124 r->id.idiag_dport = inet->inet_dport; in inet_sk_diag_fill() 129 r->id.idiag_src[0] = inet->inet_rcv_saddr; in inet_sk_diag_fill() 130 r->id.idiag_dst[0] = inet->inet_daddr; in inet_sk_diag_fill() 139 if (nla_put_u8(skb, INET_DIAG_TOS, inet->tos) < 0) in inet_sk_diag_fill() 550 struct inet_sock *inet = inet_sk(sk); in inet_diag_bc_sk() local 564 entry.saddr = &inet->inet_rcv_saddr; in inet_diag_bc_sk() 565 entry.daddr = &inet->inet_daddr; in inet_diag_bc_sk() 567 entry.sport = inet->inet_num; in inet_diag_bc_sk() [all …]
|
D | tcp_timer.c | 391 struct inet_sock *inet = inet_sk(sk); in tcp_retransmit_timer() local 394 &inet->inet_daddr, in tcp_retransmit_timer() 395 ntohs(inet->inet_dport), inet->inet_num, in tcp_retransmit_timer() 402 ntohs(inet->inet_dport), inet->inet_num, in tcp_retransmit_timer()
|
/net/ipv6/ |
D | af_inet6.c | 117 struct inet_sock *inet; in inet6_create() local 199 inet = inet_sk(sk); in inet6_create() 200 inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) != 0; in inet6_create() 203 inet->inet_num = protocol; in inet6_create() 205 inet->hdrincl = 1; in inet6_create() 224 inet->uc_ttl = -1; in inet6_create() 226 inet->mc_loop = 1; in inet6_create() 227 inet->mc_ttl = 1; in inet6_create() 228 inet->mc_index = 0; in inet6_create() 229 inet->mc_list = NULL; in inet6_create() [all …]
|
D | inet6_hashtables.c | 49 const struct inet_sock *inet = inet_sk(sk); in inet6_sk_ehashfn() local 52 const __u16 lport = inet->inet_num; in inet6_sk_ehashfn() 53 const __be16 fport = inet->inet_dport; in inet6_sk_ehashfn() 247 struct inet_sock *inet = inet_sk(sk); in __inet6_check_established() local 251 const __portpair ports = INET_COMBINED_PORTS(inet->inet_dport, lport); in __inet6_check_established() 254 inet->inet_dport); in __inet6_check_established() 281 inet->inet_num = lport; in __inet6_check_established() 282 inet->inet_sport = htons(lport); in __inet6_check_established() 312 const struct inet_sock *inet = inet_sk(sk); in inet6_sk_port_offset() local 316 inet->inet_dport); in inet6_sk_port_offset()
|
D | ping.c | 83 struct inet_sock *inet = inet_sk(sk); in ping_v6_sendmsg() local 96 pr_debug("ping_v6_sendmsg(sk=%p,sk->num=%u)\n", inet, inet->inet_num); in ping_v6_sendmsg() 162 pfh.icmph.un.echo.id = inet->inet_sport; in ping_v6_sendmsg() 205 struct inet_sock *inet = inet_sk(v); in ping_v6_seq_show() local 206 __u16 srcp = ntohs(inet->inet_sport); in ping_v6_seq_show() 207 __u16 destp = ntohs(inet->inet_dport); in ping_v6_seq_show()
|
D | udp.c | 155 struct inet_sock *inet = inet_sk(sk); in compute_score() local 158 if (inet->inet_dport) { in compute_score() 159 if (inet->inet_dport != sport) in compute_score() 192 struct inet_sock *inet = inet_sk(sk); in compute_score2() local 197 if (inet->inet_dport) { in compute_score2() 198 if (inet->inet_dport != sport) in compute_score2() 385 struct inet_sock *inet = inet_sk(sk); in udpv6_recvmsg() local 486 if (inet->cmsg_flags) in udpv6_recvmsg() 714 struct inet_sock *inet = inet_sk(sk); in __udp_v6_is_mcast_sock() local 721 (inet->inet_dport && inet->inet_dport != rmt_port) || in __udp_v6_is_mcast_sock() [all …]
|
D | raw.c | 244 struct inet_sock *inet = inet_sk(sk); in rawv6_bind() local 307 inet->inet_rcv_saddr = inet->inet_saddr = v4addr; in rawv6_bind() 323 struct inet_sock *inet = inet_sk(sk); in rawv6_err() local 347 if (!inet->hdrincl) in rawv6_err() 415 struct inet_sock *inet = inet_sk(sk); in rawv6_rcv() local 432 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv() 439 inet->inet_num, 0)); in rawv6_rcv() 441 if (inet->hdrincl) { in rawv6_rcv() 744 struct inet_sock *inet = inet_sk(sk); in rawv6_sendmsg() local 787 proto = inet->inet_num; in rawv6_sendmsg() [all …]
|
/net/dccp/ |
D | probe.c | 78 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()
|
D | ipv4.c | 45 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/ |
D | l2tp_ip.c | 36 struct inet_sock inet; member 56 struct inet_sock *inet = inet_sk(sk); in __l2tp_ip_bind_lookup() local 64 !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && in __l2tp_ip_bind_lookup() 249 struct inet_sock *inet = inet_sk(sk); in l2tp_ip_bind() local 282 inet->inet_rcv_saddr = inet->inet_saddr = addr->l2tp_addr.s_addr; in l2tp_ip_bind() 284 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() 360 lsa->l2tp_addr.s_addr = inet->inet_daddr; in l2tp_ip_getname() 362 __be32 addr = inet->inet_rcv_saddr; in l2tp_ip_getname() [all …]
|
D | l2tp_debugfs.c | 126 struct inet_sock *inet = inet_sk(tunnel->sock); in l2tp_dfs_seq_tunnel_show() local 137 &inet->inet_saddr, &inet->inet_daddr); in l2tp_dfs_seq_tunnel_show() 140 ntohs(inet->inet_sport), ntohs(inet->inet_dport)); in l2tp_dfs_seq_tunnel_show()
|
/net/netfilter/ |
D | nf_tables_inet.c | 43 net->nft.inet = kmalloc(sizeof(struct nft_af_info), GFP_KERNEL); in nf_tables_inet_init_net() 44 if (net->nft.inet == NULL) in nf_tables_inet_init_net() 46 memcpy(net->nft.inet, &nft_af_inet, sizeof(nft_af_inet)); in nf_tables_inet_init_net() 48 if (nft_register_afinfo(net, net->nft.inet) < 0) in nf_tables_inet_init_net() 54 kfree(net->nft.inet); in nf_tables_inet_init_net() 60 nft_unregister_afinfo(net->nft.inet); in nf_tables_inet_exit_net() 61 kfree(net->nft.inet); in nf_tables_inet_exit_net()
|
/net/rds/ |
D | tcp_listen.c | 53 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()
|