Home
last modified time | relevance | path

Searched refs:sin (Results 1 – 8 of 8) 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/netd/include/
DFwmarkCommand.h30 sockaddr_in sin; member
40 addr.sin = *((struct sockaddr_in*) saddr); in FwmarkConnectInfo()
/system/netd/tests/benchmarks/
Dconnect_benchmark.cpp110 sockaddr_in sin = {}; in bindAndListen() local
111 socklen_t len = sizeof(sin); in bindAndListen()
112 if (getsockname(s, (sockaddr*) &sin, &len)) { in bindAndListen()
115 return ntohs(sin.sin_port); in bindAndListen()
/system/netd/server/
DNetdConstants.cpp128 sockaddr_in *sin = (sockaddr_in *) res[0].ai_addr; in parsePrefix() local
129 rawAddress = &sin->sin_addr; in parsePrefix()
DResolverController.cpp83 sockaddr_in* sin = reinterpret_cast<sockaddr_in*>(parsed); in parseServer() local
84 if (inet_pton(AF_INET, server, &(sin->sin_addr)) == 1) { in parseServer()
86 sin->sin_family = AF_INET; in parseServer()
87 sin->sin_port = htons(port); in parseServer()
DSockDiagTest.cpp184 sockaddr_in *sin = (sockaddr_in *) sa; in fillDiagAddr() local
185 memcpy(addr, &sin->sin_addr, sizeof(sin->sin_addr)); in fillDiagAddr()
DDnsProxyListener.cpp494 sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = *list[i] }; in run() local
495 addIpAddrWithinLimit(ip_addrs, (sockaddr*) &sin, sizeof(sin)); in run()
/system/core/libnetutils/
Difc_utils.c228 struct sockaddr_in *sin = (struct sockaddr_in *) sa; in init_sockaddr_in() local
229 sin->sin_family = AF_INET; in init_sockaddr_in()
230 sin->sin_port = 0; in init_sockaddr_in()
231 sin->sin_addr.s_addr = addr; in init_sockaddr_in()
294 struct sockaddr_in *sin = (struct sockaddr_in *) &ss; in ifc_act_on_address() local
295 addr = &sin->sin_addr; in ifc_act_on_address()