1 #ifndef _LINUX_VIRTUAL_H
2 #define _LINUX_VIRTUAL_H
4 #define VC_CATEGORY(c) (((c) >> 24) & 0x3F)
5 #define VC_COMMAND(c) (((c) >> 16) & 0xFF)
6 #define VC_VERSION(c) ((c) & 0xFFF)
8 #define VC_CMD(c,i,v) ((((VC_CAT_ ## c) & 0x3F) << 24) \
9 | (((i) & 0xFF) << 16) | ((v) & 0xFFF))
11 #define VC_CAT_VERSION 0
12 #define VC_CAT_PROCESS 1
13 #define VC_CAT_MEMORY 2
14 #define VC_CAT_NETWORK 3
16 #define VC_CAT_LIMITS 8
17 #define VC_CAT_QUOTA 9
19 #define VC_CAT_OTHER 62
20 #define VC_CAT_COMPAT 63
22 /* interface version */
24 //#define VC_VERSION 0x00010000
30 #define VCMD_get_version VC_CMD(VERSION, 0, 0)
33 /* compatibiliy vserver commands */
35 #define VCMD_new_s_context VC_CMD(COMPAT, 1, 1)
36 #define VCMD_set_ipv4root VC_CMD(COMPAT, 2, 3)
38 /* compatibiliy vserver arguments */
40 struct vcmd_new_s_context_v1 {
45 #define NB_IPV4ROOT 16
47 struct vcmd_set_ipv4root_v3 {
48 /* number of pairs in id */
53 } ip_mask_pair[NB_IPV4ROOT];
57 #endif /* _LINUX_VIRTUAL_H */