Searched refs:socket_fd (Results 1 – 9 of 9) sorted by relevance
/system/core/adb/ |
D | socket_test.cpp | 107 int socket_fd; member 113 asocket* s = create_local_socket(arg->socket_fd); in CloseWithPacketThreadFunc() 141 int socket_fd[2]; in TEST_F() local 142 ASSERT_EQ(0, adb_socketpair(socket_fd)); in TEST_F() 146 arg.socket_fd = socket_fd[1]; in TEST_F() 158 ASSERT_EQ(0, adb_close(socket_fd[0])); in TEST_F() 165 int socket_fd[2]; in TEST_F() local 166 ASSERT_EQ(0, adb_socketpair(socket_fd)); in TEST_F() 170 arg.socket_fd = socket_fd[1]; in TEST_F() 186 ASSERT_EQ(true, ReadFdExactly(socket_fd[0], buf.data(), buf.size())); in TEST_F() [all …]
|
/system/weaved/buffet/ |
D | flouride_socket_bluetooth_client.cc | 40 int socket_fd = socket(PF_UNIX, SOCK_STREAM, 0); in OpenSocket() local 41 if (socket_fd < 0) { in OpenSocket() 50 if (connect(socket_fd, reinterpret_cast<sockaddr *>(&addr), in OpenSocket() 54 close(socket_fd); in OpenSocket() 58 stream_ = brillo::FileStream::FromFileDescriptor(socket_fd, true, nullptr); in OpenSocket()
|
D | socket_stream.cc | 75 int socket_fd = -1; in ConnectSocket() local 77 socket_fd = socket(info->ai_family, info->ai_socktype, info->ai_protocol); in ConnectSocket() 78 if (socket_fd < 0) in ConnectSocket() 83 if (connect(socket_fd, info->ai_addr, info->ai_addrlen) == 0) in ConnectSocket() 87 close(socket_fd); in ConnectSocket() 88 socket_fd = -1; in ConnectSocket() 92 return socket_fd; in ConnectSocket() 148 int socket_fd = ConnectSocket(host, port); in ConnectBlocking() local 149 if (socket_fd <= 0) in ConnectBlocking() 152 auto ptr_ = brillo::FileStream::FromFileDescriptor(socket_fd, true, nullptr); in ConnectBlocking() [all …]
|
/system/webservd/webservd/ |
D | protocol_handler.cc | 197 if (config->socket_fd != -1) { in Start() 199 int socket_fd = config->socket_fd; in Start() local 200 config->socket_fd = -1; in Start() 204 if (setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) { in Start() 209 if (setsockopt(socket_fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) { in Start() 211 close(socket_fd); in Start() 219 if (bind(socket_fd, reinterpret_cast<const sockaddr*>(&addr), in Start() 222 close(socket_fd); in Start() 228 if (setsockopt(socket_fd, IPPROTO_TCP, TCP_FASTOPEN, in Start() 237 if (listen(socket_fd, 32) < 0) { in Start() [all …]
|
D | utils.cc | 169 int socket_fd = socket(PF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in CreateNetworkInterfaceSocket() local 170 if (socket_fd < 0 && errno == EINVAL) in CreateNetworkInterfaceSocket() 171 socket_fd = socket(PF_INET6, SOCK_STREAM, 0); in CreateNetworkInterfaceSocket() 172 if (socket_fd < 0) { in CreateNetworkInterfaceSocket() 180 if (setsockopt(socket_fd, SOL_SOCKET, SO_BINDTODEVICE, in CreateNetworkInterfaceSocket() 183 close(socket_fd); in CreateNetworkInterfaceSocket() 186 return socket_fd; in CreateNetworkInterfaceSocket()
|
D | main.cc | 128 int socket_fd = in main() local 130 if (socket_fd < 0) { in main() 135 handler_config.socket_fd = socket_fd; in main()
|
D | config.cc | 96 if (socket_fd != -1) in ~ProtocolHandler() 97 close(socket_fd); in ~ProtocolHandler()
|
D | config.h | 56 int socket_fd{-1};
|
/system/connectivity/shill/shims/ |
D | netfilter_queue_processor.cc | 296 int socket_fd = socket(AF_INET, SOCK_DGRAM, 0); in GetNetmaskForDevice() local 297 if (socket_fd < 0) { in GetNetmaskForDevice() 301 base::ScopedFD scoped_fd(socket_fd); in GetNetmaskForDevice() 303 if (ioctl(socket_fd, SIOCGIFNETMASK, &ifr) != 0) { in GetNetmaskForDevice()
|