lxc_process.h 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Copyright (C) 2010-2012 Red Hat, Inc.
 * Copyright IBM Corp. 2008
 *
 * lxc_process.h: LXC process lifecycle management
 *
 * 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
18
 * License along with this library.  If not, see
O
Osier Yang 已提交
19
 * <http://www.gnu.org/licenses/>.
20 21 22 23 24 25 26
 */

#ifndef __LXC_PROCESS_H__
# define __LXC_PROCESS_H__

# include "lxc_conf.h"

27
int virLXCProcessStart(virConnectPtr conn,
28
                       virLXCDriverPtr  driver,
29
                       virDomainObjPtr vm,
30
                       unsigned int nfiles, int *files,
31 32
                       bool autoDestroy,
                       virDomainRunningReason reason);
33
int virLXCProcessStop(virLXCDriverPtr driver,
34 35
                      virDomainObjPtr vm,
                      virDomainShutoffReason reason);
36

37
void virLXCProcessAutoDestroyRun(virLXCDriverPtr driver,
38
                                 virConnectPtr conn);
39 40
void virLXCProcessAutoDestroyShutdown(virLXCDriverPtr driver);
int virLXCProcessAutoDestroyAdd(virLXCDriverPtr driver,
41 42
                                virDomainObjPtr vm,
                                virConnectPtr conn);
43
int virLXCProcessAutoDestroyRemove(virLXCDriverPtr driver,
44 45
                                   virDomainObjPtr vm);

46 47
void virLXCProcessAutostartAll(virLXCDriverPtr driver);
int virLXCProcessReconnectAll(virLXCDriverPtr driver,
48
                              virDomainObjListPtr doms);
49

50 51 52 53 54 55 56 57
char *virLXCProcessSetupInterfaceBridged(virConnectPtr conn,
                                         virDomainDefPtr vm,
                                         virDomainNetDefPtr net,
                                         const char *brname);
char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn,
                                        virDomainDefPtr def,
                                        virDomainNetDefPtr net);

58
#endif /* __LXC_PROCESS_H__ */