]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/confile.h
use same ifndef/define format for all headers
[mirror_lxc.git] / src / lxc / confile.h
CommitLineData
c2cc9f0a 1/*
2 * lxc: linux Container library
3 *
4 * (C) Copyright IBM Corp. 2007, 2008
5 *
6 * Authors:
9afe19d6 7 * Daniel Lezcano <daniel.lezcano at free.fr>
c2cc9f0a 8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
250b1eec 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
c2cc9f0a 22 */
8173e600 23
f1a4a029
ÇO
24#ifndef __LXC_CONFILE_H
25#define __LXC_CONFILE_H
26
8173e600 27#include <stdio.h>
f2363e38 28#include <lxc/attach_options.h>
c2cc9f0a 29
00b3c2e2 30struct lxc_conf;
62e46035 31struct lxc_list;
00b3c2e2 32
12a50cc6 33typedef int (*config_cb)(const char *, const char *, struct lxc_conf *);
72d0e1cb
SG
34struct lxc_config_t {
35 char *name;
36 config_cb cb;
37};
38
39extern struct lxc_config_t *lxc_getconfig(const char *key);
12a50cc6 40extern int lxc_list_nicconfigs(struct lxc_conf *c, const char *key, char *retv, int inlen);
72d0e1cb 41extern int lxc_listconfigs(char *retv, int inlen);
c2cc9f0a 42extern int lxc_config_read(const char *file, struct lxc_conf *conf);
c2cc9f0a 43
62e46035 44extern int lxc_config_define_add(struct lxc_list *defines, char* arg);
226a18d6
DL
45extern int lxc_config_define_load(struct lxc_list *defines,
46 struct lxc_conf *conf);
e16dad10 47
525f0002
CS
48/* needed for lxc-attach */
49extern signed long lxc_config_parse_arch(const char *arch);
4d69b293 50extern int lxc_fill_elevated_privileges(char *flaglist, int *flags);
525f0002 51
12a50cc6
DE
52extern int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv, int inlen);
53extern int lxc_clear_config_item(struct lxc_conf *c, const char *key);
72d0e1cb 54extern void write_config(FILE *fout, struct lxc_conf *c);
e16dad10 55#endif