X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fvirtual.h;h=66add485a31fa48cb6934d100c0e3ca4a38aef4b;hb=baf517f8c35f7b0eea57205866c0f6018db916a2;hp=2381db7c30096ed805b0269b9b1cc46d8da69ce0;hpb=c0f7feeeebc14908bcfc50297515650ba62698ae;p=util-vserver.git diff --git a/util-vserver/lib/virtual.h b/util-vserver/lib/virtual.h index 2381db7..66add48 100644 --- a/util-vserver/lib/virtual.h +++ b/util-vserver/lib/virtual.h @@ -48,7 +48,11 @@ */ #define VC_CAT_VERSION 0 - +#define VC_CAT_VSETUP 1 +#define VC_CAT_VHOST 2 + +#define VC_CAT_PROCALT 10 +#define VC_CAT_PROCMIG 11 #define VC_CAT_PROCTRL 12 #define VC_CAT_SCHED 14 @@ -56,11 +60,14 @@ #define VC_CAT_VINFO 46 +#define VC_CAT_FLAGS 59 #define VC_CAT_RLIMIT 60 #define VC_CAT_SYSTEST 61 #define VC_CAT_COMPAT 63 - + + + /* interface version */ #define VCI_VERSION 0x00010004 @@ -77,6 +84,10 @@ #define VCMD_new_s_context VC_CMD(COMPAT, 1, 1) #define VCMD_set_ipv4root VC_CMD(COMPAT, 2, 3) +#define VCMD_enter_namespace VC_CMD(PROCALT, 1, 0) +#define VCMD_cleanup_namespace VC_CMD(PROCALT, 2, 0) +#define VCMD_set_namespace VC_CMD(PROCALT, 3, 0) + /* compatibiliy vserver arguments */ struct vcmd_new_s_context_v1 { @@ -149,14 +160,16 @@ struct vcmd_tbf_sched_v1 { /* inode vserver commands */ -#define VCMD_get_iattr VC_CMD(INODE, 1, 0) -#define VCMD_set_iattr VC_CMD(INODE, 2, 0) +#define VCMD_get_iattr_v0 VC_CMD(INODE, 1, 0) +#define VCMD_set_iattr_v0 VC_CMD(INODE, 2, 0) +#define VCMD_get_iattr VC_CMD(INODE, 1, 1) +#define VCMD_set_iattr VC_CMD(INODE, 2, 1) -struct vcmd_ctx_iattr_v0 { - uint64_t ino; - uint32_t xid; - uint32_t flags; - uint32_t mask; +struct vcmd_ctx_iattr_v1 { + const char *file_name; + uint32_t xid; + uint32_t flags; + uint32_t mask; }; #define IATTR_XID 0x01000000 @@ -185,4 +198,41 @@ struct vcmd_vx_info_v0 { }; +#define VCMD_vx_set_vhi_name VC_CMD(VHOST, 1, 0) +#define VCMD_vx_get_vhi_name VC_CMD(VHOST, 2, 0) + +struct vcmd_vx_vhi_name_v0 { + uint32_t field; + char name[65]; +}; + +enum vx_vhi_name_field { + VHIN_CONTEXT=0, + VHIN_SYSNAME, + VHIN_NODENAME, + VHIN_RELEASE, + VHIN_VERSION, + VHIN_MACHINE, + VHIN_DOMAINNAME, +}; + +#define VCMD_create_context VC_CMD(VSETUP, 1, 0) +#define VCMD_migrate_context VC_CMD(PROCMIG, 1, 0) + +#define VCMD_get_flags VC_CMD(FLAGS, 1, 0) +#define VCMD_set_flags VC_CMD(FLAGS, 2, 0) +struct vcmd_ctx_flags_v0 { + uint64_t flagword; + uint64_t mask; +}; + + +#define VCMD_get_ccaps VC_CMD(FLAGS, 3, 0) +#define VCMD_set_ccaps VC_CMD(FLAGS, 4, 0) +struct vcmd_ctx_caps_v0 { + uint64_t scaps; + uint64_t ccaps; + uint64_t cmask; +}; + #endif /* _LINUX_VIRTUAL_H */