Home
last modified time | relevance | path

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

/system/extras/tests/tcp_nuke_addr/
Dtcp_nuke_addr_test.cpp49 sockaddr_in sin; in bindRandomAddr() local
50 sin.sin_family = AF_INET; in bindRandomAddr()
51 sin.sin_port = 0; in bindRandomAddr()
52 sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); in bindRandomAddr()
54 while (sin.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) { in bindRandomAddr()
56 ((uint8_t *) &sin.sin_addr.s_addr) + 1, in bindRandomAddr()
57 sizeof(sin.sin_addr.s_addr) - 1); in bindRandomAddr()
62 if (bind(listensock, (sockaddr *) &sin, sizeof(sin)) == -1) PERROR_EXIT("bind"); in bindRandomAddr()
131 struct sockaddr_in sin; in main() local
132 socklen_t len = sizeof(sin); in main()
[all …]
/system/connectivity/shill/net/
Dip_address.cc86 auto sin = reinterpret_cast<const sockaddr_in*>(address_struct); in IPAddress() local
88 auto bytes = reinterpret_cast<const uint8_t*>(&sin->sin_addr.s_addr); in IPAddress()
89 address_ = ByteString(bytes, sizeof(sin->sin_addr.s_addr)); in IPAddress()
260 auto sin = reinterpret_cast<sockaddr_in*>(address_struct); in IntoSockAddr() local
261 memcpy(&sin->sin_addr.s_addr, GetConstData(), GetLength()); in IntoSockAddr()
Dip_address_unittest.cc98 auto sin = reinterpret_cast<sockaddr_in*>(addr); in TestAddress() local
99 inet_pton(AF_INET, good_string.c_str(), &sin->sin_addr.s_addr); in TestAddress()
/system/core/libnetutils/
Difc_utils.c232 struct sockaddr_in *sin = (struct sockaddr_in *) sa; in init_sockaddr_in() local
233 sin->sin_family = AF_INET; in init_sockaddr_in()
234 sin->sin_port = 0; in init_sockaddr_in()
235 sin->sin_addr.s_addr = addr; in init_sockaddr_in()
298 struct sockaddr_in *sin = (struct sockaddr_in *) &ss; in ifc_act_on_address() local
299 addr = &sin->sin_addr; in ifc_act_on_address()
/system/netd/server/
DNetdConstants.cpp227 sockaddr_in *sin = (sockaddr_in *) res[0].ai_addr; in parsePrefix() local
228 rawAddress = &sin->sin_addr; in parsePrefix()
DSockDiagTest.cpp194 sockaddr_in *sin = (sockaddr_in *) sa; in fillDiagAddr() local
195 memcpy(addr, &sin->sin_addr, sizeof(sin->sin_addr)); in fillDiagAddr()