]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/confile_utils.h
network: preserve backwards compatibility
[mirror_lxc.git] / src / lxc / confile_utils.h
1 /* liblxcapi
2 *
3 * Copyright © 2017 Christian Brauner <christian.brauner@ubuntu.com>.
4 * Copyright © 2017 Canonical Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef __LXC_CONFILE_UTILS_H
21 #define __LXC_CONFILE_UTILS_H
22
23 #include <stdbool.h>
24
25 #include "conf.h"
26
27 extern int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
28 unsigned long *hostid, unsigned long *range);
29
30 extern bool lxc_config_value_empty(const char *value);
31 extern struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx,
32 bool tail);
33 extern struct lxc_netdev *
34 lxc_get_netdev_by_idx(struct lxc_conf *conf, unsigned int idx, bool allocate);
35 extern void lxc_log_configured_netdevs(const struct lxc_conf *conf);
36 extern bool lxc_remove_nic_by_idx(struct lxc_conf *conf, unsigned int idx);
37 extern void lxc_free_networks(struct lxc_list *networks);
38
39 #endif /* __LXC_CONFILE_UTILS_H */