gas_serv.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Generic advertisement service (GAS) server
  3. * Copyright (c) 2011-2013, Qualcomm Atheros, Inc.
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef GAS_SERV_H
  9. #define GAS_SERV_H
  10. #define ANQP_REQ_CAPABILITY_LIST \
  11. (1 << (ANQP_CAPABILITY_LIST - ANQP_QUERY_LIST))
  12. #define ANQP_REQ_VENUE_NAME \
  13. (1 << (ANQP_VENUE_NAME - ANQP_QUERY_LIST))
  14. #define ANQP_REQ_NETWORK_AUTH_TYPE \
  15. (1 << (ANQP_NETWORK_AUTH_TYPE - ANQP_QUERY_LIST))
  16. #define ANQP_REQ_ROAMING_CONSORTIUM \
  17. (1 << (ANQP_ROAMING_CONSORTIUM - ANQP_QUERY_LIST))
  18. #define ANQP_REQ_IP_ADDR_TYPE_AVAILABILITY \
  19. (1 << (ANQP_IP_ADDR_TYPE_AVAILABILITY - ANQP_QUERY_LIST))
  20. #define ANQP_REQ_NAI_REALM \
  21. (1 << (ANQP_NAI_REALM - ANQP_QUERY_LIST))
  22. #define ANQP_REQ_3GPP_CELLULAR_NETWORK \
  23. (1 << (ANQP_3GPP_CELLULAR_NETWORK - ANQP_QUERY_LIST))
  24. #define ANQP_REQ_DOMAIN_NAME \
  25. (1 << (ANQP_DOMAIN_NAME - ANQP_QUERY_LIST))
  26. #define ANQP_REQ_HS_CAPABILITY_LIST \
  27. (0x10000 << HS20_STYPE_CAPABILITY_LIST)
  28. #define ANQP_REQ_OPERATOR_FRIENDLY_NAME \
  29. (0x10000 << HS20_STYPE_OPERATOR_FRIENDLY_NAME)
  30. #define ANQP_REQ_WAN_METRICS \
  31. (0x10000 << HS20_STYPE_WAN_METRICS)
  32. #define ANQP_REQ_CONNECTION_CAPABILITY \
  33. (0x10000 << HS20_STYPE_CONNECTION_CAPABILITY)
  34. #define ANQP_REQ_NAI_HOME_REALM \
  35. (0x10000 << HS20_STYPE_NAI_HOME_REALM_QUERY)
  36. #define ANQP_REQ_OPERATING_CLASS \
  37. (0x10000 << HS20_STYPE_OPERATING_CLASS)
  38. #define ANQP_REQ_OSU_PROVIDERS_LIST \
  39. (0x10000 << HS20_STYPE_OSU_PROVIDERS_LIST)
  40. #define ANQP_REQ_ICON_REQUEST \
  41. (0x10000 << HS20_STYPE_ICON_REQUEST)
  42. struct gas_dialog_info {
  43. u8 valid;
  44. struct wpabuf *sd_resp; /* Fragmented response */
  45. u8 dialog_token;
  46. size_t sd_resp_pos; /* Offset in sd_resp */
  47. u8 sd_frag_id;
  48. int prot; /* whether Protected Dual of Public Action frame is used */
  49. };
  50. struct hostapd_data;
  51. struct gas_dialog_info *
  52. gas_serv_dialog_find(struct hostapd_data *hapd, const u8 *addr,
  53. u8 dialog_token);
  54. void gas_serv_dialog_clear(struct gas_dialog_info *dialog);
  55. int gas_serv_init(struct hostapd_data *hapd);
  56. void gas_serv_deinit(struct hostapd_data *hapd);
  57. #endif /* GAS_SERV_H */