]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libsystemd-network/network-internal.h
Merge pull request #9039 from yuwata/fix-device-allow
[thirdparty/systemd.git] / src / libsystemd-network / network-internal.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
44e7b949
LP
2#pragma once
3
be32eb9b
TG
4/***
5 This file is part of systemd.
6
7 Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
be32eb9b
TG
8***/
9
b3e01314 10#include <stdbool.h>
be32eb9b 11
f8693fc7
BG
12#include "sd-dhcp-lease.h"
13
134e56dc 14#include "condition.h"
a2106925 15#include "conf-parser.h"
206b63ee 16#include "set.h"
71d35b6b 17#include "udev.h"
2cc412b5 18
f00ff0de
DJL
19#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
20#define LINK_BRIDGE_PORT_PRIORITY_MAX 63
21
e90d0374 22bool net_match_config(Set *match_mac,
5256e00e
TG
23 char * const *match_path,
24 char * const *match_driver,
25 char * const *match_type,
26 char * const *match_name,
2cc412b5
TG
27 Condition *match_host,
28 Condition *match_virt,
5022f08a
LP
29 Condition *match_kernel_cmdline,
30 Condition *match_kernel_version,
edbb03e9 31 Condition *match_arch,
505f8da7 32 const struct ether_addr *dev_mac,
b3e01314 33 const char *dev_path,
bf175aaf 34 const char *dev_parent_driver,
b3e01314
TG
35 const char *dev_driver,
36 const char *dev_type,
32bc8adc 37 const char *dev_name);
be32eb9b 38
a2106925
LP
39CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
40CONFIG_PARSER_PROTOTYPE(config_parse_hwaddr);
41CONFIG_PARSER_PROTOTYPE(config_parse_hwaddrs);
42CONFIG_PARSER_PROTOTYPE(config_parse_ifnames);
43CONFIG_PARSER_PROTOTYPE(config_parse_ifalias);
44CONFIG_PARSER_PROTOTYPE(config_parse_iaid);
45CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority);
d2df0d0e 46
dbe81cbd 47int net_get_unique_predictable_data(struct udev_device *device, uint64_t *result);
fc541430 48const char *net_get_name(struct udev_device *device);
7951dea2 49
b0e39c82 50void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size);
a2ba62c7 51int deserialize_in_addrs(struct in_addr **addresses, const char *string);
b729fa14
PF
52void serialize_in6_addrs(FILE *f, const struct in6_addr *addresses,
53 size_t size);
a2ba62c7 54int deserialize_in6_addrs(struct in6_addr **addresses, const char *string);
e1ea665e
EY
55
56/* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */
57struct sd_dhcp_route;
58
f8693fc7 59void serialize_dhcp_routes(FILE *f, const char *key, sd_dhcp_route **routes, size_t size);
e1ea665e 60int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t *ret_allocated, const char *string);
a073309f 61
ce088d6f 62/* It is not necessary to add deserialize_dhcp_option(). Use unhexmem() instead. */
e4735228 63int serialize_dhcp_option(FILE *f, const char *key, const void *data, size_t size);