X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs_protocol.x;h=0cfb8ee2b87f0920117d0aa7ce6d1cf4a224c756;hb=b03ee3675bed8d739ae722ed8c030ae02b3cb0ed;hp=4291809d2528cc8a61b716c90c60fe5bbc5695ca;hpb=bb07a7f858da5d07c57360e62c0ddfd24ce6be45;p=libguestfs.git diff --git a/src/guestfs_protocol.x b/src/guestfs_protocol.x index 4291809..0cfb8ee 100644 --- a/src/guestfs_protocol.x +++ b/src/guestfs_protocol.x @@ -483,6 +483,96 @@ struct guestfs_download_args { string remotefilename<>; }; +struct guestfs_checksum_args { + string csumtype<>; + string path<>; +}; + +struct guestfs_checksum_ret { + string checksum<>; +}; + +struct guestfs_tar_in_args { + string directory<>; +}; + +struct guestfs_tar_out_args { + string directory<>; +}; + +struct guestfs_tgz_in_args { + string directory<>; +}; + +struct guestfs_tgz_out_args { + string directory<>; +}; + +struct guestfs_mount_ro_args { + string device<>; + string mountpoint<>; +}; + +struct guestfs_mount_options_args { + string options<>; + string device<>; + string mountpoint<>; +}; + +struct guestfs_mount_vfs_args { + string options<>; + string vfstype<>; + string device<>; + string mountpoint<>; +}; + +struct guestfs_debug_args { + string subcmd<>; + str extraargs<>; +}; + +struct guestfs_debug_ret { + string result<>; +}; + +struct guestfs_lvremove_args { + string device<>; +}; + +struct guestfs_vgremove_args { + string vgname<>; +}; + +struct guestfs_pvremove_args { + string device<>; +}; + +struct guestfs_set_e2label_args { + string device<>; + string label<>; +}; + +struct guestfs_get_e2label_args { + string device<>; +}; + +struct guestfs_get_e2label_ret { + string label<>; +}; + +struct guestfs_set_e2uuid_args { + string device<>; + string uuid<>; +}; + +struct guestfs_get_e2uuid_args { + string device<>; +}; + +struct guestfs_get_e2uuid_ret { + string uuid<>; +}; + enum guestfs_procedure { GUESTFS_PROC_MOUNT = 1, GUESTFS_PROC_SYNC = 2, @@ -551,14 +641,38 @@ enum guestfs_procedure { GUESTFS_PROC_BLOCKDEV_REREADPT = 65, GUESTFS_PROC_UPLOAD = 66, GUESTFS_PROC_DOWNLOAD = 67, + GUESTFS_PROC_CHECKSUM = 68, + GUESTFS_PROC_TAR_IN = 69, + GUESTFS_PROC_TAR_OUT = 70, + GUESTFS_PROC_TGZ_IN = 71, + GUESTFS_PROC_TGZ_OUT = 72, + GUESTFS_PROC_MOUNT_RO = 73, + GUESTFS_PROC_MOUNT_OPTIONS = 74, + GUESTFS_PROC_MOUNT_VFS = 75, + GUESTFS_PROC_DEBUG = 76, + GUESTFS_PROC_LVREMOVE = 77, + GUESTFS_PROC_VGREMOVE = 78, + GUESTFS_PROC_PVREMOVE = 79, + GUESTFS_PROC_SET_E2LABEL = 80, + GUESTFS_PROC_GET_E2LABEL = 81, + GUESTFS_PROC_SET_E2UUID = 82, + GUESTFS_PROC_GET_E2UUID = 83, 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 */ @@ -575,19 +689,6 @@ struct guestfs_message_error { string error_message; }; -/* For normal requests and replies (not involving any FileIn or - * FileOut parameters), the protocol is: - * - * For requests: - * total length (header + args, but not including length word itself) - * header - * guestfs_foo_args struct - * For replies: - * total length (as above) - * header - * guestfs_foo_ret struct - */ - struct guestfs_message_header { unsigned prog; /* GUESTFS_PROGRAM */ unsigned vers; /* GUESTFS_PROTOCOL_VERSION */ @@ -597,23 +698,6 @@ struct guestfs_message_header { guestfs_message_status status; }; -/* Chunked encoding used to transfer files, for FileIn and FileOut - * parameters. - * - * For requests which have >= 1 FileIn parameter: - * length of header + args (but not length word itself, and not chunks) - * header - * guestfs_foo_args struct - * sequence of chunks for FileIn param #0 - * sequence of chunks for FileIn param #1 etc - * - * For replies which have >= 1 FileOut parameter: - * length of header + ret (but not length word itself, and not chunks) - * header - * guestfs_foo_ret struct - * sequence of chunks for FileOut param #0 - * sequence of chunks for FileOut param #1 etc - */ const GUESTFS_MAX_CHUNK_SIZE = 8192; struct guestfs_chunk {