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