1 /* SPDX-License-Identifier: LGPL-2.1+ */
7 #include "sd-dhcp-lease.h"
10 #include "conf-parser.h"
13 #define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
14 #define LINK_BRIDGE_PORT_PRIORITY_MAX 63
16 bool net_match_config(Set
*match_mac
,
17 char * const *match_path
,
18 char * const *match_driver
,
19 char * const *match_type
,
20 char * const *match_name
,
21 Condition
*match_host
,
22 Condition
*match_virt
,
23 Condition
*match_kernel_cmdline
,
24 Condition
*match_kernel_version
,
25 Condition
*match_arch
,
26 const struct ether_addr
*dev_mac
,
28 const char *dev_parent_driver
,
29 const char *dev_driver
,
31 const char *dev_name
);
33 CONFIG_PARSER_PROTOTYPE(config_parse_net_condition
);
34 CONFIG_PARSER_PROTOTYPE(config_parse_hwaddr
);
35 CONFIG_PARSER_PROTOTYPE(config_parse_hwaddrs
);
36 CONFIG_PARSER_PROTOTYPE(config_parse_ifnames
);
37 CONFIG_PARSER_PROTOTYPE(config_parse_ifalias
);
38 CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority
);
40 int net_get_unique_predictable_data(sd_device
*device
, uint64_t *result
);
41 const char *net_get_name(sd_device
*device
);
43 void serialize_in_addrs(FILE *f
, const struct in_addr
*addresses
, size_t size
);
44 int deserialize_in_addrs(struct in_addr
**addresses
, const char *string
);
45 void serialize_in6_addrs(FILE *f
, const struct in6_addr
*addresses
,
47 int deserialize_in6_addrs(struct in6_addr
**addresses
, const char *string
);
49 /* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */
52 void serialize_dhcp_routes(FILE *f
, const char *key
, sd_dhcp_route
**routes
, size_t size
);
53 int deserialize_dhcp_routes(struct sd_dhcp_route
**ret
, size_t *ret_size
, size_t *ret_allocated
, const char *string
);
55 /* It is not necessary to add deserialize_dhcp_option(). Use unhexmem() instead. */
56 int serialize_dhcp_option(FILE *f
, const char *key
, const void *data
, size_t size
);