| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include <linux/nl80211.h> |
| 5 |
|
| 6 |
#include "conf-parser-forward.h" |
| 7 |
#include "shared-forward.h" |
| 8 |
|
| 9 |
typedef struct NetMatch { |
| 10 |
Set *hw_addr; |
| 11 |
Set *permanent_hw_addr; |
| 12 |
char **path; |
| 13 |
char **driver; |
| 14 |
char **iftype; /* udev's DEVTYPE field or ARPHRD_XXX, e.g. ether, wlan. */ |
| 15 |
char **kind; /* IFLA_INFO_KIND attribute, e.g. gre, gretap, erspan. */ |
| 16 |
char **ifname; |
| 17 |
char **property; |
| 18 |
char **wlan_iftype; |
| 19 |
char **ssid; |
| 20 |
Set *bssid; |
| 21 |
} NetMatch; |
| 22 |
|
| 23 |
void net_match_clear(NetMatch *match); |
| 24 |
bool net_match_is_empty(const NetMatch *match); |
| 25 |
|
| 26 |
int net_match_config( |
| 27 |
const NetMatch *match, |
| 28 |
sd_device *device, |
| 29 |
const struct hw_addr_data *hw_addr, |
| 30 |
const struct hw_addr_data *permanent_hw_addr, |
| 31 |
const char *driver, |
| 32 |
unsigned short iftype, |
| 33 |
const char *kind, |
| 34 |
const char *ifname, |
| 35 |
char * const *alternative_names, |
| 36 |
enum nl80211_iftype wlan_iftype, |
| 37 |
const char *ssid, |
| 38 |
const struct ether_addr *bssid); |
| 39 |
|
| 40 |
CONFIG_PARSER_PROTOTYPE(config_parse_net_condition); |
| 41 |
CONFIG_PARSER_PROTOTYPE(config_parse_match_strv); |
| 42 |
CONFIG_PARSER_PROTOTYPE(config_parse_match_ifnames); |
| 43 |
CONFIG_PARSER_PROTOTYPE(config_parse_match_property); |