mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
8b1f04693d
Opposite operation to virAdmServerGetClientLimits. Understandably though, setting values for current number of clients connected or still waiting for authentication does not make sense, since changes to these values are event dependent, i.e. a client connects - counter is increased. Thus only the limits to maximum clients connected and waiting for authentication can be set. Should a request for other controls to be set arrive (provided such a setting will be first introduced to the config), the set of configuration controls can be later expanded (thanks to typed params). This patch also introduces a constraint that the maximum number of clients waiting for authentication has to be less than the overall maximum number of clients connected and any attempt to violate this constraint will be denied. Signed-off-by: Erik Skultety <eskultet@redhat.com>
145 lines
4.5 KiB
C
145 lines
4.5 KiB
C
/* -*- c -*- */
|
|
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;
|
|
};
|
|
struct admin_nonnull_server {
|
|
admin_nonnull_string name;
|
|
};
|
|
struct admin_nonnull_client {
|
|
admin_nonnull_server srv;
|
|
uint64_t id;
|
|
int64_t timestamp;
|
|
u_int transport;
|
|
};
|
|
struct admin_connect_open_args {
|
|
u_int flags;
|
|
};
|
|
struct admin_connect_get_lib_version_ret {
|
|
uint64_t libVer;
|
|
};
|
|
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;
|
|
};
|
|
struct admin_connect_lookup_server_args {
|
|
admin_nonnull_string name;
|
|
u_int flags;
|
|
};
|
|
struct admin_connect_lookup_server_ret {
|
|
admin_nonnull_server srv;
|
|
};
|
|
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;
|
|
};
|
|
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;
|
|
};
|
|
struct admin_server_list_clients_args {
|
|
admin_nonnull_server srv;
|
|
u_int need_results;
|
|
u_int flags;
|
|
};
|
|
struct admin_server_list_clients_ret {
|
|
struct {
|
|
u_int clients_len;
|
|
admin_nonnull_client * clients_val;
|
|
} clients;
|
|
u_int ret;
|
|
};
|
|
struct admin_server_lookup_client_args {
|
|
admin_nonnull_server srv;
|
|
uint64_t id;
|
|
u_int flags;
|
|
};
|
|
struct admin_server_lookup_client_ret {
|
|
admin_nonnull_client clnt;
|
|
};
|
|
struct admin_client_get_info_args {
|
|
admin_nonnull_client clnt;
|
|
u_int flags;
|
|
};
|
|
struct admin_client_get_info_ret {
|
|
struct {
|
|
u_int params_len;
|
|
admin_typed_param * params_val;
|
|
} params;
|
|
};
|
|
struct admin_client_close_args {
|
|
admin_nonnull_client clnt;
|
|
u_int flags;
|
|
};
|
|
struct admin_server_get_client_limits_args {
|
|
admin_nonnull_server srv;
|
|
u_int flags;
|
|
};
|
|
struct admin_server_get_client_limits_ret {
|
|
struct {
|
|
u_int params_len;
|
|
admin_typed_param * params_val;
|
|
} params;
|
|
};
|
|
struct admin_server_set_client_limits_args {
|
|
admin_nonnull_server srv;
|
|
struct {
|
|
u_int params_len;
|
|
admin_typed_param * params_val;
|
|
} params;
|
|
u_int flags;
|
|
};
|
|
enum admin_procedure {
|
|
ADMIN_PROC_CONNECT_OPEN = 1,
|
|
ADMIN_PROC_CONNECT_CLOSE = 2,
|
|
ADMIN_PROC_CONNECT_GET_LIB_VERSION = 3,
|
|
ADMIN_PROC_CONNECT_LIST_SERVERS = 4,
|
|
ADMIN_PROC_CONNECT_LOOKUP_SERVER = 5,
|
|
ADMIN_PROC_SERVER_GET_THREADPOOL_PARAMETERS = 6,
|
|
ADMIN_PROC_SERVER_SET_THREADPOOL_PARAMETERS = 7,
|
|
ADMIN_PROC_SERVER_LIST_CLIENTS = 8,
|
|
ADMIN_PROC_SERVER_LOOKUP_CLIENT = 9,
|
|
ADMIN_PROC_CLIENT_GET_INFO = 10,
|
|
ADMIN_PROC_CLIENT_CLOSE = 11,
|
|
ADMIN_PROC_SERVER_GET_CLIENT_LIMITS = 12,
|
|
ADMIN_PROC_SERVER_SET_CLIENT_LIMITS = 13,
|
|
};
|