1/*
2 * Generic advertisement service (GAS) query
3 * Copyright (c) 2009, Atheros Communications
4 * Copyright (c) 2011-2017, Qualcomm Atheros
5 *
6 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
8 */
9
10#ifndef GAS_QUERY_AP_H
11#define GAS_QUERY_AP_H
12
13struct gas_query_ap;
14
15struct gas_query_ap * gas_query_ap_init(struct hostapd_data *hapd,
16					void *msg_ctx);
17void gas_query_ap_deinit(struct gas_query_ap *gas);
18int gas_query_ap_rx(struct gas_query_ap *gas, const u8 *sa, u8 categ,
19		    const u8 *data, size_t len, int freq);
20
21/**
22 * enum gas_query_ap_result - GAS query result
23 */
24enum gas_query_ap_result {
25	GAS_QUERY_AP_SUCCESS,
26	GAS_QUERY_AP_FAILURE,
27	GAS_QUERY_AP_TIMEOUT,
28	GAS_QUERY_AP_PEER_ERROR,
29	GAS_QUERY_AP_INTERNAL_ERROR,
30	GAS_QUERY_AP_DELETED_AT_DEINIT
31};
32
33int gas_query_ap_req(struct gas_query_ap *gas, const u8 *dst, int freq,
34		     struct wpabuf *req,
35		     void (*cb)(void *ctx, const u8 *dst, u8 dialog_token,
36				enum gas_query_ap_result result,
37				const struct wpabuf *adv_proto,
38				const struct wpabuf *resp, u16 status_code),
39		     void *ctx);
40void gas_query_ap_tx_status(struct gas_query_ap *gas, const u8 *dst,
41			    const u8 *data, size_t data_len, int ok);
42
43#endif /* GAS_QUERY_AP_H */
44