From bff074082994970156d5bf70c10951cf68a111ee Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Mon, 9 Sep 2019 09:49:08 -0700 Subject: [PATCH] knownnetworks: add get_vendor_ies operation This will provide the hotspot module with enough info for it to build the required vendor IEs to be provided with (Re)Association. --- src/knownnetworks.c | 10 ++++++++++ src/knownnetworks.h | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/src/knownnetworks.c b/src/knownnetworks.c index 3cf4270b..7754aa68 100644 --- a/src/knownnetworks.c +++ b/src/knownnetworks.c @@ -212,6 +212,16 @@ const char *network_info_get_type(const struct network_info *info) return info->ops->get_type(info); } +const struct iovec *network_info_get_extra_ies(const struct network_info *info, + struct scan_bss *bss, + size_t *num_elems) +{ + if (!info->ops->get_extra_ies) + return NULL; + + return info->ops->get_extra_ies(info, bss, num_elems); +} + bool network_info_match_hessid(const struct network_info *info, const uint8_t *hessid) { diff --git a/src/knownnetworks.h b/src/knownnetworks.h index c7aa2237..03735ae3 100644 --- a/src/knownnetworks.h +++ b/src/knownnetworks.h @@ -38,6 +38,9 @@ struct network_info_ops { const char *(*get_path)(const struct network_info *info); const char *(*get_name)(const struct network_info *info); const char *(*get_type)(const struct network_info *info); + const struct iovec *(*get_extra_ies)(const struct network_info *info, + struct scan_bss *bss, + size_t *num_elems); bool (*match_hessid)(const struct network_info *info, const uint8_t *hessid); @@ -95,6 +98,9 @@ int network_info_touch(struct network_info *info); const char *network_info_get_path(const struct network_info *info); const char *network_info_get_name(const struct network_info *info); const char *network_info_get_type(const struct network_info *info); +const struct iovec *network_info_get_extra_ies(const struct network_info *info, + struct scan_bss *bss, + size_t *num_elems); bool network_info_match_hessid(const struct network_info *info, const uint8_t *hessid);