admin_protocol-structs 2.7 KB
Newer Older
M
Martin Kletzander 已提交
1
/* -*- c -*- */
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
enum {
        VIR_TYPED_PARAM_INT = 1,
        VIR_TYPED_PARAM_UINT = 2,
        VIR_TYPED_PARAM_LLONG = 3,
        VIR_TYPED_PARAM_ULLONG = 4,
        VIR_TYPED_PARAM_DOUBLE = 5,
        VIR_TYPED_PARAM_BOOLEAN = 6,
        VIR_TYPED_PARAM_STRING = 7,
};
struct admin_typed_param_value {
        int                        type;
        union {
                int                i;
                u_int              ui;
                int64_t            l;
                uint64_t           ul;
                double             d;
                int                b;
                admin_nonnull_string s;
        } admin_typed_param_value_u;
};
struct admin_typed_param {
        admin_nonnull_string       field;
        admin_typed_param_value    value;
};
27 28 29
struct admin_nonnull_server {
        admin_nonnull_string       name;
};
30 31 32 33 34 35
struct admin_nonnull_client {
        admin_nonnull_server       srv;
        uint64_t                   id;
        int64_t                    timestamp;
        u_int                      transport;
};
36
struct admin_connect_open_args {
M
Martin Kletzander 已提交
37 38
        u_int                      flags;
};
39
struct admin_connect_get_lib_version_ret {
40 41
        uint64_t                   libVer;
};
42 43 44 45 46 47 48 49 50 51 52
struct admin_connect_list_servers_args {
        u_int                      need_results;
        u_int                      flags;
};
struct admin_connect_list_servers_ret {
        struct {
                u_int              servers_len;
                admin_nonnull_server * servers_val;
        } servers;
        u_int                      ret;
};
53 54 55 56 57 58 59
struct admin_connect_lookup_server_args {
        admin_nonnull_string       name;
        u_int                      flags;
};
struct admin_connect_lookup_server_ret {
        admin_nonnull_server       srv;
};
60 61 62 63 64 65 66 67 68 69
struct admin_server_get_threadpool_parameters_args {
        admin_nonnull_server       srv;
        u_int                      flags;
};
struct admin_server_get_threadpool_parameters_ret {
        struct {
                u_int              params_len;
                admin_typed_param * params_val;
        } params;
};
70 71 72 73 74 75 76 77
struct admin_server_set_threadpool_parameters_args {
        admin_nonnull_server       srv;
        struct {
                u_int              params_len;
                admin_typed_param * params_val;
        } params;
        u_int                      flags;
};
M
Martin Kletzander 已提交
78
enum admin_procedure {
79 80 81
        ADMIN_PROC_CONNECT_OPEN = 1,
        ADMIN_PROC_CONNECT_CLOSE = 2,
        ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3,
82
        ADMIN_PROC_CONNECT_LIST_SERVERS = 4,
83
        ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5,
84
        ADMIN_PROC_SERVER_GET_THREADPOOL_PARAMETERS = 6,
85
        ADMIN_PROC_SERVER_SET_THREADPOOL_PARAMETERS = 7,
M
Martin Kletzander 已提交
86
};