• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
13 struct gas_query_ap;
14 
15 struct gas_query_ap * gas_query_ap_init(struct hostapd_data *hapd,
16 					void *msg_ctx);
17 void gas_query_ap_deinit(struct gas_query_ap *gas);
18 int 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  */
24 enum 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 
33 int 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);
40 void 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