static int instanciate_phys(struct lxc_netdev *);
static int instanciate_empty(struct lxc_netdev *);
-static instanciate_cb netdev_conf[MAXCONFTYPE + 1] = {
- [VETH] = instanciate_veth,
- [MACVLAN] = instanciate_macvlan,
- [VLAN] = instanciate_vlan,
- [PHYS] = instanciate_phys,
- [EMPTY] = instanciate_empty,
+static instanciate_cb netdev_conf[LXC_NET_MAXCONFTYPE + 1] = {
+ [LXC_NET_VETH] = instanciate_veth,
+ [LXC_NET_MACVLAN] = instanciate_macvlan,
+ [LXC_NET_VLAN] = instanciate_vlan,
+ [LXC_NET_PHYS] = instanciate_phys,
+ [LXC_NET_EMPTY] = instanciate_empty,
};
static struct mount_opt mount_opt[] = {
netdev = iterator->elem;
- if (netdev->type < 0 || netdev->type > MAXCONFTYPE) {
+ if (netdev->type < 0 || netdev->type > LXC_NET_MAXCONFTYPE) {
ERROR("invalid network configuration type '%d'",
netdev->type);
return -1;
lxc_list_add(network, list);
if (!strcmp(value, "veth"))
- netdev->type = VETH;
+ netdev->type = LXC_NET_VETH;
else if (!strcmp(value, "macvlan"))
- netdev->type = MACVLAN;
+ netdev->type = LXC_NET_MACVLAN;
else if (!strcmp(value, "vlan"))
- netdev->type = VLAN;
+ netdev->type = LXC_NET_VLAN;
else if (!strcmp(value, "phys"))
- netdev->type = PHYS;
+ netdev->type = LXC_NET_PHYS;
else if (!strcmp(value, "empty"))
- netdev->type = EMPTY;
+ netdev->type = LXC_NET_EMPTY;
else {
ERROR("invalid network type %s", value);
return -1;