Daemon and library are mostly talking to each other now.
[libguestfs.git] / src / guestfs_protocol.x
1 /* libguestfs generated file
2  * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
3  * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
4  *
5  * Copyright (C) 2009 Red Hat Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21
22 /* guestfs_mount */
23
24 struct guestfs_mount_args {
25   string device<>;
26   string mountpoint<>;
27 };
28
29 /* guestfs_sync */
30
31 /* guestfs_touch */
32
33 struct guestfs_touch_args {
34   string path<>;
35 };
36
37 enum guestfs_procedure {
38   GUESTFS_PROC_MOUNT = 1,
39   GUESTFS_PROC_SYNC = 2,
40   GUESTFS_PROC_TOUCH = 3,
41   GUESTFS_PROC_dummy
42 };
43
44 const GUESTFS_MESSAGE_MAX = 4194304;
45
46 const GUESTFS_PROGRAM = 0x2000F5F5;
47 const GUESTFS_PROTOCOL_VERSION = 1;
48
49 enum guestfs_message_direction {
50   GUESTFS_DIRECTION_CALL = 0,        /* client -> daemon */
51   GUESTFS_DIRECTION_REPLY = 1        /* daemon -> client */
52 };
53
54 enum guestfs_message_status {
55   GUESTFS_STATUS_OK = 0,
56   GUESTFS_STATUS_ERROR = 1
57 };
58
59 struct guestfs_message_header {
60   unsigned prog;                     /* GUESTFS_PROGRAM */
61   unsigned vers;                     /* GUESTFS_PROTOCOL_VERSION */
62   guestfs_procedure proc;            /* GUESTFS_PROC_x */
63   guestfs_message_direction direction;
64   unsigned serial;                   /* message serial number */
65   guestfs_message_status status;
66 };