added doxygen annnotations
[util-vserver.git] / util-vserver / lib / virtual.h
index 3abd771..49784be 100644 (file)
 */
 
 #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
 
 #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
 #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 {
@@ -131,21 +141,20 @@ struct  vcmd_ctx_rlimit_mask_v0 {
 
 /* scheduler vserver commands */
 
-#define VCMD_get_sched         VC_CMD(SCHED, 1, 1)
-#define VCMD_set_sched         VC_CMD(SCHED, 2, 1)
+#define VCMD_set_sched         VC_CMD(SCHED, 1, 1)
 
+/* Options - these ones enable or disable the CTX_SCHED flag */
+#define TBF_SCHED_ENABLE       0x0001
+#define TBF_SCHED_DISABLE      0x0002
 
 /* Structure for context's TBF scheduling priorities */
-
-struct  vcmd_tbf_sched_v1 {
-       uint32_t fill_level;
-       uint32_t fill_rate;
-       uint32_t period;
-       uint32_t bucket_size;
+struct  vcmd_set_sched_v1 {
+       int32_t fill_rate;
+       int32_t period;
+       int32_t fill_level;
+       int32_t bucket_size;
 };
 
-#define TBFS_PERIOD_AUTO       (0ULL)
-#define TBFS_KEEP_VALUE                (~0ULL)
 
 
 /*  inode vserver commands */
@@ -170,7 +179,7 @@ struct  vcmd_ctx_iattr_v1 {
 
 #define IATTR_BARRIER  0x00010000
 #define        IATTR_IUNLINK   0x00020000
-
+#define IATTR_IMMUTABLE        0x00040000
 
 
 /* vinfo commands */
@@ -206,4 +215,23 @@ enum vx_vhi_name_field {
        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 bcaps;
+        uint64_t ccaps;
+        uint64_t cmask;
+};
+
 #endif /* _LINUX_VIRTUAL_H */