X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs_protocol.x;h=be0efdbbb3bb4f6c36c5cbc4383a5608bd31fc1d;hb=8e570870f577ff0c3db074f88924633b559af5d4;hp=59bad589c50982f696fe065f4a05c950b8672563;hpb=b6233d1fff5d9a6bbc61e7123a57bdd7d8cbc792;p=libguestfs.git diff --git a/src/guestfs_protocol.x b/src/guestfs_protocol.x index 59bad58..be0efdb 100644 --- a/src/guestfs_protocol.x +++ b/src/guestfs_protocol.x @@ -1,5 +1,8 @@ -/* libguestfs - * Copyright (C) 2009 Red Hat Inc. +/* libguestfs generated file + * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'. + * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. + * + * Copyright (C) 2009 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,9 +17,105 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * This file describes the client [library] to server [daemon in - * guest] protocol. As far as possible, all code in the library is - * automatically generated from this protocol description using - * rpcgen and the perl script 'generator.pl'. */ + +typedef string str<>; + +/* guestfs_mount */ + +struct guestfs_mount_args { + string device<>; + string mountpoint<>; +}; + +/* guestfs_sync */ + +/* guestfs_touch */ + +struct guestfs_touch_args { + string path<>; +}; + +/* guestfs_cat */ + +struct guestfs_cat_args { + string path<>; +}; + +struct guestfs_cat_ret { + string content<>; +}; + +/* guestfs_ll */ + +struct guestfs_ll_args { + string directory<>; +}; + +struct guestfs_ll_ret { + string listing<>; +}; + +/* guestfs_ls */ + +struct guestfs_ls_args { + string directory<>; +}; + +struct guestfs_ls_ret { + str listing<>; +}; + +/* guestfs_list_devices */ + +struct guestfs_list_devices_ret { + str devices<>; +}; + +/* guestfs_list_partitions */ + +struct guestfs_list_partitions_ret { + str partitions<>; +}; + +enum guestfs_procedure { + GUESTFS_PROC_MOUNT = 1, + GUESTFS_PROC_SYNC = 2, + GUESTFS_PROC_TOUCH = 3, + GUESTFS_PROC_CAT = 4, + GUESTFS_PROC_LL = 5, + GUESTFS_PROC_LS = 6, + GUESTFS_PROC_LIST_DEVICES = 7, + GUESTFS_PROC_LIST_PARTITIONS = 8, + GUESTFS_PROC_dummy +}; + +const GUESTFS_MESSAGE_MAX = 4194304; + +const GUESTFS_PROGRAM = 0x2000F5F5; +const GUESTFS_PROTOCOL_VERSION = 1; + +enum guestfs_message_direction { + GUESTFS_DIRECTION_CALL = 0, /* client -> daemon */ + GUESTFS_DIRECTION_REPLY = 1 /* daemon -> client */ +}; + +enum guestfs_message_status { + GUESTFS_STATUS_OK = 0, + GUESTFS_STATUS_ERROR = 1 +}; + +const GUESTFS_ERROR_LEN = 256; + +struct guestfs_message_error { + string error; /* error message */ +}; + +struct guestfs_message_header { + unsigned prog; /* GUESTFS_PROGRAM */ + unsigned vers; /* GUESTFS_PROTOCOL_VERSION */ + guestfs_procedure proc; /* GUESTFS_PROC_x */ + guestfs_message_direction direction; + unsigned serial; /* message serial number */ + guestfs_message_status status; +};