/device/google/cuttlefish/common/libs/fs/ |
D | shared_fd.cpp | 204 SharedFD SharedFD::Accept(const FileInstance& listener, struct sockaddr* addr, in Accept() 206 return SharedFD( in Accept() 210 SharedFD SharedFD::Accept(const FileInstance& listener) { in Accept() 211 return SharedFD::Accept(listener, NULL, NULL); in Accept() 214 SharedFD SharedFD::Dup(int unmanaged_fd) { in Dup() 217 return SharedFD(std::shared_ptr<FileInstance>(new FileInstance(fd, error_num))); in Dup() 220 bool SharedFD::Pipe(SharedFD* fd0, SharedFD* fd1) { in Pipe() 231 SharedFD SharedFD::Event(int initval, int flags) { in Event() 236 SharedFD SharedFD::MemfdCreate(const std::string& name, unsigned int flags) { in MemfdCreate() 242 bool SharedFD::SocketPair(int domain, int type, int protocol, in SocketPair() [all …]
|
D | shared_fd.h | 111 class SharedFD { 113 inline SharedFD(); 114 SharedFD(const std::shared_ptr<FileInstance>& in) : value_(in) {} in SharedFD() function 116 static SharedFD Accept(const FileInstance& listener, struct sockaddr* addr, 118 static SharedFD Accept(const FileInstance& listener); 119 static SharedFD Dup(int unmanaged_fd); 122 static SharedFD Open(const std::string& pathname, int flags, mode_t mode = 0); 123 static SharedFD Creat(const std::string& pathname, mode_t mode); 124 static bool Pipe(SharedFD* fd0, SharedFD* fd1); 125 static SharedFD Event(int initval = 0, int flags = 0); [all …]
|
D | shared_buf.h | 33 ssize_t ReadAll(SharedFD fd, std::string* buf); 43 ssize_t ReadExact(SharedFD fd, std::string* buf); 53 ssize_t ReadExact(SharedFD fd, std::vector<char>* buf); 63 ssize_t ReadExact(SharedFD fd, char* buf, size_t size); 74 ssize_t ReadExactBinary(SharedFD fd, T* binary_data) { in ReadExactBinary() 86 ssize_t WriteAll(SharedFD fd, const std::string& buf); 96 ssize_t WriteAll(SharedFD fd, const std::vector<char>& buf); 106 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size); 117 ssize_t WriteAllBinary(SharedFD fd, const T* binary_data) { in WriteAllBinary()
|
D | shared_select.h | 38 typedef std::set<SharedFD>::iterator iterator; 39 typedef std::set<SharedFD>::const_iterator const_iterator; 50 void Clr(const SharedFD& in) { in Clr() 54 bool IsSet(const SharedFD& in) const { in IsSet() 58 void Set(const SharedFD& in) { in Set() 67 std::set<SharedFD> value_;
|
D | shared_buf.cc | 33 ssize_t WriteAll(SharedFD fd, const char* buf, size_t size) { in WriteAll() 49 ssize_t ReadExact(SharedFD fd, char* buf, size_t size) { in ReadExact() 65 ssize_t ReadAll(SharedFD fd, std::string* buf) { in ReadAll() 81 ssize_t ReadExact(SharedFD fd, std::string* buf) { in ReadExact() 85 ssize_t ReadExact(SharedFD fd, std::vector<char>* buf) { in ReadExact() 89 ssize_t WriteAll(SharedFD fd, const std::string& buf) { in WriteAll() 93 ssize_t WriteAll(SharedFD fd, const std::vector<char>& buf) { in WriteAll()
|
/device/google/cuttlefish/host/commands/modem_simulator/ |
D | channel_monitor.h | 45 cuttlefish::SharedFD client_fd; 53 Client(cuttlefish::SharedFD fd); 54 Client(cuttlefish::SharedFD fd, ClientType client_type); 68 ChannelMonitor(ModemSimulator* modem, cuttlefish::SharedFD server); 74 void SetRemoteClient(cuttlefish::SharedFD client, bool is_accepted); 75 void SendRemoteCommand(cuttlefish::SharedFD client, std::string& response); 76 void CloseRemoteConnection(cuttlefish::SharedFD client); 84 cuttlefish::SharedFD server_; 85 cuttlefish::SharedFD read_pipe_; 86 cuttlefish::SharedFD write_pipe_;
|
/device/google/cuttlefish/common/frontend/socket_vsock_proxy/ |
D | main.cpp | 42 explicit SocketSender(cuttlefish::SharedFD socket) : socket_{socket} {} in SocketSender() 76 cuttlefish::SharedFD socket_; 81 explicit SocketReceiver(cuttlefish::SharedFD socket) : socket_{socket} {} in SocketReceiver() 100 cuttlefish::SharedFD socket_; 134 void HandleConnection(cuttlefish::SharedFD vsock, in HandleConnection() 135 cuttlefish::SharedFD socket) { in HandleConnection() 145 auto server = cuttlefish::SharedFD::SocketLocalServer(FLAGS_tcp_port, SOCK_STREAM); in TcpServer() 150 auto client_socket = cuttlefish::SharedFD::Accept(*server); in TcpServer() 152 cuttlefish::SharedFD vsock_socket = cuttlefish::SharedFD::VsockClient( in TcpServer() 173 cuttlefish::SharedFD OpenSocketConnection() { in OpenSocketConnection() [all …]
|
/device/google/cuttlefish/host/commands/console_forwarder/ |
D | main.cpp | 53 cuttlefish::SharedFD console_in, in ConsoleForwarder() 54 cuttlefish::SharedFD console_out, in ConsoleForwarder() 55 cuttlefish::SharedFD console_log) : in ConsoleForwarder() 69 cuttlefish::SharedFD OpenPTY() { in OpenPTY() 111 auto pty_shared_fd = cuttlefish::SharedFD::Dup(pty); in OpenPTY() 122 void EnqueueWrite(std::shared_ptr<std::vector<char>> buf_ptr, cuttlefish::SharedFD fd) { in EnqueueWrite() 132 cuttlefish::SharedFD fd; in WriteLoop() 169 cuttlefish::SharedFD client_fd; in ReadLoop() 214 cuttlefish::SharedFD console_in_; 215 cuttlefish::SharedFD console_out_; [all …]
|
/device/google/cuttlefish/host/commands/run_cvd/ |
D | launch.cc | 69 cuttlefish::SharedFD CreateUnixInputServer(const std::string& path) { in CreateUnixInputServer() 71 cuttlefish::SharedFD::SocketLocalServer(path.c_str(), false, SOCK_STREAM, 0666); in CreateUnixInputServer() 74 return cuttlefish::SharedFD(); in CreateUnixInputServer() 84 cuttlefish::SharedFD touch_server; in CreateStreamerServers() 85 cuttlefish::SharedFD keyboard_server; in CreateStreamerServers() 91 touch_server = cuttlefish::SharedFD::VsockServer(instance.touch_server_port(), in CreateStreamerServers() 94 cuttlefish::SharedFD::VsockServer(instance.keyboard_server_port(), in CreateStreamerServers() 113 cuttlefish::SharedFD frames_server; in CreateStreamerServers() 118 frames_server = cuttlefish::SharedFD::VsockServer(instance.frames_server_port(), in CreateStreamerServers() 131 std::vector<cuttlefish::SharedFD> LaunchKernelLogMonitor( in LaunchKernelLogMonitor() [all …]
|
D | main.cc | 82 CvdBootStateMachine(cuttlefish::SharedFD fg_launcher_pipe) in CvdBootStateMachine() 86 bool OnBootEvtReceived(cuttlefish::SharedFD boot_events_pipe) { in OnBootEvtReceived() 135 cuttlefish::SharedFD fg_launcher_pipe_; 144 cuttlefish::ProcessMonitor* process_monitor, cuttlefish::SharedFD boot_events_pipe, in SetUpHandlingOfBootEvents() 158 auto env = cuttlefish::SharedFD::Open(config.cuttlefish_env_path().c_str(), in WriteCuttlefishEnvironment() 174 cuttlefish::SharedFD DaemonizeLauncher(const cuttlefish::CuttlefishConfig& config) { in DaemonizeLauncher() 176 cuttlefish::SharedFD read_end, write_end; in DaemonizeLauncher() 177 if (!cuttlefish::SharedFD::Pipe(&read_end, &write_end)) { in DaemonizeLauncher() 179 return cuttlefish::SharedFD(); // a closed FD in DaemonizeLauncher() 214 cuttlefish::SharedFD::Open(log_path.c_str(), O_CREAT | O_WRONLY | O_APPEND, in DaemonizeLauncher() [all …]
|
/device/google/cuttlefish/host/commands/launch/ |
D | launch_cvd.cc | 59 cuttlefish::Subprocess StartAssembler(cuttlefish::SharedFD assembler_stdin, in StartAssembler() 60 cuttlefish::SharedFD assembler_stdout, in StartAssembler() 73 cuttlefish::Subprocess StartRunner(cuttlefish::SharedFD runner_stdin, in StartRunner() 83 void WriteFiles(cuttlefish::FetcherConfig fetcher_config, cuttlefish::SharedFD out) { in WriteFiles() 161 cuttlefish::SharedFD assembler_stdout, assembler_stdout_capture; in main() 162 cuttlefish::SharedFD::Pipe(&assembler_stdout_capture, &assembler_stdout); in main() 164 cuttlefish::SharedFD launcher_report, assembler_stdin; in main() 167 cuttlefish::SharedFD::Pipe(&assembler_stdin, &launcher_report); in main() 200 cuttlefish::SharedFD runner_stdin_in, runner_stdin_out; in main() 201 cuttlefish::SharedFD::Pipe(&runner_stdin_out, &runner_stdin_in); in main()
|
/device/google/cuttlefish/host/frontend/webrtc/ |
D | connection_observer.h | 31 CfConnectionObserverFactory(cuttlefish::SharedFD touch_fd, 32 cuttlefish::SharedFD keyboard_fd); 41 cuttlefish::SharedFD touch_fd_; 42 cuttlefish::SharedFD keyboard_fd_;
|
D | connection_observer.cpp | 78 ConnectionObserverImpl(cuttlefish::SharedFD touch_fd, in ConnectionObserverImpl() 79 cuttlefish::SharedFD keyboard_fd, in ConnectionObserverImpl() 145 cuttlefish::SharedFD touch_client_; 146 cuttlefish::SharedFD keyboard_client_; 153 cuttlefish::SharedFD touch_fd, cuttlefish::SharedFD keyboard_fd) in CfConnectionObserverFactory()
|
/device/google/cuttlefish/host/commands/kernel_log_monitor/ |
D | main.cc | 41 std::vector<cuttlefish::SharedFD> SubscribersFromCmdline() { in SubscribersFromCmdline() 52 std::vector<cuttlefish::SharedFD> shared_fds; in SubscribersFromCmdline() 55 auto shared_fd = cuttlefish::SharedFD::Dup(fd); in SubscribersFromCmdline() 81 cuttlefish::SharedFD pipe; in main() 84 pipe = cuttlefish::SharedFD::Open(log_name.c_str(), O_RDONLY); in main() 86 pipe = cuttlefish::SharedFD::Dup(FLAGS_log_pipe_fd); in main()
|
D | kernel_log_server.h | 49 KernelLogServer(cuttlefish::SharedFD pipe_fd, 69 cuttlefish::SharedFD pipe_fd_; 70 cuttlefish::SharedFD log_fd_;
|
/device/google/cuttlefish/guest/commands/vtpm_manager/ |
D | main.cpp | 44 bool ReadResponseLoop(cuttlefish::SharedFD in_fd, cuttlefish::SharedFD out_fd) { in ReadResponseLoop() 67 void SendCommand(cuttlefish::SharedFD out_fd, std::vector<char> command) { in SendCommand() 82 bool SendCommandLoop(cuttlefish::SharedFD in_fd, cuttlefish::SharedFD out_fd) { in SendCommandLoop() 119 auto proxy = cuttlefish::SharedFD::VsockClient(2, FLAGS_tpm_vsock_port, SOCK_STREAM); in main() 122 auto vtpmx = cuttlefish::SharedFD::Open("/dev/vtpmx", O_RDWR | O_CLOEXEC); in main() 130 auto device_fd = cuttlefish::SharedFD::Dup(vtpm_creation.fd); in main()
|
/device/google/cuttlefish/common/libs/utils/ |
D | subprocess.cpp | 43 const std::map<SharedFD, int>& inherited_fds) { in validate_redirects() argument 87 subprocess.control_socket_ = SharedFD(); in Subprocess() 98 other.control_socket_ = SharedFD(); in operator =() 184 bool Command::BuildParameter(std::stringstream* stream, SharedFD shared_fd) { in BuildParameter() 201 SharedFD shared_fd) { in RedirectStdIO() 221 SharedFD::Dup(static_cast<int>(parent_channel))); in RedirectStdIO() 229 SharedFD parent_socket, child_socket; in Start() 231 if (!SharedFD::SocketPair(AF_LOCAL, SOCK_STREAM, 0, &parent_socket, in Start() 331 SharedFD pipe_read, pipe_write; in RunWithManagedStdio() 332 if (!SharedFD::Pipe(&pipe_read, &pipe_write)) { in RunWithManagedStdio() [all …]
|
D | network.h | 29 SharedFD OpenTapInterface(const std::string& interface_name); 43 std::vector<DnsmasqDhcp4Lease> ParseDnsmasqLeases(SharedFD lease_file); 48 bool ReleaseDhcp4(SharedFD tap, const std::uint8_t mac_address[6],
|
/device/google/cuttlefish/host/commands/logcat_receiver/ |
D | main.cpp | 48 cuttlefish::SharedFD pipe; in main() 51 pipe = cuttlefish::SharedFD::Open(log_name.c_str(), O_RDONLY); in main() 53 pipe = cuttlefish::SharedFD::Dup(FLAGS_log_pipe_fd); in main() 64 cuttlefish::SharedFD::Open(path.c_str(), O_CREAT | O_APPEND | O_WRONLY, 0666); in main()
|
/device/google/cuttlefish/host/commands/vtpm_passthrough/ |
D | vtpm_passthrough.cpp | 34 void HandleClient(cuttlefish::SharedFD client, cuttlefish::SharedFD device) { in HandleClient() 77 auto server = cuttlefish::SharedFD::Dup(FLAGS_server_fd); in main() 81 auto device = cuttlefish::SharedFD::Open(FLAGS_device.c_str(), O_RDWR); in main() 85 auto client = cuttlefish::SharedFD::Accept(*server); in main()
|
/device/google/cuttlefish/host/commands/assemble_cvd/ |
D | boot_image_unpacker.h | 49 BootImageUnpacker(SharedFD boot_image, const std::string& cmdline, in BootImageUnpacker() 52 SharedFD vendor_boot_image, in BootImageUnpacker() 66 mutable SharedFD boot_image_; 67 mutable SharedFD vendor_boot_image_;
|
/device/google/cuttlefish/host/frontend/adb_connector/ |
D | adb_connection_maintainer.cpp | 56 bool SendAll(cuttlefish::SharedFD sock, const std::string& msg) { in SendAll() 72 std::string RecvAll(cuttlefish::SharedFD sock, const size_t count) { in RecvAll() 96 bool AdbSendMessage(cuttlefish::SharedFD sock, const std::string& message) { in AdbSendMessage() 108 auto sock = cuttlefish::SharedFD::SocketLocalClient(kAdbDaemonPort, SOCK_STREAM); in AdbSendMessage() 126 std::string RecvAdbResponse(cuttlefish::SharedFD sock) { in RecvAdbResponse() 137 int RecvUptimeResult(cuttlefish::SharedFD sock) { in RecvUptimeResult() 185 auto sock = cuttlefish::SharedFD::SocketLocalClient(kAdbDaemonPort, SOCK_STREAM); in WaitForAdbDisconnection()
|
/device/google/cuttlefish/host/libs/vm_manager/ |
D | crosvm_manager.cpp | 46 cuttlefish::SharedFD AddTapFdParameter(cuttlefish::Command* crosvm_cmd, in AddTapFdParameter() 58 bool ReleaseDhcpLeases(const std::string& lease_path, cuttlefish::SharedFD tap_fd) { in ReleaseDhcpLeases() 59 auto lease_file_fd = cuttlefish::SharedFD::Open(lease_path, O_RDONLY); in ReleaseDhcpLeases() 250 cuttlefish::SharedFD console_in_wr = in StartCommands() 251 cuttlefish::SharedFD::Open(console_in_pipe_name.c_str(), O_RDWR); in StartCommands() 257 cuttlefish::SharedFD console_out_rd = in StartCommands() 258 cuttlefish::SharedFD::Open(console_out_pipe_name.c_str(), O_RDWR); in StartCommands() 288 cuttlefish::SharedFD log_out_rd, log_out_wr; in StartCommands() 289 if (!cuttlefish::SharedFD::Pipe(&log_out_rd, &log_out_wr)) { in StartCommands()
|
/device/google/cuttlefish/host/commands/config_server/ |
D | main.cpp | 37 cuttlefish::SharedFD server_fd = cuttlefish::SharedFD::Dup(FLAGS_server_fd); in main() 44 auto conn = cuttlefish::SharedFD::Accept(*server_fd); in main()
|
/device/google/cuttlefish/guest/commands/vsoc_input_service/ |
D | vsoc_input_service.cpp | 80 cuttlefish::SharedFD keyboard_fd; in ProcessEvents() 81 cuttlefish::SharedFD touch_fd; in ProcessEvents() 85 keyboard_fd = cuttlefish::SharedFD::VsockClient(2, FLAGS_keyboard_port, SOCK_STREAM); in ProcessEvents() 93 touch_fd = cuttlefish::SharedFD::VsockClient(2, FLAGS_touch_port, SOCK_STREAM); in ProcessEvents()
|