]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/net-condition.h
Merge pull request #17079 from keszybz/late-exec-resolution
[thirdparty/systemd.git] / src / shared / net-condition.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <linux/nl80211.h>
5 #include <stdbool.h>
6
7 #include "sd-device.h"
8
9 #include "conf-parser.h"
10 #include "ether-addr-util.h"
11 #include "set.h"
12
13 typedef struct NetMatch {
14 Set *mac;
15 Set *permanent_mac;
16 char **path;
17 char **driver;
18 char **iftype;
19 char **ifname;
20 char **property;
21 char **wifi_iftype;
22 char **ssid;
23 Set *bssid;
24 } NetMatch;
25
26 void net_match_clear(NetMatch *match);
27 bool net_match_is_empty(const NetMatch *match);
28
29 bool net_match_config(
30 const NetMatch *match,
31 sd_device *device,
32 const struct ether_addr *mac,
33 const struct ether_addr *permanent_mac,
34 const char *driver,
35 unsigned short iftype,
36 const char *ifname,
37 char * const *alternative_names,
38 enum nl80211_iftype wifi_iftype,
39 const char *ssid,
40 const struct ether_addr *bssid);
41
42 CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
43 CONFIG_PARSER_PROTOTYPE(config_parse_match_strv);
44 CONFIG_PARSER_PROTOTYPE(config_parse_match_ifnames);
45 CONFIG_PARSER_PROTOTYPE(config_parse_match_property);