summaryrefslogtreecommitdiff
path: root/src/shared/net-condition.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-10-29 15:04:52 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-10-29 15:04:52 +0900
commit5722fb89bcb4d0fb228c0b99b82b70e00bb6095a (patch)
tree35d5bacdc33b714646809f5700184a5f7017bd71 /src/shared/net-condition.h
parent26f4d32365eff9d9bbd77e6c04de10ff6d6d7791 (diff)
downloadsystemd-5722fb89bcb4d0fb228c0b99b82b70e00bb6095a.tar.gz
net-condition: introduce struct NetMatch
Diffstat (limited to 'src/shared/net-condition.h')
-rw-r--r--src/shared/net-condition.h43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/shared/net-condition.h b/src/shared/net-condition.h
index 31d5d01aa6..61058849a9 100644
--- a/src/shared/net-condition.h
+++ b/src/shared/net-condition.h
@@ -10,27 +10,34 @@
#include "ether-addr-util.h"
#include "set.h"
+typedef struct NetMatch {
+ Set *mac;
+ Set *permanent_mac;
+ char **path;
+ char **driver;
+ char **iftype;
+ char **ifname;
+ char **property;
+ char **wifi_iftype;
+ char **ssid;
+ Set *bssid;
+} NetMatch;
+
+void net_match_clear(NetMatch *match);
+bool net_match_is_empty(const NetMatch *match);
+
bool net_match_config(
- Set *match_mac,
- Set *match_permanent_mac,
- char * const *match_paths,
- char * const *match_drivers,
- char * const *match_iftypes,
- char * const *match_names,
- char * const *match_property,
- char * const *match_wifi_iftype,
- char * const *match_ssid,
- Set *match_bssid,
+ const NetMatch *match,
sd_device *device,
- const struct ether_addr *dev_mac,
- const struct ether_addr *dev_permanent_mac,
- const char *dev_driver,
- unsigned short dev_iftype,
- const char *dev_name,
+ const struct ether_addr *mac,
+ const struct ether_addr *permanent_mac,
+ const char *driver,
+ unsigned short iftype,
+ const char *ifname,
char * const *alternative_names,
- enum nl80211_iftype dev_wifi_iftype,
- const char *dev_ssid,
- const struct ether_addr *dev_bssid);
+ enum nl80211_iftype wifi_iftype,
+ const char *ssid,
+ const struct ether_addr *bssid);
CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
CONFIG_PARSER_PROTOTYPE(config_parse_match_strv);