2011-09-28 18:44:25 +02:00
|
|
|
/*
|
|
|
|
* Generic advertisement service (GAS) query
|
|
|
|
* Copyright (c) 2009, Atheros Communications
|
|
|
|
* Copyright (c) 2011, Qualcomm Atheros
|
|
|
|
*
|
2012-02-11 15:31:36 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2011-09-28 18:44:25 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GAS_QUERY_H
|
|
|
|
#define GAS_QUERY_H
|
|
|
|
|
|
|
|
struct gas_query;
|
|
|
|
|
|
|
|
#ifdef CONFIG_GAS
|
|
|
|
|
|
|
|
struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s);
|
|
|
|
void gas_query_deinit(struct gas_query *gas);
|
|
|
|
int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa,
|
2014-01-23 10:18:20 +01:00
|
|
|
const u8 *bssid, u8 categ, const u8 *data, size_t len,
|
|
|
|
int freq);
|
2018-12-08 12:57:51 +01:00
|
|
|
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
|
2011-09-28 18:44:25 +02:00
|
|
|
|
2012-12-22 10:58:33 +01:00
|
|
|
/**
|
|
|
|
* enum gas_query_result - GAS query result
|
|
|
|
*/
|
2011-09-28 18:44:25 +02:00
|
|
|
enum gas_query_result {
|
|
|
|
GAS_QUERY_SUCCESS,
|
|
|
|
GAS_QUERY_FAILURE,
|
|
|
|
GAS_QUERY_TIMEOUT,
|
|
|
|
GAS_QUERY_PEER_ERROR,
|
|
|
|
GAS_QUERY_INTERNAL_ERROR,
|
2017-11-29 23:07:50 +01:00
|
|
|
GAS_QUERY_STOPPED,
|
2011-09-28 18:44:25 +02:00
|
|
|
GAS_QUERY_DELETED_AT_DEINIT
|
|
|
|
};
|
|
|
|
|
|
|
|
int gas_query_req(struct gas_query *gas, const u8 *dst, int freq,
|
2018-02-10 11:42:00 +01:00
|
|
|
int wildcard_bssid, struct wpabuf *req,
|
2011-09-28 18:44:25 +02:00
|
|
|
void (*cb)(void *ctx, const u8 *dst, u8 dialog_token,
|
|
|
|
enum gas_query_result result,
|
|
|
|
const struct wpabuf *adv_proto,
|
|
|
|
const struct wpabuf *resp, u16 status_code),
|
|
|
|
void *ctx);
|
2017-11-29 23:07:50 +01:00
|
|
|
int gas_query_stop(struct gas_query *gas, u8 dialog_token);
|
2011-09-28 18:44:25 +02:00
|
|
|
|
|
|
|
#else /* CONFIG_GAS */
|
|
|
|
|
|
|
|
static inline struct gas_query * gas_query_init(struct wpa_supplicant *wpa_s)
|
|
|
|
{
|
|
|
|
return (void *) 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void gas_query_deinit(struct gas_query *gas)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CONFIG_GAS */
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* GAS_QUERY_H */
|