2008-04-10 07:30:52 +00:00
|
|
|
/*
|
|
|
|
* Copyright IBM Corp. 2008
|
|
|
|
*
|
|
|
|
* lxc_container.h: header file for fcns run inside container
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* David L. Leskovec <dlesko at linux.vnet.ibm.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2008-04-10 07:30:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LXC_CONTAINER_H
|
2010-03-09 18:22:22 +00:00
|
|
|
# define LXC_CONTAINER_H
|
2008-04-10 07:30:52 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "lxc_conf.h"
|
2015-08-20 13:46:17 +00:00
|
|
|
# include "lxc_domain.h"
|
2012-01-25 14:12:53 +00:00
|
|
|
# include "security/security_manager.h"
|
2008-08-13 10:14:47 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define LXC_DEV_MAJ_MEMORY 1
|
|
|
|
# define LXC_DEV_MIN_NULL 3
|
|
|
|
# define LXC_DEV_MIN_ZERO 5
|
|
|
|
# define LXC_DEV_MIN_FULL 7
|
|
|
|
# define LXC_DEV_MIN_RANDOM 8
|
|
|
|
# define LXC_DEV_MIN_URANDOM 9
|
2008-10-03 16:46:01 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define LXC_DEV_MAJ_TTY 5
|
|
|
|
# define LXC_DEV_MIN_TTY 0
|
|
|
|
# define LXC_DEV_MIN_CONSOLE 1
|
|
|
|
# define LXC_DEV_MIN_PTMX 2
|
2008-10-03 16:46:01 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define LXC_DEV_MAJ_PTY 136
|
2008-10-21 16:46:47 +00:00
|
|
|
|
2012-11-14 09:39:04 +00:00
|
|
|
# define LXC_DEV_MAJ_FUSE 10
|
|
|
|
# define LXC_DEV_MIN_FUSE 229
|
|
|
|
|
2008-08-13 10:52:15 +00:00
|
|
|
int lxcContainerSendContinue(int control);
|
2011-06-01 22:17:00 +00:00
|
|
|
int lxcContainerWaitForContinue(int control);
|
2008-08-13 10:14:47 +00:00
|
|
|
|
2008-08-13 12:50:55 +00:00
|
|
|
int lxcContainerStart(virDomainDefPtr def,
|
2012-01-25 14:12:53 +00:00
|
|
|
virSecurityManagerPtr securityDriver,
|
2012-07-03 11:06:38 +00:00
|
|
|
size_t nveths,
|
2008-08-13 10:52:15 +00:00
|
|
|
char **veths,
|
2013-07-09 17:15:45 +00:00
|
|
|
size_t npassFDs,
|
|
|
|
int *passFDs,
|
2008-08-13 10:25:34 +00:00
|
|
|
int control,
|
2011-06-02 15:52:32 +00:00
|
|
|
int handshakefd,
|
2015-08-20 13:46:17 +00:00
|
|
|
int *nsInheritFDs,
|
2013-07-09 17:15:45 +00:00
|
|
|
size_t nttyPaths,
|
|
|
|
char **ttyPaths);
|
2008-08-13 10:14:47 +00:00
|
|
|
|
2013-07-09 10:15:11 +00:00
|
|
|
int lxcContainerSetupHostdevCapsMakePath(const char *dev);
|
|
|
|
|
2012-12-10 22:28:09 +00:00
|
|
|
virArch lxcContainerGetAlt32bitArch(virArch arch);
|
2011-02-23 17:17:53 +00:00
|
|
|
|
2013-07-16 02:00:02 +00:00
|
|
|
int lxcContainerChown(virDomainDefPtr def, const char *path);
|
|
|
|
|
2014-02-05 14:10:02 +00:00
|
|
|
bool lxcIsBasicMountLocation(const char *path);
|
|
|
|
|
2008-04-10 07:30:52 +00:00
|
|
|
#endif /* LXC_CONTAINER_H */
|