]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libsystemd-network/network-internal.h
dhcp6-option: Add helper function for uncompressed domain names
[thirdparty/systemd.git] / src / libsystemd-network / network-internal.h
CommitLineData
be32eb9b
TG
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
44e7b949
LP
3#pragma once
4
be32eb9b
TG
5/***
6 This file is part of systemd.
7
8 Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22***/
23
b3e01314 24#include <stdbool.h>
be32eb9b 25
c6f7c917 26#include "udev.h"
134e56dc 27#include "condition.h"
2cc412b5 28
be32eb9b 29bool net_match_config(const struct ether_addr *match_mac,
5256e00e
TG
30 char * const *match_path,
31 char * const *match_driver,
32 char * const *match_type,
33 char * const *match_name,
2cc412b5
TG
34 Condition *match_host,
35 Condition *match_virt,
36 Condition *match_kernel,
edbb03e9 37 Condition *match_arch,
505f8da7 38 const struct ether_addr *dev_mac,
b3e01314 39 const char *dev_path,
bf175aaf 40 const char *dev_parent_driver,
b3e01314
TG
41 const char *dev_driver,
42 const char *dev_type,
32bc8adc 43 const char *dev_name);
be32eb9b 44
2cc412b5
TG
45int config_parse_net_condition(const char *unit, const char *filename, unsigned line,
46 const char *section, unsigned section_line, const char *lvalue,
47 int ltype, const char *rvalue, void *data, void *userdata);
48
be32eb9b 49int config_parse_hwaddr(const char *unit, const char *filename, unsigned line,
71a61510
TG
50 const char *section, unsigned section_line, const char *lvalue,
51 int ltype, const char *rvalue, void *data, void *userdata);
be32eb9b
TG
52
53int config_parse_ifname(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);
5256e00e
TG
56
57int config_parse_ifnames(const char *unit, const char *filename, unsigned line,
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
b5db00e5 65int net_get_unique_predictable_data(struct udev_device *device, uint8_t result[8]);
fc541430 66const char *net_get_name(struct udev_device *device);
7951dea2 67
b0e39c82 68void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size);
a2ba62c7
LP
69int deserialize_in_addrs(struct in_addr **addresses, const char *string);
70int deserialize_in6_addrs(struct in6_addr **addresses, const char *string);
e1ea665e
EY
71
72/* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */
73struct sd_dhcp_route;
74
75void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route *routes, size_t size);
76int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t *ret_allocated, const char *string);
a073309f
AC
77
78int serialize_dhcp_option(FILE *f, const char *key, const uint8_t *data, size_t size);
79int deserialize_dhcp_option(uint8_t **data, size_t *data_len, const char *string);