3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 10:39:23 +01:00

network: introduce the concept of hidden networks

This commit is contained in:
Tim Kourt 2018-06-28 21:02:52 -07:00 committed by Denis Kenzior
parent 1ffc99c343
commit 5ded4890a6
2 changed files with 10 additions and 0 deletions

View File

@ -1177,6 +1177,8 @@ void network_rank_update(struct network *network)
bool network_info_add_known(const char *ssid, enum security security)
{
struct network_info *network;
struct l_settings *settings;
bool is_hidden;
int err;
network = l_new(struct network_info, 1);
@ -1192,6 +1194,13 @@ bool network_info_add_known(const char *ssid, enum security security)
network->is_known = true;
settings = storage_network_open(security_to_str(security), ssid);
if (l_settings_get_bool(settings, "Settings", "Hidden", &is_hidden))
network->is_hidden = is_hidden;
l_settings_free(settings);
l_queue_insert(networks, network, timespec_compare, NULL);
return true;

View File

@ -70,6 +70,7 @@ struct network_info {
struct timespec seen_time; /* Time last seen */
int seen_count; /* Ref count for network.info */
bool is_known:1;
bool is_hidden:1;
};
typedef void (*network_info_foreach_func_t)(const struct network_info *info,