]>
Commit | Line | Data |
---|---|---|
cca2da15 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
7e19cc54 YW |
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 | ||
5722fb89 | 13 | typedef struct NetMatch { |
52135071 YW |
14 | Set *hw_addr; |
15 | Set *permanent_hw_addr; | |
5722fb89 YW |
16 | char **path; |
17 | char **driver; | |
65022cd7 YW |
18 | char **iftype; /* udev's DEVTYPE field or ARPHRD_XXX, e.g. ether, wlan. */ |
19 | char **kind; /* IFLA_INFO_KIND attribute, e.g. gre, gretap, erspan. */ | |
5722fb89 YW |
20 | char **ifname; |
21 | char **property; | |
77f75f4f | 22 | char **wlan_iftype; |
5722fb89 YW |
23 | char **ssid; |
24 | Set *bssid; | |
25 | } NetMatch; | |
26 | ||
27 | void net_match_clear(NetMatch *match); | |
28 | bool net_match_is_empty(const NetMatch *match); | |
29 | ||
1a3caa49 | 30 | int net_match_config( |
5722fb89 | 31 | const NetMatch *match, |
7e19cc54 | 32 | sd_device *device, |
52135071 YW |
33 | const struct hw_addr_data *hw_addr, |
34 | const struct hw_addr_data *permanent_hw_addr, | |
5722fb89 YW |
35 | const char *driver, |
36 | unsigned short iftype, | |
65022cd7 | 37 | const char *kind, |
5722fb89 | 38 | const char *ifname, |
7e19cc54 | 39 | char * const *alternative_names, |
77f75f4f | 40 | enum nl80211_iftype wlan_iftype, |
5722fb89 YW |
41 | const char *ssid, |
42 | const struct ether_addr *bssid); | |
7e19cc54 YW |
43 | |
44 | CONFIG_PARSER_PROTOTYPE(config_parse_net_condition); | |
45 | CONFIG_PARSER_PROTOTYPE(config_parse_match_strv); | |
46 | CONFIG_PARSER_PROTOTYPE(config_parse_match_ifnames); | |
47 | CONFIG_PARSER_PROTOTYPE(config_parse_match_property); |