diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-11-09 19:54:28 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-11-09 19:54:28 +0000 |
commit | c5c301ac774d8cb36ccbc775bb7f1d7005d78a71 (patch) | |
tree | 8fcd7201e14424ae0b5041f186087e06639a69f6 /tools/libxl/libxl_utils.h | |
parent | 85f5921bdf8216ae1fd9cb5963f897562f1b2380 (diff) | |
download | xen-c5c301ac774d8cb36ccbc775bb7f1d7005d78a71.tar.gz xen-c5c301ac774d8cb36ccbc775bb7f1d7005d78a71.tar.bz2 xen-c5c301ac774d8cb36ccbc775bb7f1d7005d78a71.zip |
libxenlight: initial libxenlight implementation under tools/libxl
Signed-off-by: Vincent Hanquez <Vincent.Hanquez@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.h')
-rw-r--r-- | tools/libxl/libxl_utils.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h new file mode 100644 index 0000000000..d5cc2c09e9 --- /dev/null +++ b/tools/libxl/libxl_utils.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2009 Citrix Ltd. + * Author Stefano Stabellini <stefano.stabellini@eu.citrix.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; version 2.1 only. with the special + * exception on linking described in file LICENSE. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + */ + +#ifndef LIBXL_UTILS_H +#define LIBXL_UTILS_H + +#include "libxl.h" + +#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" + +unsigned long libxl_get_required_shadow_memory(unsigned long maxmem_kb, unsigned int smp_cpus); +int libxl_name_to_domid(struct libxl_ctx *ctx, char *name, uint32_t *domid); +char *libxl_domid_to_name(struct libxl_ctx *ctx, uint32_t domid); +int libxl_uuid_to_domid(struct libxl_ctx *ctx, uint8_t *uuid, uint32_t *domid); +int libxl_domid_to_uuid(struct libxl_ctx *ctx, uint8_t **uuid, uint32_t domid); +int libxl_is_uuid(char *s); +uint8_t *string_to_uuid(struct libxl_ctx *ctx, char *s); +char *uuid_to_string(struct libxl_ctx *ctx, uint8_t *uuid); +int libxl_param_to_domid(struct libxl_ctx *ctx, char *p, uint32_t *domid); + +#endif + |