eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 79a9fdf123cc1dfecf371a20e345c4856eb7b21a
parent 27d670f432f844b6f37d5bc409770bbf412b63af
Author: James Prestwood <james.prestwood@linux.intel.com>
Date:   Fri, 12 Jul 2019 10:30:30 -0700

hotspot: add API to get a matching roaming consortium

This API will attempt to find a matching roaming consortium OI
if present in the config file. A single matching OI is returned
or NULL if one was not found.

Diffstat:
Msrc/hotspot.c | 18++++++++++++++++++
Msrc/hotspot.h | 3+++
2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/hotspot.c b/src/hotspot.c @@ -271,6 +271,24 @@ try_roaming_consortium: return NULL; } +const uint8_t *hs20_get_roaming_consortium(struct network *network, + size_t *len) +{ + struct hs20_config *config; + const uint8_t *rc_ie = network_get_roaming_consortium(network); + + if (!rc_ie) + return NULL; + + config = l_queue_find(hs20_settings, match_rc, rc_ie); + if (config) { + *len = config->rc_len; + return config->rc; + } + + return NULL; +} + static int hotspot_init(void) { DIR *dir; diff --git a/src/hotspot.h b/src/hotspot.h @@ -23,3 +23,6 @@ struct network; const char *hs20_find_settings_file(struct network *network); + +const uint8_t *hs20_get_roaming_consortium(struct network *network, + size_t *len);