2020-12-10 11:38:43 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2020-10-28 16:20:14 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <linux/nl80211.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "sd-device.h"
|
|
|
|
|
|
|
|
#include "conf-parser.h"
|
|
|
|
#include "ether-addr-util.h"
|
|
|
|
#include "set.h"
|
|
|
|
|
2020-10-29 07:04:52 +01:00
|
|
|
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);
|
|
|
|
|
2020-10-28 16:20:14 +01:00
|
|
|
bool net_match_config(
|
2020-10-29 07:04:52 +01:00
|
|
|
const NetMatch *match,
|
2020-10-28 16:20:14 +01:00
|
|
|
sd_device *device,
|
2020-10-29 07:04:52 +01:00
|
|
|
const struct ether_addr *mac,
|
|
|
|
const struct ether_addr *permanent_mac,
|
|
|
|
const char *driver,
|
|
|
|
unsigned short iftype,
|
|
|
|
const char *ifname,
|
2020-10-28 16:20:14 +01:00
|
|
|
char * const *alternative_names,
|
2020-10-29 07:04:52 +01:00
|
|
|
enum nl80211_iftype wifi_iftype,
|
|
|
|
const char *ssid,
|
|
|
|
const struct ether_addr *bssid);
|
2020-10-28 16:20:14 +01:00
|
|
|
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_match_strv);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_match_ifnames);
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_match_property);
|