aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant_i.h
diff options
context:
space:
mode:
authorJan Nordqvist <jannq@google.com>2015-12-11 01:01:46 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-19 16:34:01 (GMT)
commit8dd5c1b4e95559cd1688a382cba04f2032e88dae (patch)
treeafdf348878ebb0903fb174e0c9107ab7a0853efc /wpa_supplicant/wpa_supplicant_i.h
parent2e99239bd98469c83ac8da7b8f6fb1e66ead3c3a (diff)
downloadhostap-8dd5c1b4e95559cd1688a382cba04f2032e88dae.zip
hostap-8dd5c1b4e95559cd1688a382cba04f2032e88dae.tar.gz
hostap-8dd5c1b4e95559cd1688a382cba04f2032e88dae.tar.bz2
HS 2.0: Add a command to retrieve icon with in-memory storage
This adds a new command based Hotspot 2.0 icon retrieval option. In short, here is the new command sequence: 1. REQ_HS20_ICON <bssid> <file-name> 2. event: RX-HS20-ICON <bssid> <file-name> <size> 3. GET_HS20_ICON <bssid> <file-name> <offset> <size> (if needed, repeat with larger offset values until full icon is fetched) 5. DEL_HS20_ICON <bssid> <file-name> REQ_HS20_ICON is a new command that is analogous to HS20_ICON_REQUEST with the slight difference that an entry to store the icon in memory is prepared. The RX-HS20-ICON event has been augmented with BSSID, file-name and size, and GET_HS20_ICON is used to retrieve a chunk of up to <size> bytes of icon data at offset <offset>. Each chunk is returned as a base64 encoded fragment, preceded by "HS20-ICON-DATA", BSSID, and file-name as well as the starting offset of the data. If there is no entry prepared for the icon when the ANQP result comes back, hs20_process_icon_binary_file falls back to legacy behavior. Finally the DEL_HS20_ICON command deletes (all) icons associated with BSSID and file-name (there could be several if retries are used and they have different dialog tokens). Signed-off-by: Jan Nordqvist <jannq@google.com>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant_i.h')
-rw-r--r--wpa_supplicant/wpa_supplicant_i.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
index 05a1bc6..7e52020 100644
--- a/wpa_supplicant/wpa_supplicant_i.h
+++ b/wpa_supplicant/wpa_supplicant_i.h
@@ -425,6 +425,15 @@ enum wpa_supplicant_test_failure {
WPAS_TEST_FAILURE_SCAN_TRIGGER,
};
+struct icon_entry {
+ struct icon_entry *next;
+ u8 bssid[ETH_ALEN];
+ u8 dialog_token;
+ char *file_name;
+ u8 *image;
+ size_t image_len;
+};
+
/**
* struct wpa_supplicant - Internal data for wpa_supplicant interface
*
@@ -905,6 +914,7 @@ struct wpa_supplicant {
unsigned int fetch_osu_icon_in_progress:1;
struct wpa_bss *interworking_gas_bss;
unsigned int osu_icon_id;
+ struct icon_entry *icon_head;
struct osu_provider *osu_prov;
size_t osu_prov_count;
struct os_reltime osu_icon_fetch_start;