]>
git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/namespace.h
2 * lxc: linux Container library
4 * (C) Copyright IBM Corp. 2007, 2009
7 * Daniel Lezcano <daniel.lezcano at free.fr>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef __LXC_NAMESPACE_H
24 #define __LXC_NAMESPACE_H
26 #include <sys/syscall.h>
32 # define CLONE_FS 0x00000200
35 # define CLONE_NEWNS 0x00020000
38 # define CLONE_NEWUTS 0x04000000
41 # define CLONE_NEWIPC 0x08000000
44 # define CLONE_NEWUSER 0x10000000
47 # define CLONE_NEWPID 0x20000000
50 # define CLONE_NEWNET 0x40000000
54 int __clone2(int (*__fn
) (void *__arg
), void *__child_stack_base
,
55 size_t __child_stack_size
, int __flags
, void *__arg
, ...);
57 int clone(int (*fn
)(void *), void *child_stack
,
58 int flags
, void *arg
, ...
59 /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ );
63 extern pid_t
lxc_clone(int (*fn
)(void *), void *arg
, int flags
);
65 extern int lxc_namespace_2_cloneflag(char *namespace);
66 extern int lxc_fill_namespace_flags(char *flaglist
, int *flags
);