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