Home
last modified time | relevance | path

Searched refs:addrlen (Results 1 – 14 of 14) sorted by relevance

/system/core/adb/sysdeps/posix/
Dnetwork.cpp38 static sockaddr* loopback_addr4(sockaddr_storage* addr, socklen_t* addrlen, int port) { in loopback_addr4() argument
40 *addrlen = sizeof(*addr4); in loopback_addr4()
48 static sockaddr* loopback_addr6(sockaddr_storage* addr, socklen_t* addrlen, int port) { in loopback_addr6() argument
50 *addrlen = sizeof(*addr6); in loopback_addr6()
66 socklen_t addrlen = sizeof(addr_storage); in _network_loopback_client() local
67 sockaddr* addr = (ipv6 ? loopback_addr6 : loopback_addr4)(&addr_storage, &addrlen, 0); in _network_loopback_client()
69 if (bind(s.get(), addr, addrlen) != 0) { in _network_loopback_client()
74 addr = (ipv6 ? loopback_addr6 : loopback_addr4)(&addr_storage, &addrlen, port); in _network_loopback_client()
76 if (connect(s.get(), addr, addrlen) != 0) { in _network_loopback_client()
104 socklen_t addrlen = sizeof(addr_storage); in _network_loopback_server() local
[all …]
/system/netd/tests/
Dtun_interface.cpp147 size_t addrlen; in addAddress() local
155 addrlen = sizeof(ip.ip6); in addAddress()
159 addrlen = sizeof(ip.ip4); in addAddress()
180 if (RTA_PAYLOAD(rta) != addrlen) continue; in addAddress()
181 if (!memcmp(RTA_DATA(rta), &ip, addrlen)) { in addAddress()
Dbinder_test.cpp624 socklen_t addrlen = sizeof(server6); in fakeRemoteSocketPair() local
625 ASSERT_EQ(0, getsockname(*serverSocket, (struct sockaddr *) &server6, &addrlen)); in fakeRemoteSocketPair()
632 ASSERT_EQ(0, getsockname(*clientSocket, (struct sockaddr *) &client6, &addrlen)); in fakeRemoteSocketPair()
635 accept4(*serverSocket, (struct sockaddr*)&server6, &addrlen, SOCK_CLOEXEC)); in fakeRemoteSocketPair()
/system/netd/libnetdutils/include/netdutils/
DSyscalls.h50 virtual Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const = 0;
58 virtual Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0;
60 virtual Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const = 0;
119 socklen_t addrlen = sizeof(addr); in getsockname() local
120 RETURN_IF_NOT_OK(getsockname(sock, asSockaddrPtr(&addr), &addrlen)); in getsockname()
174 socklen_t addrlen = sizeof(addr); in recvfrom() local
175 ASSIGN_OR_RETURN(auto used, recvfrom(sock, dst, flags, asSockaddrPtr(&addr), &addrlen)); in recvfrom()
DMockSyscalls.h39 MOCK_CONST_METHOD3(getsockname, Status(Fd sock, sockaddr* addr, socklen_t* addrlen));
45 MOCK_CONST_METHOD3(bind, Status(Fd sock, const sockaddr* addr, socklen_t addrlen));
46 MOCK_CONST_METHOD3(connect, Status(Fd sock, const sockaddr* addr, socklen_t addrlen));
/system/core/libcutils/
Dsockets_unix.cpp61 socklen_t addrlen = sizeof(addr); in android_get_control_socket() local
62 int ret = getsockname(fd, (struct sockaddr*)&addr, &addrlen); in android_get_control_socket()
/system/netd/libnetdutils/
DSyscalls.cpp60 Status getsockname(Fd sock, sockaddr* addr, socklen_t* addrlen) const override { in getsockname()
61 auto rv = ::getsockname(sock.get(), addr, addrlen); in getsockname()
86 Status bind(Fd sock, const sockaddr* addr, socklen_t addrlen) const override { in bind()
87 auto rv = ::bind(sock.get(), addr, addrlen); in bind()
94 Status connect(Fd sock, const sockaddr* addr, socklen_t addrlen) const override { in connect()
95 auto rv = syscallRetry(::connect, sock.get(), addr, addrlen); in connect()
DSyscallsTest.cpp76 .WillOnce(Invoke([expected](Fd, sockaddr* addr, socklen_t* addrlen) { in TEST_F() argument
78 EXPECT_EQ(*addrlen, static_cast<socklen_t>(sizeof(expected))); in TEST_F()
/system/netd/server/
DSockDiag.cpp152 uint8_t addrlen; in sendDumpRequest() local
156 addrlen = sizeof(ina); in sendDumpRequest()
161 addrlen = sizeof(mapped); in sendDumpRequest()
165 addrlen = sizeof(in6a); in sendDumpRequest()
170 uint8_t prefixlen = addrlen * 8; in sendDumpRequest()
171 uint8_t yesjump = sizeof(inet_diag_bc_op) + sizeof(inet_diag_hostcond) + addrlen; in sendDumpRequest()
195 attrs.nla.nla_len = sizeof(attrs) + addrlen; in sendDumpRequest()
200 { addr, addrlen }, in sendDumpRequest()
/system/core/libnetutils/
Difc_utils.c266 size_t addrlen; in ifc_act_on_address() local
294 addrlen = INET_ADDRLEN; in ifc_act_on_address()
298 addrlen = INET6_ADDRLEN; in ifc_act_on_address()
321 rta->rta_len = RTA_LENGTH(addrlen); in ifc_act_on_address()
322 req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(addrlen); in ifc_act_on_address()
323 memcpy(RTA_DATA(rta), addr, addrlen); in ifc_act_on_address()
329 rta->rta_len = RTA_LENGTH(addrlen); in ifc_act_on_address()
330 req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + RTA_LENGTH(addrlen); in ifc_act_on_address()
332 memcpy(RTA_DATA(rta), addr, addrlen); in ifc_act_on_address()
/system/core/adb/libs/adbconnection/
Dadbconnection_server.cpp43 socklen_t addrlen = JDWP_CONTROL_NAME_LEN + sizeof(addr.sun_family); in adbconnection_listen() local
54 if (bind(s.get(), reinterpret_cast<sockaddr*>(&addr), addrlen) < 0) { in adbconnection_listen()
/system/netd/client/
DNetdClient.cpp126 int netdClientAccept4(int sockfd, sockaddr* addr, socklen_t* addrlen, int flags) { in netdClientAccept4() argument
127 int acceptedSocket = libcAccept4(sockfd, addr, addrlen, flags); in netdClientAccept4()
149 int netdClientConnect(int sockfd, const sockaddr* addr, socklen_t addrlen) { in netdClientConnect() argument
168 const int ret = libcConnect(sockfd, addr, addrlen); in netdClientConnect()
235 socklen_t addrlen) { in netdClientSendto() argument
243 return libcSendto(sockfd, buf, bufsize, flags, addr, addrlen); in netdClientSendto()
/system/core/adb/
Dsysdeps.h187 extern int adb_socket_accept(borrowed_fd serverfd, struct sockaddr* addr, socklen_t* addrlen);
580 socklen_t* addrlen) { in adb_socket_accept() argument
583 fd = TEMP_FAILURE_RETRY(accept(serverfd.get(), addr, addrlen)); in adb_socket_accept()
Dsysdeps_win32.cpp1063 int adb_socket_accept(borrowed_fd serverfd, struct sockaddr* addr, socklen_t* addrlen) { in adb_socket_accept() argument
1079 fh->fh_socket = accept(serverfh->fh_socket, addr, addrlen); in adb_socket_accept()