string device<>;
};
+struct guestfs_upload_args {
+ string remotefilename<>;
+};
+
+struct guestfs_download_args {
+ string remotefilename<>;
+};
+
+struct guestfs_checksum_args {
+ string csumtype<>;
+ string path<>;
+};
+
+struct guestfs_checksum_ret {
+ string checksum<>;
+};
+
enum guestfs_procedure {
GUESTFS_PROC_MOUNT = 1,
GUESTFS_PROC_SYNC = 2,
GUESTFS_PROC_BLOCKDEV_GETSIZE64 = 63,
GUESTFS_PROC_BLOCKDEV_FLUSHBUFS = 64,
GUESTFS_PROC_BLOCKDEV_REREADPT = 65,
- GUESTFS_PROC_dummy
+ GUESTFS_PROC_UPLOAD = 66,
+ GUESTFS_PROC_DOWNLOAD = 67,
+ GUESTFS_PROC_CHECKSUM = 68,
+ GUESTFS_PROC_NR_PROCS
};
const GUESTFS_MESSAGE_MAX = 4194304;
+/* The communication protocol is now documented in the guestfs(3)
+ * manpage.
+ */
+
const GUESTFS_PROGRAM = 0x2000F5F5;
const GUESTFS_PROTOCOL_VERSION = 1;
+/* These constants must be larger than any possible message length. */
+const GUESTFS_LAUNCH_FLAG = 0xf5f55ff5;
+const GUESTFS_CANCEL_FLAG = 0xffffeeee;
+
enum guestfs_message_direction {
GUESTFS_DIRECTION_CALL = 0, /* client -> daemon */
GUESTFS_DIRECTION_REPLY = 1 /* daemon -> client */
const GUESTFS_ERROR_LEN = 256;
struct guestfs_message_error {
- string error<GUESTFS_ERROR_LEN>; /* error message */
+ string error_message<GUESTFS_ERROR_LEN>;
};
struct guestfs_message_header {
unsigned serial; /* message serial number */
guestfs_message_status status;
};
+
+const GUESTFS_MAX_CHUNK_SIZE = 8192;
+
+struct guestfs_chunk {
+ int cancel; /* if non-zero, transfer is cancelled */
+ /* data size is 0 bytes if the transfer has finished successfully */
+ opaque data<GUESTFS_MAX_CHUNK_SIZE>;
+};