gas_query_ap.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef GAS_QUERY_AP_H
  10. #define GAS_QUERY_AP_H
  11. struct gas_query_ap;
  12. struct gas_query_ap * gas_query_ap_init(struct hostapd_data *hapd,
  13. void *msg_ctx);
  14. void gas_query_ap_deinit(struct gas_query_ap *gas);
  15. int gas_query_ap_rx(struct gas_query_ap *gas, const u8 *sa, u8 categ,
  16. const u8 *data, size_t len, int freq);
  17. /**
  18. * enum gas_query_ap_result - GAS query result
  19. */
  20. enum gas_query_ap_result {
  21. GAS_QUERY_AP_SUCCESS,
  22. GAS_QUERY_AP_FAILURE,
  23. GAS_QUERY_AP_TIMEOUT,
  24. GAS_QUERY_AP_PEER_ERROR,
  25. GAS_QUERY_AP_INTERNAL_ERROR,
  26. GAS_QUERY_AP_DELETED_AT_DEINIT
  27. };
  28. int gas_query_ap_req(struct gas_query_ap *gas, const u8 *dst, int freq,
  29. struct wpabuf *req,
  30. void (*cb)(void *ctx, const u8 *dst, u8 dialog_token,
  31. enum gas_query_ap_result result,
  32. const struct wpabuf *adv_proto,
  33. const struct wpabuf *resp, u16 status_code),
  34. void *ctx);
  35. void gas_query_ap_tx_status(struct gas_query_ap *gas, const u8 *dst,
  36. const u8 *data, size_t data_len, int ok);
  37. #endif /* GAS_QUERY_AP_H */