e1761a3f03609259fe0dc46ee082dda3c6ecce78
[util-vserver.git] / namespace.h
1 #ifndef _VX_NAMESPACE_H
2 #define _VX_NAMESPACE_H
3
4 #include <linux/types.h>
5
6         
7 /* virtual host info names */
8
9 #define VCMD_vx_set_vhi_name    VC_CMD(VHOST, 1, 0)
10 #define VCMD_vx_get_vhi_name    VC_CMD(VHOST, 2, 0)
11
12 struct  vcmd_vx_vhi_name_v0 {
13         uint32_t field;
14         char name[65];
15 };
16
17
18 enum vx_vhi_name_field {
19         VHIN_CONTEXT=0,
20         VHIN_SYSNAME,
21         VHIN_NODENAME,
22         VHIN_RELEASE,
23         VHIN_VERSION,
24         VHIN_MACHINE,
25         VHIN_DOMAINNAME,
26 };
27
28
29 #ifdef  __KERNEL__
30 extern int vc_set_vhi_name(uint32_t, void *);
31 extern int vc_get_vhi_name(uint32_t, void *);
32
33 #endif  /* __KERNEL__ */
34
35 #define VCMD_enter_namespace    VC_CMD(PROCALT, 1, 0)
36 #define VCMD_cleanup_namespace  VC_CMD(PROCALT, 2, 0)
37 #define VCMD_set_namespace      VC_CMD(PROCALT, 3, 0)
38
39 #ifdef  __KERNEL__
40
41 struct vx_info;
42 struct namespace;
43 struct fs_struct;
44
45 extern int vx_set_namespace(struct vx_info *, struct namespace *, struct fs_struct *);
46
47 extern int vc_enter_namespace(uint32_t, void *);
48 extern int vc_cleanup_namespace(uint32_t, void *);
49 extern int vc_set_namespace(uint32_t, void *);
50
51 #endif  /* __KERNEL__ */
52 #endif  /* _VX_NAMESPACE_H */