2008-11-19 16:58:23 +00:00
|
|
|
/*
|
|
|
|
* config.h: VM configuration management
|
|
|
|
*
|
2010-03-01 23:38:28 +00:00
|
|
|
* Copyright (C) 2006, 2007, 2010 Red Hat, Inc.
|
2008-11-19 16:58:23 +00:00
|
|
|
* Copyright (C) 2006 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
* Author: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UML_CONF_H
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __UML_CONF_H
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "bridge.h"
|
|
|
|
# include "capabilities.h"
|
|
|
|
# include "network_conf.h"
|
|
|
|
# include "domain_conf.h"
|
2009-07-06 15:06:11 +00:00
|
|
|
# include "domain_event.h"
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "virterror_internal.h"
|
|
|
|
# include "threads.h"
|
2010-05-25 13:17:48 +00:00
|
|
|
# include "command.h"
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define umlDebug(fmt, ...) do {} while(0)
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define UML_CPUMASK_LEN CPU_SETSIZE
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define UML_MAX_CHAR_DEVICE 16
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
/* Main driver state */
|
|
|
|
struct uml_driver {
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutex lock;
|
2008-12-04 21:14:39 +00:00
|
|
|
|
2009-06-12 13:20:13 +00:00
|
|
|
int privileged;
|
|
|
|
|
2010-03-30 14:15:13 +00:00
|
|
|
unsigned long umlVersion;
|
2008-11-19 16:58:23 +00:00
|
|
|
int nextvmid;
|
|
|
|
|
|
|
|
virDomainObjList domains;
|
|
|
|
|
|
|
|
brControl *brctl;
|
|
|
|
char *configDir;
|
|
|
|
char *autostartDir;
|
|
|
|
char *logDir;
|
|
|
|
char *monitorDir;
|
|
|
|
|
|
|
|
int inotifyFD;
|
|
|
|
int inotifyWatch;
|
|
|
|
|
|
|
|
virCapsPtr caps;
|
2009-07-06 15:06:11 +00:00
|
|
|
|
|
|
|
/* Event handling */
|
|
|
|
virDomainEventStatePtr domainEventState;
|
2008-11-19 16:58:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-04-03 13:33:29 +00:00
|
|
|
# define umlReportError(code, ...) \
|
2011-04-16 08:30:22 +00:00
|
|
|
virReportErrorHelper(VIR_FROM_UML, code, __FILE__, \
|
2010-03-01 23:38:28 +00:00
|
|
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
virCapsPtr umlCapsInit (void);
|
|
|
|
|
2010-05-25 13:17:48 +00:00
|
|
|
virCommandPtr umlBuildCommandLine(virConnectPtr conn,
|
|
|
|
struct uml_driver *driver,
|
|
|
|
virDomainObjPtr dom);
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
#endif /* __UML_CONF_H */
|