|
Android-cuttlefish cvd tool
|
lowest-level packet for communication between host & guest More...
#include <stdint.h>#include <optional>#include <sstream>#include <string>#include <vector>#include "cuttlefish/common/libs/confui/packet_types.h"#include "cuttlefish/common/libs/confui/utils.h"#include "cuttlefish/common/libs/fs/shared_buf.h"#include "cuttlefish/common/libs/fs/shared_fd.h"

Go to the source code of this file.
Namespaces | |
| namespace | cuttlefish |
| namespace | cuttlefish::confui |
| namespace | cuttlefish::confui::packet |
| namespace | cuttlefish::confui::packet::impl |
Functions | |
| template<typename Buffer , typename... Args> | |
| void | cuttlefish::confui::packet::impl::AppendToBuffer (Buffer &buffer, Args &&... args) |
| template<typename... Args> | |
| std::vector< int > | cuttlefish::confui::packet::impl::MakeSizeHeader (Args &&... args) |
| template<typename... Args> | |
| Payload | cuttlefish::confui::packet::impl::ToPayload (const std::string &cmd_str, const std::string &session_id, Args &&... args) |
| std::optional< ParsedPacket > | cuttlefish::confui::packet::ReadPayload (SharedFD s) |
| template<typename... Args> | |
| bool | cuttlefish::confui::packet::WritePayload (SharedFD d, const std::string &cmd_str, const std::string &session_id, Args &&... args) |
lowest-level packet for communication between host & guest
Each packet has three fields
The binary representation of each packet is as follows: n:L[1]:L[2]:...:L[n]:data[1]data[2]data[3]...data[n]
The additional_info_ is in general a variable number of items, each is either a byte vector (e.g. std::vector<uint8_t>) or a string.
n is the number of items. L[i] is the length of i th item. data[i] is the binary representation of the i th item