Home
last modified time | relevance | path

Searched refs:sin (Results 1 – 16 of 16) 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/resolv/
Dres_init.cpp149 u[nserv].sin.sin_addr.s_addr = INADDR_ANY; in res_vinit()
150 u[nserv].sin.sin_family = AF_INET; in res_vinit()
151 u[nserv].sin.sin_port = htons(NAMESERVER_PORT); in res_vinit()
162 statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr; in res_vinit()
314 switch (set->sin.sin_family) { in res_setservers()
316 size = sizeof(set->sin); in res_setservers()
318 memcpy(&statp->_u._ext.ext->nsaddrs[nserv], &set->sin, size); in res_setservers()
320 memcpy(&statp->nsaddr_list[nserv], &set->sin, size); in res_setservers()
354 family = statp->_u._ext.ext->nsaddrs[i].sin.sin_family; in res_getservers()
360 size = sizeof(set->sin); in res_getservers()
[all …]
DDnsProxyListener.cpp190 sockaddr_in sin = {.sin_family = AF_INET}; in extractResNsendAnswers() local
191 memcpy(&sin.sin_addr, rdata, sizeof(sin.sin_addr)); in extractResNsendAnswers()
192 addIpAddrWithinLimit(ip_addrs, (sockaddr*) &sin, sizeof(sin)); in extractResNsendAnswers()
228 sockaddr_in sin = {.sin_family = AF_INET, .sin_addr = *list[i]}; in extractGetHostByNameAnswers() local
229 addIpAddrWithinLimit(ip_addrs, (sockaddr*) &sin, sizeof(sin)); in extractGetHostByNameAnswers()
Dres_send.cpp214 u.sin.sin_family = family; in random_bind()
215 slen = sizeof u.sin; in random_bind()
231 u.sin.sin_port = htons(port); in random_bind()
241 u.sin.sin_port = 0; in random_bind()
463 statp->_u._ext.ext->nsaddrs[ns].sin = statp->nsaddr_list[ns]; in res_nsend()
Ddns_tls_test.cpp50 sockaddr_in* sin = reinterpret_cast<sockaddr_in*>(parsed); in parseServer() local
51 if (inet_pton(AF_INET, server, &(sin->sin_addr)) == 1) { in parseServer()
53 sin->sin_family = AF_INET; in parseServer()
54 sin->sin_port = htons(port); in parseServer()
Dresolver_test.cpp3023 struct sockaddr_in sin; in TEST_F() local
3026 memset(&sin, 0, sizeof(sin)); in TEST_F()
3027 sin.sin_family = AF_INET; in TEST_F()
3028 inet_pton(AF_INET, config.addr.c_str(), &sin.sin_addr); in TEST_F()
3029 rv = getnameinfo((const struct sockaddr*) &sin, sizeof(sin), host, sizeof(host), in TEST_F()
Dgetaddrinfo.cpp252 sockaddr_union addr = {.sin = sin_test}; in have_ipv4()
/system/netd/include/
DFwmarkCommand.h30 sockaddr_in sin; member
40 addr.sin = *((struct sockaddr_in*) saddr); in FwmarkConnectInfo()
/system/netd/tests/benchmarks/
Dconnect_benchmark.cpp88 sockaddr_in sin = {}; in bindAndListen() local
89 socklen_t len = sizeof(sin); in bindAndListen()
90 if (getsockname(s, (sockaddr*) &sin, &len)) { in bindAndListen()
93 return ntohs(sin.sin_port); in bindAndListen()
/system/netd/libnetdutils/
DInternetAddresses.cpp73 sockaddr_in* sin = (sockaddr_in*) res[0].ai_addr; in forString() local
74 if (ip) *ip = IPAddress(sin->sin_addr); in forString()
/system/chre/external/kiss_fft/
D_kiss_fft_guts.h129 # define KISS_FFT_SIN(phase) floor(.5+SAMP_MAX * sin (phase))
133 # define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )
137 # define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)
/system/netd/server/
DClatdController.cpp142 struct sockaddr_in sin = {.sin_family = AF_INET, .sin_addr = {addr}, .sin_port = 53}; in isIpv4AddressFree() local
143 socklen_t len = sizeof(sin); in isIpv4AddressFree()
144 bool inuse = connect(s, (struct sockaddr*)&sin, sizeof(sin)) == 0 && in isIpv4AddressFree()
145 getsockname(s, (struct sockaddr*)&sin, &len) == 0 && (size_t)len >= sizeof(sin) && in isIpv4AddressFree()
146 sin.sin_addr.s_addr == addr; in isIpv4AddressFree()
DNetdConstants.cpp121 sockaddr_in *sin = (sockaddr_in *) res[0].ai_addr; in parsePrefix() local
122 rawAddress = &sin->sin_addr; in parsePrefix()
DSockDiagTest.cpp186 sockaddr_in *sin = (sockaddr_in *) sa; in fillDiagAddr() local
187 memcpy(addr, &sin->sin_addr, sizeof(sin->sin_addr)); in fillDiagAddr()
/system/netd/resolv/include/netd_resolv/
Dresolv.h37 struct sockaddr_in sin; member
/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()