1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright (C) 2013 Tom Gundersen <teg@jklm.no>
12 #include "sd-dhcp-lease.h"
14 #include "condition.h"
15 #include "conf-parser.h"
19 #define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
20 #define LINK_BRIDGE_PORT_PRIORITY_MAX 63
22 bool net_match_config(Set
*match_mac
,
23 char * const *match_path
,
24 char * const *match_driver
,
25 char * const *match_type
,
26 char * const *match_name
,
27 Condition
*match_host
,
28 Condition
*match_virt
,
29 Condition
*match_kernel_cmdline
,
30 Condition
*match_kernel_version
,
31 Condition
*match_arch
,
32 const struct ether_addr
*dev_mac
,
34 const char *dev_parent_driver
,
35 const char *dev_driver
,
37 const char *dev_name
);
39 CONFIG_PARSER_PROTOTYPE(config_parse_net_condition
);
40 CONFIG_PARSER_PROTOTYPE(config_parse_hwaddr
);
41 CONFIG_PARSER_PROTOTYPE(config_parse_hwaddrs
);
42 CONFIG_PARSER_PROTOTYPE(config_parse_ifnames
);
43 CONFIG_PARSER_PROTOTYPE(config_parse_ifalias
);
44 CONFIG_PARSER_PROTOTYPE(config_parse_iaid
);
45 CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority
);
47 int net_get_unique_predictable_data(struct udev_device
*device
, uint64_t *result
);
48 const char *net_get_name(struct udev_device
*device
);
50 void serialize_in_addrs(FILE *f
, const struct in_addr
*addresses
, size_t size
);
51 int deserialize_in_addrs(struct in_addr
**addresses
, const char *string
);
52 void serialize_in6_addrs(FILE *f
, const struct in6_addr
*addresses
,
54 int deserialize_in6_addrs(struct in6_addr
**addresses
, const char *string
);
56 /* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */
59 void serialize_dhcp_routes(FILE *f
, const char *key
, sd_dhcp_route
**routes
, size_t size
);
60 int deserialize_dhcp_routes(struct sd_dhcp_route
**ret
, size_t *ret_size
, size_t *ret_allocated
, const char *string
);
62 /* It is not necessary to add deserialize_dhcp_option(). Use unhexmem() instead. */
63 int serialize_dhcp_option(FILE *f
, const char *key
, const void *data
, size_t size
);