Home
last modified time | relevance | path

Searched refs:sin (Results 1 – 25 of 110) sorted by relevance

12345

/linux-6.6.21/net/rds/
Daf_rds.c119 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 …]
Dtcp_connect.c94 struct sockaddr_in sin; in rds_tcp_conn_path_connect() local
141 sin.sin_family = AF_INET; in rds_tcp_conn_path_connect()
142 sin.sin_addr.s_addr = conn->c_laddr.s6_addr32[3]; in rds_tcp_conn_path_connect()
143 sin.sin_port = 0; in rds_tcp_conn_path_connect()
144 addr = (struct sockaddr *)&sin; in rds_tcp_conn_path_connect()
145 addrlen = sizeof(sin); in rds_tcp_conn_path_connect()
164 sin.sin_family = AF_INET; in rds_tcp_conn_path_connect()
165 sin.sin_addr.s_addr = conn->c_faddr.s6_addr32[3]; in rds_tcp_conn_path_connect()
166 sin.sin_port = htons(RDS_TCP_PORT); in rds_tcp_conn_path_connect()
167 addr = (struct sockaddr *)&sin; in rds_tcp_conn_path_connect()
[all …]
Dbind.c179 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()
Dtcp_listen.c273 struct sockaddr_in *sin; in rds_tcp_listen_init() local
302 sin = (struct sockaddr_in *)&ss; in rds_tcp_listen_init()
303 sin->sin_family = PF_INET; in rds_tcp_listen_init()
304 sin->sin_addr.s_addr = INADDR_ANY; in rds_tcp_listen_init()
305 sin->sin_port = (__force u16)htons(RDS_TCP_PORT); in rds_tcp_listen_init()
306 addr_len = sizeof(*sin); in rds_tcp_listen_init()
Drdma_transport.c253 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()
/linux-6.6.21/net/sctp/
Dstream_interleave.c187 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 …]
/linux-6.6.21/net/ipv6/
Ddatagram.c185 struct sockaddr_in sin; in __ip6_datagram_connect() local
191 sin.sin_family = AF_INET; in __ip6_datagram_connect()
192 sin.sin_addr.s_addr = daddr->s6_addr32[3]; in __ip6_datagram_connect()
193 sin.sin_port = usin->sin6_port; in __ip6_datagram_connect()
196 (struct sockaddr *) &sin, in __ip6_datagram_connect()
197 sizeof(sin)); in __ip6_datagram_connect()
460 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin, msg->msg_name); in ipv6_recv_error()
487 if (sin && ipv6_datagram_support_addr(serr)) { in ipv6_recv_error()
489 sin->sin6_family = AF_INET6; in ipv6_recv_error()
490 sin->sin6_flowinfo = 0; in ipv6_recv_error()
[all …]
Daf_inet6.c524 struct sockaddr_in6 *sin = (struct sockaddr_in6 *)uaddr; in inet6_getname() local
525 int sin_addr_len = sizeof(*sin); in inet6_getname()
530 sin->sin6_family = AF_INET6; in inet6_getname()
531 sin->sin6_flowinfo = 0; in inet6_getname()
532 sin->sin6_scope_id = 0; in inet6_getname()
541 sin->sin6_port = inet->inet_dport; in inet6_getname()
542 sin->sin6_addr = sk->sk_v6_daddr; in inet6_getname()
544 sin->sin6_flowinfo = np->flow_label; in inet6_getname()
545 BPF_CGROUP_RUN_SA_PROG(sk, (struct sockaddr *)sin, &sin_addr_len, in inet6_getname()
549 sin->sin6_addr = np->saddr; in inet6_getname()
[all …]
/linux-6.6.21/arch/um/drivers/
Dumcast_user.c24 struct sockaddr_in *sin; in new_addr() local
26 sin = uml_kmalloc(sizeof(struct sockaddr_in), UM_GFP_KERNEL); in new_addr()
27 if (sin == NULL) { in new_addr()
32 sin->sin_family = AF_INET; in new_addr()
34 sin->sin_addr.s_addr = in_aton(addr); in new_addr()
36 sin->sin_addr.s_addr = INADDR_ANY; in new_addr()
37 sin->sin_port = htons(port); in new_addr()
38 return sin; in new_addr()
/linux-6.6.21/drivers/net/vxlan/
Dvxlan_private.h85 return a->sin.sin_addr.s_addr == b->sin.sin_addr.s_addr; in vxlan_addr_equal()
96 ip->sin.sin_addr.s_addr = nla_get_in_addr(nla); in vxlan_nla_get_addr()
110 return nla_put_in_addr(skb, attr, ip->sin.sin_addr.s_addr); in vxlan_nla_put_addr()
118 return ipv4_is_multicast(ip->sin.sin_addr.s_addr); in vxlan_addr_is_multicast()
126 return a->sin.sin_addr.s_addr == b->sin.sin_addr.s_addr; in vxlan_addr_equal()
135 ip->sin.sin_addr.s_addr = nla_get_in_addr(nla); in vxlan_nla_get_addr()
146 return nla_put_in_addr(skb, attr, ip->sin.sin_addr.s_addr); in vxlan_nla_put_addr()
151 return ipv4_is_multicast(ip->sin.sin_addr.s_addr); in vxlan_addr_is_multicast()
/linux-6.6.21/net/rxrpc/
Dutils.c23 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()
Dpeer_event.c46 srx->transport_len = sizeof(srx->transport.sin); in rxrpc_lookup_peer_local_rcu()
48 srx->transport.sin.sin_port = serr->port; in rxrpc_lookup_peer_local_rcu()
51 memcpy(&srx->transport.sin.sin_addr, in rxrpc_lookup_peer_local_rcu()
56 memcpy(&srx->transport.sin.sin_addr, in rxrpc_lookup_peer_local_rcu()
61 memcpy(&srx->transport.sin.sin_addr, &ip_hdr(skb)->saddr, in rxrpc_lookup_peer_local_rcu()
77 srx->transport_len = sizeof(srx->transport.sin); in rxrpc_lookup_peer_local_rcu()
79 srx->transport.sin.sin_port = serr->port; in rxrpc_lookup_peer_local_rcu()
80 memcpy(&srx->transport.sin.sin_addr, in rxrpc_lookup_peer_local_rcu()
Dpeer_object.c44 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()
169 peer->srx.transport.sin.sin_addr.s_addr, 0, in rxrpc_assess_MTU_size()
Dlocal_object.c75 return ((u16 __force)local->srx.transport.sin.sin_port - in rxrpc_local_cmp_key()
76 (u16 __force)srx->transport.sin.sin_port) ?: in rxrpc_local_cmp_key()
77 memcmp(&local->srx.transport.sin.sin_addr, in rxrpc_local_cmp_key()
78 &srx->transport.sin.sin_addr, in rxrpc_local_cmp_key()
177 udp_conf.local_ip = srx->transport.sin.sin_addr; in rxrpc_open_socket()
178 udp_conf.local_udp_port = srx->transport.sin.sin_port; in rxrpc_open_socket()
/linux-6.6.21/tools/testing/selftests/bpf/
Dnetwork_helpers.c356 struct sockaddr_in *sin = (void *)addr; in make_sockaddr() local
358 memset(addr, 0, sizeof(*sin)); in make_sockaddr()
359 sin->sin_family = AF_INET; in make_sockaddr()
360 sin->sin_port = htons(port); in make_sockaddr()
362 inet_pton(AF_INET, addr_str, &sin->sin_addr) != 1) { in make_sockaddr()
367 *len = sizeof(*sin); in make_sockaddr()
455 struct sockaddr_in *sin = (struct sockaddr_in *)&addr; in get_socket_local_port() local
457 return sin->sin_port; in get_socket_local_port()
459 struct sockaddr_in6 *sin = (struct sockaddr_in6 *)&addr; in get_socket_local_port() local
461 return sin->sin6_port; in get_socket_local_port()
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/
Dbind_perm.c26 struct sockaddr_in *sin; in try_bind() local
34 sin = (struct sockaddr_in *)&addr; in try_bind()
35 sin->sin_family = family; in try_bind()
36 sin->sin_port = htons(port); in try_bind()
/linux-6.6.21/include/linux/sunrpc/
Dsvc_xprt.h148 int svc_port_is_privileged(struct sockaddr *sin);
181 const struct sockaddr_in *sin = (const struct sockaddr_in *)sa; in svc_addr_port() local
186 return ntohs(sin->sin_port); in svc_addr_port()
218 const struct sockaddr_in *sin = (const struct sockaddr_in *)addr; in __svc_print_addr() local
223 snprintf(buf, len, "%pI4, port=%u", &sin->sin_addr, in __svc_print_addr()
224 ntohs(sin->sin_port)); in __svc_print_addr()
/linux-6.6.21/tools/perf/trace/beauty/
Dsockaddr.c15 struct sockaddr_in *sin = (struct sockaddr_in *)sa; in af_inet__scnprintf() local
17 return scnprintf(bf, size, ", port: %d, addr: %s", ntohs(sin->sin_port), in af_inet__scnprintf()
18 inet_ntop(sin->sin_family, &sin->sin_addr, tmp, sizeof(tmp))); in af_inet__scnprintf()
/linux-6.6.21/net/sunrpc/
Daddr.c115 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()
/linux-6.6.21/fs/nfsd/
Dflexfilelayout.c104 struct sockaddr_in *sin; in nfsd4_ff_proc_getdeviceinfo() local
106 sin = (struct sockaddr_in *)&rqstp->rq_daddr; in nfsd4_ff_proc_getdeviceinfo()
107 port = ntohs(sin->sin_port); in nfsd4_ff_proc_getdeviceinfo()
/linux-6.6.21/net/l2tp/
Dl2tp_ip.c525 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in l2tp_ip_recvmsg()
548 if (sin) { in l2tp_ip_recvmsg()
549 sin->sin_family = AF_INET; in l2tp_ip_recvmsg()
550 sin->sin_addr.s_addr = ip_hdr(skb)->saddr; in l2tp_ip_recvmsg()
551 sin->sin_port = 0; in l2tp_ip_recvmsg()
552 memset(&sin->sin_zero, 0, sizeof(sin->sin_zero)); in l2tp_ip_recvmsg()
553 *addr_len = sizeof(*sin); in l2tp_ip_recvmsg()
/linux-6.6.21/net/ipv4/
Dip_sockglue.c152 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()
529 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); in ip_recv_error()
556 if (sin && ipv4_datagram_support_addr(serr)) { in ip_recv_error()
557 sin->sin_family = AF_INET; in ip_recv_error()
558 sin->sin_addr.s_addr = *(__be32 *)(skb_network_header(skb) + in ip_recv_error()
[all …]
/linux-6.6.21/net/netfilter/
Dnf_conntrack_proto.c295 struct sockaddr_in sin; in getorigdst() local
298 sin.sin_family = AF_INET; in getorigdst()
299 sin.sin_port = ct->tuplehash[IP_CT_DIR_ORIGINAL] in getorigdst()
301 sin.sin_addr.s_addr = ct->tuplehash[IP_CT_DIR_ORIGINAL] in getorigdst()
303 memset(sin.sin_zero, 0, sizeof(sin.sin_zero)); in getorigdst()
306 if (copy_to_user(user, &sin, sizeof(sin)) != 0) in getorigdst()
/linux-6.6.21/tools/testing/selftests/net/mptcp/
Dmptcp_sockopt.sh7 sin=""
88 rm -f "$sin" "$sout"
197 ${local_addr} < "$sin" > "$sout" &
356 sin=$(mktemp)
362 make_file "$sin" "server" 1
/linux-6.6.21/include/net/
Dvxlan.h195 struct sockaddr_in sin; member
455 return ipa->sin.sin_addr.s_addr == htonl(INADDR_ANY); in vxlan_addr_any()
463 return ipv4_is_multicast(ipa->sin.sin_addr.s_addr); in vxlan_addr_multicast()
470 return ipa->sin.sin_addr.s_addr == htonl(INADDR_ANY); in vxlan_addr_any()
475 return ipv4_is_multicast(ipa->sin.sin_addr.s_addr); in vxlan_addr_multicast()
570 rdst->remote_ip.sin.sin_addr.s_addr = nhc->nhc_gw.ipv4; in vxlan_fdb_nh_path_select()

12345