/system/core/adb/sysdeps/posix/ |
D | network.cpp | 38 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/ |
D | tun_interface.cpp | 147 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()
|
D | binder_test.cpp | 624 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/ |
D | Syscalls.h | 50 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()
|
D | MockSyscalls.h | 39 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/ |
D | sockets_unix.cpp | 61 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/ |
D | Syscalls.cpp | 60 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()
|
D | SyscallsTest.cpp | 76 .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/ |
D | SockDiag.cpp | 152 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/ |
D | ifc_utils.c | 266 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/ |
D | adbconnection_server.cpp | 43 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/ |
D | NetdClient.cpp | 126 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/ |
D | sysdeps.h | 187 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()
|
D | sysdeps_win32.cpp | 1063 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()
|