Android-cuttlefish cvd tool
|
#include <errno.h>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include <android-base/errors.h>
#include <android-base/logging.h>
#include <android-base/macros.h>
#include <android-base/off64_t.h>
#include <android-base/unique_fd.h>
#include <android-base/utf8.h>
#include "adb_unique_fd.h"
#include "sysdeps/network.h"
#include "sysdeps/stat.h"
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <poll.h>
#include <pthread.h>
#include <signal.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cutils/sockets.h>
Go to the source code of this file.
Classes | |
class | Process |
Macros | |
#define | OS_PATH_SEPARATORS "/" |
#define | OS_PATH_SEPARATOR '/' |
#define | OS_PATH_SEPARATOR_STR "/" |
#define | ENV_PATH_SEPARATOR_STR ":" |
#define | open ___xxx_open |
#define | shutdown ____xxx_shutdown |
#define | close ____xxx_close |
#define | read ___xxx_read |
#define | pread ___xxx_pread |
#define | write ___xxx_write |
#define | pwrite ___xxx_pwrite |
#define | lseek ___xxx_lseek |
#define | unlink ___xxx_unlink |
#define | creat ___xxx_creat |
#define | isatty ___xxx_isatty |
#define | accept ___xxx_accept |
#define | unix_read adb_read |
#define | unix_write adb_write |
#define | unix_lseek adb_lseek |
#define | unix_close adb_close |
#define | setsockopt ___xxx_setsockopt |
#define | socketpair ___xxx_socketpair |
#define | poll ___xxx_poll |
#define | mkdir ___xxx_mkdir |
Typedefs | |
typedef struct msghdr | adb_msghdr |
using | adb_cmsghdr = cmsghdr |
typedef struct pollfd | adb_pollfd |
Functions | |
std::optional< ssize_t > | network_peek (borrowed_fd fd) |
static bool | adb_is_separator (char c) |
static int | get_fd_flags (borrowed_fd fd) |
static void | close_on_exec (borrowed_fd fd) |
static int | unix_open (std::string_view path, int options,...) |
static int | adb_open_mode (const char *pathname, int options, int mode) |
static int | adb_open (const char *pathname, int options) |
static int | adb_shutdown (borrowed_fd fd, int direction=SHUT_RDWR) |
int | adb_close (int fd) |
int | adb_register_socket (int s) |
static int | adb_gethostname (char *name, size_t len) |
static int | adb_getlogin_r (char *buf, size_t bufsize) |
static int | adb_read (borrowed_fd fd, void *buf, size_t len) |
static int | adb_pread (borrowed_fd fd, void *buf, size_t len, off64_t offset) |
static int | unix_read_interruptible (borrowed_fd fd, void *buf, size_t len) |
static int | adb_write (borrowed_fd fd, const void *buf, size_t len) |
static int | adb_pwrite (int fd, const void *buf, size_t len, off64_t offset) |
static int64_t | adb_lseek (borrowed_fd fd, int64_t pos, int where) |
static int | adb_unlink (const char *path) |
static int | adb_creat (const char *path, int mode) |
static int | unix_isatty (borrowed_fd fd) |
int | _fd_set_error_str (int fd, std::string *error) |
int | network_inaddr_any_server (int port, int type, std::string *error) |
int | network_local_client (const char *name, int namespace_id, int type, std::string *error) |
int | network_local_server (const char *name, int namespace_id, int type, std::string *error) |
int | network_connect (const std::string &host, int port, int type, int timeout, std::string *error) |
static int | adb_socket_accept (borrowed_fd serverfd, struct sockaddr *addr, socklen_t *addrlen) |
int | adb_getsockname (borrowed_fd fd, struct sockaddr *sockaddr, socklen_t *addrlen) |
int | adb_socket_get_local_port (borrowed_fd fd) |
static int | adb_thread_setname (const std::string &name) |
static int | adb_setsockopt (borrowed_fd fd, int level, int optname, const void *optval, socklen_t optlen) |
static int | adb_socket (int domain, int type, int protocol) |
static int | adb_bind (borrowed_fd fd, const sockaddr *addr, int namelen) |
static int | unix_socketpair (int d, int type, int protocol, int sv[2]) |
static int | adb_socketpair (int sv[2]) |
ssize_t | adb_sendmsg (borrowed_fd fd, const adb_msghdr *msg, int flags) |
ssize_t | adb_recvmsg (borrowed_fd fd, adb_msghdr *msg, int flags) |
adb_cmsghdr * | adb_CMSG_FIRSTHDR (adb_msghdr *msgh) |
adb_cmsghdr * | adb_CMSG_NXTHDR (adb_msghdr *msgh, adb_cmsghdr *cmsg) |
unsigned char * | adb_CMSG_DATA (adb_cmsghdr *cmsg) |
static int | adb_poll (adb_pollfd *fds, size_t nfds, int timeout) |
static int | adb_mkdir (const std::string &path, int mode) |
static int | adb_rename (const char *oldpath, const char *newpath) |
static int | adb_is_absolute_host_path (const char *path) |
static int | adb_get_os_handle (borrowed_fd fd) |
static int | cast_handle_to_int (int fd) |
Process | adb_launch_process (std::string_view executable, std::vector< std::string > args, std::initializer_list< int > fds_to_inherit={}) |
static void | disable_tcp_nagle (borrowed_fd fd) |
bool | set_tcp_keepalive (borrowed_fd fd, int interval_sec) |
std::string | GetOSVersion () |
#define accept ___xxx_accept |
#define close ____xxx_close |
#define creat ___xxx_creat |
#define ENV_PATH_SEPARATOR_STR ":" |
#define isatty ___xxx_isatty |
#define lseek ___xxx_lseek |
#define mkdir ___xxx_mkdir |
#define open ___xxx_open |
#define OS_PATH_SEPARATOR '/' |
#define OS_PATH_SEPARATOR_STR "/" |
#define OS_PATH_SEPARATORS "/" |
#define poll ___xxx_poll |
#define pread ___xxx_pread |
#define pwrite ___xxx_pwrite |
#define read ___xxx_read |
#define setsockopt ___xxx_setsockopt |
#define shutdown ____xxx_shutdown |
#define socketpair ___xxx_socketpair |
#define unix_close adb_close |
#define unix_lseek adb_lseek |
#define unix_read adb_read |
#define unix_write adb_write |
#define unlink ___xxx_unlink |
#define write ___xxx_write |
using adb_cmsghdr = cmsghdr |
typedef struct msghdr adb_msghdr |
typedef struct pollfd adb_pollfd |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
Process adb_launch_process | ( | std::string_view | executable, |
std::vector< std::string > | args, | ||
std::initializer_list< int > | fds_to_inherit = {} |
||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
std::string GetOSVersion | ( | ) |
int network_connect | ( | const std::string & | host, |
int | port, | ||
int | type, | ||
int | timeout, | ||
std::string * | error | ||
) |
|
inline |
|
inline |
|
inline |
std::optional< ssize_t > network_peek | ( | borrowed_fd | fd | ) |
bool set_tcp_keepalive | ( | borrowed_fd | fd, |
int | interval_sec | ||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |