networkd-network.c revision bfa695b5cc37aeb78737c57c84e9e69ea08152c0
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher This file is part of systemd.
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher Copyright 2013 Tom Gundersen <teg@jklm.no>
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher systemd is free software; you can redistribute it and/or modify it
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher under the terms of the GNU Lesser General Public License as published by
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher the Free Software Foundation; either version 2.1 of the License, or
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher (at your option) any later version.
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher systemd is distributed in the hope that it will be useful, but
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher WITHOUT ANY WARRANTY; without even the implied warranty of
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher Lesser General Public License for more details.
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher You should have received a copy of the GNU Lesser General Public License
a4cce2c98eedecb5d3b47da62104634cae268434Stephen Gallagher along with systemd; If not, see <http://www.gnu.org/licenses/>.
60cab26b12df9a2153823972cde0c38ca86e01b9Yassir Elleystatic int network_load_one(Manager *manager, const char *filename) {
60cab26b12df9a2153823972cde0c38ca86e01b9Yassir Elley _cleanup_network_free_ Network *network = NULL;
if (!file) {
return -errno;
if (!network)
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
false, false, true, network);
Iterator i;
if (!network)
ifname)) {
return -ENOENT;
return -EINVAL;
return -errno;
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {
if (!kind_string)
return log_oom();
for (p = kind_string; *p; p++)
*p = tolower(*p);
switch (kind) {
case NETDEV_KIND_BRIDGE:
case NETDEV_KIND_BOND:
case NETDEV_KIND_VLAN:
case NETDEV_KIND_MACVLAN:
case NETDEV_KIND_VXLAN:
const char *filename,
unsigned line,
const char *section,
unsigned section_line,
const char *lvalue,
int ltype,
const char *rvalue,
void *data,
void *userdata) {