8dd5c1b4e9
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>
46 lines
1.9 KiB
C
46 lines
1.9 KiB
C
/*
|
|
* Copyright (c) 2011-2013, Qualcomm Atheros, Inc.
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifndef HS20_SUPPLICANT_H
|
|
#define HS20_SUPPLICANT_H
|
|
|
|
void wpas_hs20_add_indication(struct wpabuf *buf, int pps_mo_id);
|
|
|
|
int hs20_anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, u32 stypes,
|
|
const u8 *payload, size_t payload_len, int inmem);
|
|
struct wpabuf * hs20_build_anqp_req(u32 stypes, const u8 *payload,
|
|
size_t payload_len);
|
|
void hs20_put_anqp_req(u32 stypes, const u8 *payload, size_t payload_len,
|
|
struct wpabuf *buf);
|
|
void hs20_parse_rx_hs20_anqp_resp(struct wpa_supplicant *wpa_s,
|
|
struct wpa_bss *bss, const u8 *sa,
|
|
const u8 *data, size_t slen, u8 dialog_token);
|
|
int is_hs20_network(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
|
struct wpa_bss *bss);
|
|
int hs20_get_pps_mo_id(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
|
|
void hs20_notify_parse_done(struct wpa_supplicant *wpa_s);
|
|
|
|
void hs20_rx_subscription_remediation(struct wpa_supplicant *wpa_s,
|
|
const char *url, u8 osu_method);
|
|
void hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s, u8 code,
|
|
u16 reauth_delay, const char *url);
|
|
|
|
void hs20_free_osu_prov(struct wpa_supplicant *wpa_s);
|
|
void hs20_next_osu_icon(struct wpa_supplicant *wpa_s);
|
|
void hs20_osu_icon_fetch(struct wpa_supplicant *wpa_s);
|
|
int hs20_fetch_osu(struct wpa_supplicant *wpa_s);
|
|
void hs20_cancel_fetch_osu(struct wpa_supplicant *wpa_s);
|
|
void hs20_icon_fetch_failed(struct wpa_supplicant *wpa_s);
|
|
void hs20_start_osu_scan(struct wpa_supplicant *wpa_s);
|
|
void hs20_deinit(struct wpa_supplicant *wpa_s);
|
|
int hs20_get_icon(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
|
const char *file_name, size_t offset, size_t size,
|
|
char *reply, size_t buf_len);
|
|
int hs20_del_icon(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
|
const char *file_name);
|
|
|
|
#endif /* HS20_SUPPLICANT_H */
|