]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libsystemd-network/network-internal.h
sd-network: expose both admin and operational state directly
[thirdparty/systemd.git] / src / libsystemd-network / network-internal.h
CommitLineData
be32eb9b
TG
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3/***
4 This file is part of systemd.
5
6 Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20***/
21
22#pragma once
23
24#include <netinet/ether.h>
377a218f 25#include <netinet/in.h>
b3e01314 26#include <stdbool.h>
be32eb9b 27
c6f7c917 28#include "udev.h"
2cc412b5
TG
29#include "condition-util.h"
30
be32eb9b
TG
31bool net_match_config(const struct ether_addr *match_mac,
32 const char *match_path,
33 const char *match_driver,
34 const char *match_type,
35 const char *match_name,
2cc412b5
TG
36 Condition *match_host,
37 Condition *match_virt,
38 Condition *match_kernel,
edbb03e9 39 Condition *match_arch,
505f8da7 40 const struct ether_addr *dev_mac,
b3e01314 41 const char *dev_path,
bf175aaf 42 const char *dev_parent_driver,
b3e01314
TG
43 const char *dev_driver,
44 const char *dev_type,
45 const char *dev_name);
be32eb9b 46
377a218f
TG
47unsigned net_netmask_to_prefixlen(const struct in_addr *netmask);
48
2cc412b5
TG
49int config_parse_net_condition(const char *unit, const char *filename, unsigned line,
50 const char *section, unsigned section_line, const char *lvalue,
51 int ltype, const char *rvalue, void *data, void *userdata);
52
be32eb9b 53int config_parse_hwaddr(const char *unit, const char *filename, unsigned line,
71a61510
TG
54 const char *section, unsigned section_line, const char *lvalue,
55 int ltype, const char *rvalue, void *data, void *userdata);
be32eb9b
TG
56
57int config_parse_ifname(const char *unit, const char *filename, unsigned line,
71a61510
TG
58 const char *section, unsigned section_line, const char *lvalue,
59 int ltype, const char *rvalue, void *data, void *userdata);
f5284182 60
d2df0d0e 61int config_parse_ifalias(const char *unit, const char *filename, unsigned line,
71a61510
TG
62 const char *section, unsigned section_line, const char *lvalue,
63 int ltype, const char *rvalue, void *data, void *userdata);
d2df0d0e 64
f5284182 65int net_parse_inaddr(const char *address, unsigned char *family, void *dst);
b5db00e5
UTL
66
67int net_get_unique_predictable_data(struct udev_device *device, uint8_t result[8]);