2012-02-26 21:34:19 +01:00
|
|
|
/*
|
|
|
|
* Generic advertisement service (GAS) server
|
2013-03-17 15:34:09 +01:00
|
|
|
* Copyright (c) 2011-2013, Qualcomm Atheros, Inc.
|
2012-02-26 21:34:19 +01:00
|
|
|
*
|
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GAS_SERV_H
|
|
|
|
#define GAS_SERV_H
|
|
|
|
|
2015-10-07 15:14:09 +02:00
|
|
|
/* First 16 ANQP InfoIDs can be included in the optimized bitmap */
|
2012-02-26 21:34:19 +01:00
|
|
|
#define ANQP_REQ_CAPABILITY_LIST \
|
|
|
|
(1 << (ANQP_CAPABILITY_LIST - ANQP_QUERY_LIST))
|
2012-02-26 21:34:21 +01:00
|
|
|
#define ANQP_REQ_VENUE_NAME \
|
|
|
|
(1 << (ANQP_VENUE_NAME - ANQP_QUERY_LIST))
|
2015-10-07 15:14:09 +02:00
|
|
|
#define ANQP_REQ_EMERGENCY_CALL_NUMBER \
|
|
|
|
(1 << (ANQP_EMERGENCY_CALL_NUMBER - ANQP_QUERY_LIST))
|
2012-07-30 20:45:31 +02:00
|
|
|
#define ANQP_REQ_NETWORK_AUTH_TYPE \
|
|
|
|
(1 << (ANQP_NETWORK_AUTH_TYPE - ANQP_QUERY_LIST))
|
2012-02-26 21:34:19 +01:00
|
|
|
#define ANQP_REQ_ROAMING_CONSORTIUM \
|
|
|
|
(1 << (ANQP_ROAMING_CONSORTIUM - ANQP_QUERY_LIST))
|
2012-07-30 20:51:19 +02:00
|
|
|
#define ANQP_REQ_IP_ADDR_TYPE_AVAILABILITY \
|
|
|
|
(1 << (ANQP_IP_ADDR_TYPE_AVAILABILITY - ANQP_QUERY_LIST))
|
2012-08-25 14:58:30 +02:00
|
|
|
#define ANQP_REQ_NAI_REALM \
|
|
|
|
(1 << (ANQP_NAI_REALM - ANQP_QUERY_LIST))
|
2012-07-30 21:07:35 +02:00
|
|
|
#define ANQP_REQ_3GPP_CELLULAR_NETWORK \
|
|
|
|
(1 << (ANQP_3GPP_CELLULAR_NETWORK - ANQP_QUERY_LIST))
|
2015-10-07 15:14:09 +02:00
|
|
|
#define ANQP_REQ_AP_GEOSPATIAL_LOCATION \
|
|
|
|
(1 << (ANQP_AP_GEOSPATIAL_LOCATION - ANQP_QUERY_LIST))
|
|
|
|
#define ANQP_REQ_AP_CIVIC_LOCATION \
|
|
|
|
(1 << (ANQP_AP_CIVIC_LOCATION - ANQP_QUERY_LIST))
|
|
|
|
#define ANQP_REQ_AP_LOCATION_PUBLIC_URI \
|
|
|
|
(1 << (ANQP_AP_LOCATION_PUBLIC_URI - ANQP_QUERY_LIST))
|
2012-07-30 20:55:46 +02:00
|
|
|
#define ANQP_REQ_DOMAIN_NAME \
|
|
|
|
(1 << (ANQP_DOMAIN_NAME - ANQP_QUERY_LIST))
|
2015-10-07 15:14:09 +02:00
|
|
|
#define ANQP_REQ_EMERGENCY_ALERT_URI \
|
|
|
|
(1 << (ANQP_EMERGENCY_ALERT_URI - ANQP_QUERY_LIST))
|
|
|
|
#define ANQP_REQ_TDLS_CAPABILITY \
|
|
|
|
(1 << (ANQP_TDLS_CAPABILITY - ANQP_QUERY_LIST))
|
|
|
|
#define ANQP_REQ_EMERGENCY_NAI \
|
|
|
|
(1 << (ANQP_EMERGENCY_NAI - ANQP_QUERY_LIST))
|
|
|
|
/*
|
2017-03-10 17:33:51 +01:00
|
|
|
* First 15 Hotspot 2.0 vendor specific ANQP-elements can be included in the
|
2015-10-07 15:14:09 +02:00
|
|
|
* optimized bitmap.
|
|
|
|
*/
|
2012-07-30 21:01:08 +02:00
|
|
|
#define ANQP_REQ_HS_CAPABILITY_LIST \
|
|
|
|
(0x10000 << HS20_STYPE_CAPABILITY_LIST)
|
2012-08-25 15:03:51 +02:00
|
|
|
#define ANQP_REQ_OPERATOR_FRIENDLY_NAME \
|
|
|
|
(0x10000 << HS20_STYPE_OPERATOR_FRIENDLY_NAME)
|
2012-08-25 15:09:01 +02:00
|
|
|
#define ANQP_REQ_WAN_METRICS \
|
|
|
|
(0x10000 << HS20_STYPE_WAN_METRICS)
|
2012-08-25 15:12:40 +02:00
|
|
|
#define ANQP_REQ_CONNECTION_CAPABILITY \
|
|
|
|
(0x10000 << HS20_STYPE_CONNECTION_CAPABILITY)
|
2012-08-25 15:28:29 +02:00
|
|
|
#define ANQP_REQ_NAI_HOME_REALM \
|
|
|
|
(0x10000 << HS20_STYPE_NAI_HOME_REALM_QUERY)
|
2012-08-25 15:17:21 +02:00
|
|
|
#define ANQP_REQ_OPERATING_CLASS \
|
|
|
|
(0x10000 << HS20_STYPE_OPERATING_CLASS)
|
2013-03-17 15:34:09 +01:00
|
|
|
#define ANQP_REQ_OSU_PROVIDERS_LIST \
|
|
|
|
(0x10000 << HS20_STYPE_OSU_PROVIDERS_LIST)
|
2013-03-17 15:28:59 +01:00
|
|
|
#define ANQP_REQ_ICON_REQUEST \
|
|
|
|
(0x10000 << HS20_STYPE_ICON_REQUEST)
|
2017-03-10 17:33:51 +01:00
|
|
|
/* The first MBO ANQP-element can be included in the optimized bitmap. */
|
|
|
|
#define ANQP_REQ_MBO_CELL_DATA_CONN_PREF \
|
|
|
|
(BIT(29) << MBO_ANQP_SUBTYPE_CELL_CONN_PREF)
|
2012-02-26 21:34:19 +01:00
|
|
|
|
|
|
|
struct gas_dialog_info {
|
|
|
|
u8 valid;
|
|
|
|
struct wpabuf *sd_resp; /* Fragmented response */
|
|
|
|
u8 dialog_token;
|
|
|
|
size_t sd_resp_pos; /* Offset in sd_resp */
|
|
|
|
u8 sd_frag_id;
|
2014-01-23 10:15:28 +01:00
|
|
|
int prot; /* whether Protected Dual of Public Action frame is used */
|
2012-02-26 21:34:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct hostapd_data;
|
|
|
|
|
|
|
|
struct gas_dialog_info *
|
|
|
|
gas_serv_dialog_find(struct hostapd_data *hapd, const u8 *addr,
|
|
|
|
u8 dialog_token);
|
|
|
|
void gas_serv_dialog_clear(struct gas_dialog_info *dialog);
|
|
|
|
|
|
|
|
int gas_serv_init(struct hostapd_data *hapd);
|
|
|
|
void gas_serv_deinit(struct hostapd_data *hapd);
|
|
|
|
|
|
|
|
#endif /* GAS_SERV_H */
|