/net/sctp/ |
D | stream_interleave.c | 187 struct sctp_stream_in *sin; in sctp_intl_retrieve_partial() local 192 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_partial() 201 cevent->mid != sin->mid) in sctp_intl_retrieve_partial() 209 if (cevent->fsn == sin->fsn) { in sctp_intl_retrieve_partial() 223 if (cevent->fsn == sin->fsn) { in sctp_intl_retrieve_partial() 247 sin->fsn = next_fsn; in sctp_intl_retrieve_partial() 250 sin->pd_mode = 0; in sctp_intl_retrieve_partial() 266 struct sctp_stream_in *sin; in sctp_intl_retrieve_reassembled() local 272 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_reassembled() 289 if (cevent->mid == sin->mid) { in sctp_intl_retrieve_reassembled() [all …]
|
D | protocol.c | 960 struct sockaddr_in *sin; in sctp_inet_msgname() local 962 sin = (struct sockaddr_in *)msgname; in sctp_inet_msgname() 964 sin->sin_family = AF_INET; in sctp_inet_msgname() 965 memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); in sctp_inet_msgname() 972 struct sockaddr_in *sin, *sinfrom; in sctp_inet_event_msgname() local 979 sin = (struct sockaddr_in *)msgname; in sctp_inet_event_msgname() 981 sin->sin_port = htons(asoc->peer.port); in sctp_inet_event_msgname() 982 sin->sin_addr.s_addr = sinfrom->sin_addr.s_addr; in sctp_inet_event_msgname() 991 struct sockaddr_in *sin = (struct sockaddr_in *)msgname; in sctp_inet_skb_msgname() local 994 sin->sin_port = sh->source; in sctp_inet_skb_msgname() [all …]
|
/net/rds/ |
D | af_rds.c | 119 struct sockaddr_in *sin; in rds_getname() local 128 sin = (struct sockaddr_in *)uaddr; in rds_getname() 129 memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); in rds_getname() 130 sin->sin_family = AF_INET; in rds_getname() 131 sin->sin_port = rs->rs_conn_port; in rds_getname() 132 sin->sin_addr.s_addr = rs->rs_conn_addr_v4; in rds_getname() 133 uaddr_len = sizeof(*sin); in rds_getname() 153 sin = (struct sockaddr_in *)uaddr; in rds_getname() 154 memset(sin, 0, sizeof(*sin)); in rds_getname() 155 sin->sin_family = AF_UNSPEC; in rds_getname() [all …]
|
D | tcp_connect.c | 94 struct sockaddr_in sin; in rds_tcp_conn_path_connect() local 138 sin.sin_family = AF_INET; in rds_tcp_conn_path_connect() 139 sin.sin_addr.s_addr = conn->c_laddr.s6_addr32[3]; in rds_tcp_conn_path_connect() 140 sin.sin_port = 0; in rds_tcp_conn_path_connect() 141 addr = (struct sockaddr *)&sin; in rds_tcp_conn_path_connect() 142 addrlen = sizeof(sin); in rds_tcp_conn_path_connect() 161 sin.sin_family = AF_INET; in rds_tcp_conn_path_connect() 162 sin.sin_addr.s_addr = conn->c_faddr.s6_addr32[3]; in rds_tcp_conn_path_connect() 163 sin.sin_port = htons(RDS_TCP_PORT); in rds_tcp_conn_path_connect() 164 addr = (struct sockaddr *)&sin; in rds_tcp_conn_path_connect() [all …]
|
D | bind.c | 179 struct sockaddr_in *sin = (struct sockaddr_in *)uaddr; in rds_bind() local 182 sin->sin_addr.s_addr == htonl(INADDR_ANY) || in rds_bind() 183 sin->sin_addr.s_addr == htonl(INADDR_BROADCAST) || in rds_bind() 184 ipv4_is_multicast(sin->sin_addr.s_addr)) in rds_bind() 186 ipv6_addr_set_v4mapped(sin->sin_addr.s_addr, &v6addr); in rds_bind() 188 port = sin->sin_port; in rds_bind()
|
D | tcp_listen.c | 268 struct sockaddr_in *sin; in rds_tcp_listen_init() local 297 sin = (struct sockaddr_in *)&ss; in rds_tcp_listen_init() 298 sin->sin_family = PF_INET; in rds_tcp_listen_init() 299 sin->sin_addr.s_addr = INADDR_ANY; in rds_tcp_listen_init() 300 sin->sin_port = (__force u16)htons(RDS_TCP_PORT); in rds_tcp_listen_init() 301 addr_len = sizeof(*sin); in rds_tcp_listen_init()
|
D | rdma_transport.c | 253 struct sockaddr_in sin; in rds_rdma_listen_init() local 255 sin.sin_family = PF_INET; in rds_rdma_listen_init() 256 sin.sin_addr.s_addr = htonl(INADDR_ANY); in rds_rdma_listen_init() 257 sin.sin_port = htons(RDS_PORT); in rds_rdma_listen_init() 259 (struct sockaddr *)&sin, in rds_rdma_listen_init()
|
D | ib.c | 414 struct sockaddr_in sin; in rds_ib_laddr_check() local 428 memset(&sin, 0, sizeof(sin)); in rds_ib_laddr_check() 429 sin.sin_family = AF_INET; in rds_ib_laddr_check() 430 sin.sin_addr.s_addr = addr->s6_addr32[3]; in rds_ib_laddr_check() 431 sa = (struct sockaddr *)&sin; in rds_ib_laddr_check()
|
D | recv.c | 641 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in rds_recvmsg() 725 sin->sin_family = AF_INET; in rds_recvmsg() 726 sin->sin_port = inc->i_hdr.h_sport; in rds_recvmsg() 727 sin->sin_addr.s_addr = in rds_recvmsg() 729 memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); in rds_recvmsg() 730 msg->msg_namelen = sizeof(*sin); in rds_recvmsg()
|
D | ib_cm.c | 1000 struct sockaddr_in *sin; in rds_ib_conn_path_connect() local 1002 sin = (struct sockaddr_in *)&src; in rds_ib_conn_path_connect() 1003 sin->sin_family = AF_INET; in rds_ib_conn_path_connect() 1004 sin->sin_addr.s_addr = conn->c_laddr.s6_addr32[3]; in rds_ib_conn_path_connect() 1005 sin->sin_port = 0; in rds_ib_conn_path_connect() 1007 sin = (struct sockaddr_in *)&dest; in rds_ib_conn_path_connect() 1008 sin->sin_family = AF_INET; in rds_ib_conn_path_connect() 1009 sin->sin_addr.s_addr = conn->c_faddr.s6_addr32[3]; in rds_ib_conn_path_connect() 1010 sin->sin_port = htons(RDS_PORT); in rds_ib_conn_path_connect()
|
/net/ipv6/ |
D | datagram.c | 179 struct sockaddr_in sin; in __ip6_datagram_connect() local 185 sin.sin_family = AF_INET; in __ip6_datagram_connect() 186 sin.sin_addr.s_addr = daddr->s6_addr32[3]; in __ip6_datagram_connect() 187 sin.sin_port = usin->sin6_port; in __ip6_datagram_connect() 190 (struct sockaddr *) &sin, in __ip6_datagram_connect() 191 sizeof(sin)); in __ip6_datagram_connect() 453 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin, msg->msg_name); in ipv6_recv_error() 480 if (sin && ipv6_datagram_support_addr(serr)) { in ipv6_recv_error() 482 sin->sin6_family = AF_INET6; in ipv6_recv_error() 483 sin->sin6_flowinfo = 0; in ipv6_recv_error() [all …]
|
D | af_inet6.c | 534 struct sockaddr_in6 *sin = (struct sockaddr_in6 *)uaddr; in inet6_getname() local 539 sin->sin6_family = AF_INET6; in inet6_getname() 540 sin->sin6_flowinfo = 0; in inet6_getname() 541 sin->sin6_scope_id = 0; in inet6_getname() 550 sin->sin6_port = inet->inet_dport; in inet6_getname() 551 sin->sin6_addr = sk->sk_v6_daddr; in inet6_getname() 553 sin->sin6_flowinfo = np->flow_label; in inet6_getname() 554 BPF_CGROUP_RUN_SA_PROG(sk, (struct sockaddr *)sin, in inet6_getname() 558 sin->sin6_addr = np->saddr; in inet6_getname() 560 sin->sin6_addr = sk->sk_v6_rcv_saddr; in inet6_getname() [all …]
|
/net/rxrpc/ |
D | peer_event.c | 64 srx->transport_len = sizeof(srx->transport.sin); in rxrpc_lookup_peer_icmp_rcu() 66 srx->transport.sin.sin_port = udp->dest; in rxrpc_lookup_peer_icmp_rcu() 67 memcpy(&srx->transport.sin.sin_addr, &ip->daddr, in rxrpc_lookup_peer_icmp_rcu() 73 srx->transport_len = sizeof(srx->transport.sin); in rxrpc_lookup_peer_icmp_rcu() 75 srx->transport.sin.sin_port = udp->dest; in rxrpc_lookup_peer_icmp_rcu() 76 memcpy(&srx->transport.sin.sin_addr, &ip->daddr, in rxrpc_lookup_peer_icmp_rcu() 130 srx->transport_len = sizeof(srx->transport.sin); in rxrpc_lookup_peer_icmp6_rcu() 132 srx->transport.sin.sin_port = udp->dest; in rxrpc_lookup_peer_icmp6_rcu() 133 memcpy(&srx->transport.sin.sin_addr, in rxrpc_lookup_peer_icmp6_rcu() 138 srx->transport.sin.sin_port = udp->dest; in rxrpc_lookup_peer_icmp6_rcu() [all …]
|
D | utils.c | 23 srx->transport_len = sizeof(srx->transport.sin); in rxrpc_extract_addr_from_skb() 24 srx->transport.sin.sin_family = AF_INET; in rxrpc_extract_addr_from_skb() 25 srx->transport.sin.sin_port = udp_hdr(skb)->source; in rxrpc_extract_addr_from_skb() 26 srx->transport.sin.sin_addr.s_addr = ip_hdr(skb)->saddr; in rxrpc_extract_addr_from_skb()
|
D | peer_object.c | 44 hash_key += (u16 __force)srx->transport.sin.sin_port; in rxrpc_peer_hash_key() 45 size = sizeof(srx->transport.sin.sin_addr); in rxrpc_peer_hash_key() 46 p = (u16 *)&srx->transport.sin.sin_addr; in rxrpc_peer_hash_key() 50 hash_key += (u16 __force)srx->transport.sin.sin_port; in rxrpc_peer_hash_key() 93 return ((u16 __force)peer->srx.transport.sin.sin_port - in rxrpc_peer_cmp_key() 94 (u16 __force)srx->transport.sin.sin_port) ?: in rxrpc_peer_cmp_key() 95 memcmp(&peer->srx.transport.sin.sin_addr, in rxrpc_peer_cmp_key() 96 &srx->transport.sin.sin_addr, in rxrpc_peer_cmp_key() 171 peer->srx.transport.sin.sin_addr.s_addr, 0, in rxrpc_assess_MTU_size()
|
D | local_object.c | 51 return ((u16 __force)local->srx.transport.sin.sin_port - in rxrpc_local_cmp_key() 52 (u16 __force)srx->transport.sin.sin_port) ?: in rxrpc_local_cmp_key() 53 memcmp(&local->srx.transport.sin.sin_addr, in rxrpc_local_cmp_key() 54 &srx->transport.sin.sin_addr, in rxrpc_local_cmp_key() 122 udp_conf.local_ip = srx->transport.sin.sin_addr; in rxrpc_open_socket() 123 udp_conf.local_udp_port = srx->transport.sin.sin_port; in rxrpc_open_socket()
|
D | conn_object.c | 129 if (peer->srx.transport.sin.sin_port != in rxrpc_find_connection_rcu() 130 srx.transport.sin.sin_port || in rxrpc_find_connection_rcu() 131 peer->srx.transport.sin.sin_addr.s_addr != in rxrpc_find_connection_rcu() 132 srx.transport.sin.sin_addr.s_addr) in rxrpc_find_connection_rcu()
|
/net/netfilter/ |
D | nf_conntrack_proto.c | 271 struct sockaddr_in sin; in getorigdst() local 274 sin.sin_family = AF_INET; in getorigdst() 275 sin.sin_port = ct->tuplehash[IP_CT_DIR_ORIGINAL] in getorigdst() 277 sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] in getorigdst() 279 memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); in getorigdst() 282 &sin.sin_addr.s_addr, ntohs(sin.sin_port)); in getorigdst() 284 if (copy_to_user(user, &sin, sizeof(sin)) != 0) in getorigdst()
|
/net/ipv4/ |
D | ip_sockglue.c | 152 struct sockaddr_in sin; in ip_cmsg_recv_dstaddr() local 163 sin.sin_family = AF_INET; in ip_cmsg_recv_dstaddr() 164 sin.sin_addr.s_addr = ip_hdr(skb)->daddr; in ip_cmsg_recv_dstaddr() 165 sin.sin_port = ports[1]; in ip_cmsg_recv_dstaddr() 166 memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); in ip_cmsg_recv_dstaddr() 168 put_cmsg(msg, SOL_IP, IP_ORIGDSTADDR, sizeof(sin), &sin); in ip_cmsg_recv_dstaddr() 527 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in ip_recv_error() 554 if (sin && ipv4_datagram_support_addr(serr)) { in ip_recv_error() 555 sin->sin_family = AF_INET; in ip_recv_error() 556 sin->sin_addr.s_addr = *(__be32 *)(skb_network_header(skb) + in ip_recv_error() [all …]
|
D | devinet.c | 1011 struct sockaddr_in *sin = (struct sockaddr_in *)&ifr->ifr_addr; in devinet_ioctl() local 1023 memcpy(&sin_orig, sin, sizeof(*sin)); in devinet_ioctl() 1041 memset(sin, 0, sizeof(*sin)); in devinet_ioctl() 1042 sin->sin_family = AF_INET; in devinet_ioctl() 1058 if (sin->sin_family != AF_INET) in devinet_ioctl() 1114 sin->sin_addr.s_addr = ifa->ifa_local; in devinet_ioctl() 1119 sin->sin_addr.s_addr = ifa->ifa_broadcast; in devinet_ioctl() 1124 sin->sin_addr.s_addr = ifa->ifa_address; in devinet_ioctl() 1129 sin->sin_addr.s_addr = ifa->ifa_mask; in devinet_ioctl() 1147 if (inet_abc_len(sin->sin_addr.s_addr) < 0) in devinet_ioctl() [all …]
|
D | raw.c | 763 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in raw_recvmsg() 791 if (sin) { in raw_recvmsg() 792 sin->sin_family = AF_INET; in raw_recvmsg() 793 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; in raw_recvmsg() 794 sin->sin_port = 0; in raw_recvmsg() 795 memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); in raw_recvmsg() 796 *addr_len = sizeof(*sin); in raw_recvmsg()
|
D | ping.c | 898 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in ping_recvmsg() 900 if (sin) { in ping_recvmsg() 901 sin->sin_family = AF_INET; in ping_recvmsg() 902 sin->sin_port = 0 /* skb->h.uh->source */; in ping_recvmsg() 903 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; in ping_recvmsg() 904 memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); in ping_recvmsg() 905 *addr_len = sizeof(*sin); in ping_recvmsg()
|
/net/sunrpc/ |
D | addr.c | 115 const struct sockaddr_in *sin = (struct sockaddr_in *)sap; in rpc_ntop4() local 117 return snprintf(buf, buflen, "%pI4", &sin->sin_addr); in rpc_ntop4() 145 struct sockaddr_in *sin = (struct sockaddr_in *)sap; in rpc_pton4() local 146 u8 *addr = (u8 *)&sin->sin_addr.s_addr; in rpc_pton4() 156 sin->sin_family = AF_INET; in rpc_pton4()
|
D | svcsock.c | 735 struct sockaddr *sin = (struct sockaddr *) &addr; in svc_tcp_accept() local 759 err = kernel_getpeername(newsock, sin); in svc_tcp_accept() 780 svc_xprt_set_remote(&newsvsk->sk_xprt, sin, slen); in svc_tcp_accept() 781 err = kernel_getsockname(newsock, sin); in svc_tcp_accept() 785 svc_xprt_set_local(&newsvsk->sk_xprt, sin, slen); in svc_tcp_accept() 1372 struct sockaddr *sin = (struct sockaddr *)&addr; in svc_addsock() local 1396 salen = kernel_getsockname(svsk->sk_sock, sin); in svc_addsock() 1398 svc_xprt_set_local(&svsk->sk_xprt, sin, salen); in svc_addsock() 1414 struct sockaddr *sin, int len, in svc_create_socket() argument 1433 switch (sin->sa_family) { in svc_create_socket() [all …]
|
/net/l2tp/ |
D | l2tp_ip.c | 523 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in l2tp_ip_recvmsg() 546 if (sin) { in l2tp_ip_recvmsg() 547 sin->sin_family = AF_INET; in l2tp_ip_recvmsg() 548 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; in l2tp_ip_recvmsg() 549 sin->sin_port = 0; in l2tp_ip_recvmsg() 550 memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); in l2tp_ip_recvmsg() 551 *addr_len = sizeof(*sin); in l2tp_ip_recvmsg()
|