X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fvserver%2Fcvirt_cmd.h;h=8cb1641a478e9fd87ee74fbcf4979b7fe348c156;hb=refs%2Fheads%2Fvserver;hp=368f527327bc024da95e3a346bf89b5d1619381c;hpb=ae17e7656036804d46ec431260821023d4c8cb83;p=linux-2.6.git diff --git a/include/linux/vserver/cvirt_cmd.h b/include/linux/vserver/cvirt_cmd.h index 368f52732..8cb1641a4 100644 --- a/include/linux/vserver/cvirt_cmd.h +++ b/include/linux/vserver/cvirt_cmd.h @@ -1,7 +1,53 @@ #ifndef _VX_CVIRT_CMD_H #define _VX_CVIRT_CMD_H -/* cvirt vserver commands */ +/* virtual host info name commands */ +#define VCMD_set_vhi_name VC_CMD(VHOST, 1, 0) +#define VCMD_get_vhi_name VC_CMD(VHOST, 2, 0) + +struct vcmd_vhi_name_v0 { + uint32_t field; + char name[65]; +}; + + +enum vhi_name_field { + VHIN_CONTEXT=0, + VHIN_SYSNAME, + VHIN_NODENAME, + VHIN_RELEASE, + VHIN_VERSION, + VHIN_MACHINE, + VHIN_DOMAINNAME, +}; + + +#ifdef __KERNEL__ + +#include + +extern int vc_set_vhi_name(struct vx_info *, void __user *); +extern int vc_get_vhi_name(struct vx_info *, void __user *); + +#endif /* __KERNEL__ */ + +#define VCMD_virt_stat VC_CMD(VSTAT, 3, 0) + +struct vcmd_virt_stat_v0 { + uint64_t offset; + uint64_t uptime; + uint32_t nr_threads; + uint32_t nr_running; + uint32_t nr_uninterruptible; + uint32_t nr_onhold; + uint32_t nr_forks; + uint32_t load[3]; +}; + +#ifdef __KERNEL__ +extern int vc_virt_stat(struct vx_info *, void __user *); + +#endif /* __KERNEL__ */ #endif /* _VX_CVIRT_CMD_H */