lxc_conf.h 1.5 KB
Newer Older
D
Daniel Veillard 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
/*
 * Copyright IBM Corp. 2008
 *
 * lxc_conf.h: header file for linux container config functions
 *
 * 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_CONF_H
#define LXC_CONF_H

#include <config.h>

#ifdef WITH_LXC

#include "internal.h"
32 33
#include "domain_conf.h"
#include "capabilities.h"
D
Daniel Veillard 已提交
34 35 36

typedef struct __lxc_driver lxc_driver_t;
struct __lxc_driver {
37 38 39
    virCapsPtr caps;

    virDomainObjPtr domains;
40
    char *configDir;
41
    char *autostartDir;
42 43
    char *stateDir;
    char *logDir;
44
    int have_netns;
D
Daniel Veillard 已提交
45 46
};

47
int lxcLoadDriverConfig(lxc_driver_t *driver);
48
virCapsPtr lxcCapsInit(void);
D
Daniel Veillard 已提交
49 50 51 52 53 54 55 56 57

void lxcError(virConnectPtr conn,
              virDomainPtr dom,
              int code, const char *fmt, ...)
    ATTRIBUTE_FORMAT(printf,4,5);

#endif /* WITH_LXC */
#endif /* LXC_CONF_H */