aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/interworking.c
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/interworking.c
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/interworking.c')
-rw-r--r--wpa_supplicant/interworking.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 6a54d1e..9df1607 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -2775,7 +2775,8 @@ static void anqp_add_extra(struct wpa_supplicant *wpa_s,
static void interworking_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
struct wpa_bss *bss, const u8 *sa,
u16 info_id,
- const u8 *data, size_t slen)
+ const u8 *data, size_t slen,
+ u8 dialog_token)
{
const u8 *pos = data;
struct wpa_bss_anqp *anqp = NULL;
@@ -2885,7 +2886,8 @@ static void interworking_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
switch (type) {
case HS20_ANQP_OUI_TYPE:
hs20_parse_rx_hs20_anqp_resp(wpa_s, bss, sa,
- pos, slen);
+ pos, slen,
+ dialog_token);
break;
default:
wpa_msg(wpa_s, MSG_DEBUG,
@@ -2988,7 +2990,7 @@ void anqp_resp_cb(void *ctx, const u8 *dst, u8 dialog_token,
goto out_parse_done;
}
interworking_parse_rx_anqp_resp(wpa_s, bss, dst, info_id, pos,
- slen);
+ slen, dialog_token);
pos += slen;
}