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
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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"
|
2012-01-25 14:12:53 +00:00
|
|
|
# include "security/security_manager.h"
|
2008-08-13 10:14:47 +00:00
|
|
|
|
2008-08-13 10:25:34 +00:00
|
|
|
enum {
|
|
|
|
LXC_CONTAINER_FEATURE_NET = (1 << 0),
|
2009-04-20 12:27:12 +00:00
|
|
|
LXC_CONTAINER_FEATURE_USER = (1 << 1),
|
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
|
|
|
|
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,
|
2008-08-13 10:52:15 +00:00
|
|
|
unsigned int nveths,
|
|
|
|
char **veths,
|
2008-08-13 10:25:34 +00:00
|
|
|
int control,
|
2011-06-02 15:52:32 +00:00
|
|
|
int handshakefd,
|
2011-10-20 08:44:31 +00:00
|
|
|
char **ttyPaths,
|
|
|
|
size_t nttyPaths);
|
2008-08-13 10:14:47 +00:00
|
|
|
|
2008-08-13 10:25:34 +00:00
|
|
|
int lxcContainerAvailable(int features);
|
2008-04-10 07:30:52 +00:00
|
|
|
|
2011-02-23 17:17:53 +00:00
|
|
|
const char *lxcContainerGetAlt32bitArch(const char *arch);
|
|
|
|
|
2008-04-10 07:30:52 +00:00
|
|
|
#endif /* LXC_CONTAINER_H */
|