/***
This file is part of systemd.
Copyright 2013 Tom Gundersen <teg@jklm.no>
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.
systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "conf-parser.h"
#include "networkd-netdev-macvlan.h"
#include "string-table.h"
[NETDEV_MACVLAN_MODE_PRIVATE] = "private",
[NETDEV_MACVLAN_MODE_VEPA] = "vepa",
[NETDEV_MACVLAN_MODE_BRIDGE] = "bridge",
[NETDEV_MACVLAN_MODE_PASSTHRU] = "passthru",
};
DEFINE_CONFIG_PARSE_ENUM(config_parse_macvlan_mode, macvlan_mode, MacVlanMode, "Failed to parse macvlan mode");
static int netdev_macvlan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *req) {
MacVlan *m;
int r;
else
assert(m);
if (m->mode != _NETDEV_MACVLAN_MODE_INVALID) {
if (r < 0)
}
return 0;
}
MacVlan *m;
assert(n);
if (n->kind == NETDEV_KIND_MACVLAN)
m = MACVLAN(n);
else
m = MACVTAP(n);
assert(m);
}
.object_size = sizeof(MacVlan),
.init = macvlan_init,
.sections = "Match\0NetDev\0MACVTAP\0",
};
.object_size = sizeof(MacVlan),
.init = macvlan_init,
.sections = "Match\0NetDev\0MACVLAN\0",
};