f058983fa87a63ae5351284f0600aaf423ebe9d6
[util-vserver.git] / kernel / legacy.h
1 #ifndef _VX_LEGACY_H
2 #define _VX_LEGACY_H
3
4 #include "switch.h"
5
6 /*  compatibiliy vserver commands */
7
8 #define VCMD_new_s_context      VC_CMD(COMPAT, 1, 1)
9 #define VCMD_set_ipv4root       VC_CMD(COMPAT, 2, 3)
10
11 #define VCMD_create_context     VC_CMD(VSETUP, 1, 0)
12
13 /*  compatibiliy vserver arguments */
14
15 struct  vcmd_new_s_context_v1 {
16         uint32_t remove_cap;
17         uint32_t flags;
18 };
19
20 struct  vcmd_set_ipv4root_v3 {
21         /* number of pairs in id */
22         uint32_t broadcast;
23         struct {
24                 uint32_t ip;
25                 uint32_t mask;
26         } nx_mask_pair[NB_IPV4ROOT];
27 };
28
29
30 #define VX_INFO_LOCK            1       /* Can't request a new vx_id */
31 #define VX_INFO_NPROC           4       /* Limit number of processes in a context */
32 #define VX_INFO_PRIVATE         8       /* Noone can join this security context */
33 #define VX_INFO_INIT            16      /* This process wants to become the */
34                                         /* logical process 1 of the security */
35                                         /* context */
36 #define VX_INFO_HIDEINFO        32      /* Hide some information in /proc */
37 #define VX_INFO_ULIMIT          64      /* Use ulimit of the current process */
38                                         /* to become the global limits */
39                                         /* of the context */
40 #define VX_INFO_NAMESPACE       128     /* save private namespace */
41
42
43 #ifdef  __KERNEL__
44 extern int vc_new_s_context(uint32_t, void __user *);
45 extern int vc_set_ipv4root(uint32_t, void __user *);
46
47 #endif  /* __KERNEL__ */
48 #endif  /* _VX_LEGACY_H */