1 #ifndef _LINUX_VIRTUAL_H
2 #define _LINUX_VIRTUAL_H
4 #include <linux/types.h>
6 #define VC_CATEGORY(c) (((c) >> 24) & 0x3F)
7 #define VC_COMMAND(c) (((c) >> 16) & 0xFF)
8 #define VC_VERSION(c) ((c) & 0xFFF)
10 #define VC_CMD(c,i,v) ((((VC_CAT_ ## c) & 0x3F) << 24) \
11 | (((i) & 0xFF) << 16) | ((v) & 0xFFF))
13 #define VC_CAT_VERSION 0
14 #define VC_CAT_PROCESS 1
15 #define VC_CAT_MEMORY 2
16 #define VC_CAT_NETWORK 3
18 #define VC_CAT_LIMITS 8
19 #define VC_CAT_QUOTA 9
21 #define VC_CAT_OTHER 62
22 #define VC_CAT_COMPAT 63
24 /* interface version */
26 //#define VC_VERSION 0x00010000
32 #define VCMD_get_version VC_CMD(VERSION, 0, 0)
35 /* compatibiliy vserver commands */
37 #define VCMD_new_s_context VC_CMD(COMPAT, 1, 1)
38 #define VCMD_set_ipv4root VC_CMD(COMPAT, 2, 3)
40 /* compatibiliy vserver arguments */
42 struct vcmd_new_s_context_v1 {
47 #define NB_IPV4ROOT 16
49 struct vcmd_set_ipv4root_v3 {
50 /* number of pairs in id */
55 } ip_mask_pair[NB_IPV4ROOT];
59 #endif /* _LINUX_VIRTUAL_H */