|
Android-cuttlefish cvd tool
|
Classes | |
| struct | BlockBuffer |
| class | File |
| class | IncrementalServer |
| class | ISDatabaseEntry |
| class | ISSignedDatabaseEntry |
| class | ISUnsignedDatabaseEntry |
| struct | RequestCommand |
| struct | ResponseHeader |
Typedefs | |
| using | Files = std::vector< std::string > |
| using | Args = std::vector< std::string_view > |
| using | BlockSize = int16_t |
| using | FileId = int16_t |
| using | BlockIdx = int32_t |
| using | NumBlocks = int32_t |
| using | BlockType = int8_t |
| using | CompressionType = int8_t |
| using | RequestType = int16_t |
| using | ChunkHeader = int32_t |
| using | MagicType = uint32_t |
| using | Size = int64_t |
Functions | |
| static bool | requires_v4_signature (const std::string &file) |
| static std::optional< std::pair< std::vector< char >, int32_t > > | read_signature (const std::string &signature_file, std::string *error) |
| static bool | validate_signature (const std::vector< char > &signature, int32_t tree_size, size_t file_size, std::string *error) |
| static std::optional< std::string > | encode_signature (const std::vector< char > &signature, std::string *error) |
| static std::optional< std::pair< unique_fd, size_t > > | open_and_get_size (const std::string &file, std::string *error) |
| static std::optional< std::vector< std::unique_ptr< ISDatabaseEntry > > > | build_database (const Files &files, std::string *error) |
| static std::optional< unique_fd > | connect_and_send_database (const std::vector< std::unique_ptr< ISDatabaseEntry > > &database, const Args &passthrough_args, std::string *error) |
| bool | can_install (const Files &files) |
| static bool | send_unsigned_files (borrowed_fd connection_fd, const std::vector< std::unique_ptr< ISDatabaseEntry > > &database, std::string *error) |
| static bool | wait_for_installation (int read_fd, std::string *error) |
| static std::optional< Process > | start_inc_server_and_stream_signed_files (borrowed_fd connection_fd, const std::vector< std::unique_ptr< ISDatabaseEntry > > &database, std::string *error) |
| std::optional< Process > | install (const Files &files, const Args &passthrough_args, std::string *error) |
| std::optional< Process > | install (const Files &files, const Args &passthrough_args, bool silent) |
| static constexpr int64_t | roundDownToBlockOffset (int64_t val) |
| static constexpr int64_t | roundUpToBlockOffset (int64_t val) |
| static constexpr NumBlocks | numBytesToNumBlocks (int64_t bytes) |
| static constexpr off64_t | blockIndexToOffset (BlockIdx blockIdx) |
| template<typename T > | |
| static constexpr T | toBigEndian (T t) |
| template<typename T > | |
| static constexpr T | readBigEndian (void *data) |
| struct incremental::RequestCommand | __attribute__ ((packed)) |
| template<size_t Size = kBlockSize> | |
| struct incremental::BlockBuffer | __attribute__ ((packed)) |
| static std::pair< unique_fd, int64_t > | open_fd (const char *filepath) |
| static std::pair< unique_fd, int64_t > | open_signature (int64_t file_size, const char *filepath) |
| bool | serve (int connection_fd, int output_fd, int argc, const char **argv) |
| Size | verity_tree_blocks_for_file (Size fileSize) |
| Size | verity_tree_size_for_file (Size fileSize) |
| static std::optional< int32_t > | read_int32 (borrowed_fd fd, std::string *error) |
| static bool | skip_int (borrowed_fd fd, std::string *error) |
| static bool | append_int (borrowed_fd fd, std::vector< char > *bytes, std::string *error) |
| static bool | append_bytes_with_size (borrowed_fd fd, std::vector< char > *bytes, int *bytes_left, std::string *error) |
| static bool | skip_bytes_with_size (borrowed_fd fd, std::string *error) |
| std::optional< std::pair< std::vector< char >, int32_t > > | read_id_sig_headers (borrowed_fd fd, std::string *error) |
| std::optional< std::pair< off64_t, ssize_t > > | skip_id_sig_headers (borrowed_fd fd, std::string *error) |
| template<class T > | |
| static T | valueAt (borrowed_fd fd, off64_t offset) |
| template<class T > | |
| static void | unduplicate (std::vector< T > &v) |
| std::vector< int32_t > | PriorityBlocksForFile (const std::string &, borrowed_fd, Size) |
Variables | |
| static constexpr int | kHashesPerBlock = kBlockSize / kDigestSize |
| static constexpr int | kCompressedSizeMax = kBlockSize * 0.95 |
| static constexpr int8_t | kTypeData = 0 |
| static constexpr int8_t | kTypeHash = 1 |
| static constexpr int8_t | kCompressionNone = 0 |
| static constexpr int8_t | kCompressionLZ4 = 1 |
| static constexpr int | kCompressBound = std::max(kBlockSize, LZ4_COMPRESSBOUND(kBlockSize)) |
| static constexpr auto | kReadBufferSize = 128 * 1024 |
| static constexpr int | kPollTimeoutMillis = 300000 |
| static constexpr MagicType | INCR = 0x494e4352 |
| static constexpr RequestType | SERVING_COMPLETE = 0 |
| static constexpr RequestType | BLOCK_MISSING = 1 |
| static constexpr RequestType | PREFETCH = 2 |
| static constexpr RequestType | DESTROY = 3 |
| class incremental::File | __attribute__ |
| constexpr int | kBlockSize = 4096 |
| constexpr int | kSha256DigestSize = 32 |
| constexpr int | kDigestSize = kSha256DigestSize |
| constexpr int | kMaxSignatureSize = 8096 |
| constexpr std::string_view | IDSIG = ".idsig" |
| using incremental::Args = typedef std::vector<std::string_view> |
| using incremental::BlockIdx = typedef int32_t |
| using incremental::BlockSize = typedef int16_t |
| using incremental::BlockType = typedef int8_t |
| using incremental::ChunkHeader = typedef int32_t |
| using incremental::CompressionType = typedef int8_t |
| using incremental::FileId = typedef int16_t |
| using incremental::Files = typedef std::vector<std::string> |
| using incremental::MagicType = typedef uint32_t |
| using incremental::NumBlocks = typedef int32_t |
| using incremental::RequestType = typedef int16_t |
| using incremental::Size = typedef int64_t |
| struct incremental::RequestCommand incremental::__attribute__ | ( | (packed) | ) |
| struct incremental::BlockBuffer incremental::__attribute__ | ( | (packed) | ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestaticconstexpr |
|
static |
| bool incremental::can_install | ( | const Files & | files | ) |
|
static |
|
static |
| std::optional< Process > incremental::install | ( | const Files & | files, |
| const Args & | passthrough_args, | ||
| bool | silent | ||
| ) |
| std::optional< Process > incremental::install | ( | const Files & | files, |
| const Args & | passthrough_args, | ||
| std::string * | error | ||
| ) |
|
inlinestaticconstexpr |
|
static |
|
static |
|
static |
| std::vector< int32_t > incremental::PriorityBlocksForFile | ( | const std::string & | , |
| borrowed_fd | , | ||
| Size | |||
| ) |
| std::optional< std::pair< std::vector< char >, int32_t > > incremental::read_id_sig_headers | ( | borrowed_fd | fd, |
| std::string * | error | ||
| ) |
|
inlinestatic |
|
static |
|
inlinestaticconstexpr |
|
static |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
static |
| bool incremental::serve | ( | int | connection_fd, |
| int | output_fd, | ||
| int | argc, | ||
| const char ** | argv | ||
| ) |
|
inlinestatic |
| std::optional< std::pair< off64_t, ssize_t > > incremental::skip_id_sig_headers | ( | borrowed_fd | fd, |
| std::string * | error | ||
| ) |
|
inlinestatic |
|
static |
|
inlinestaticconstexpr |
|
static |
|
static |
|
static |
|
static |
| struct incremental::ResponseHeader incremental::__attribute__ |
|
staticconstexpr |
|
staticconstexpr |
|
constexpr |
|
staticconstexpr |
|
constexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
constexpr |
|
staticconstexpr |
|
constexpr |
|
staticconstexpr |
|
staticconstexpr |
|
constexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |