Interworking: Add advertising of 3GPP Cellular Network info
The anqp_3gpp_cell_net parameter can be used to configure hostapd to advertise 3GPP Cellular Network ANQP information. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
78c4ef2184
commit
7515adb2b1
6 changed files with 113 additions and 0 deletions
|
@ -499,6 +499,7 @@ static void hostapd_config_free_bss(struct hostapd_bss_config *conf)
|
|||
os_free(conf->roaming_consortium);
|
||||
os_free(conf->venue_name);
|
||||
os_free(conf->network_auth_type);
|
||||
os_free(conf->anqp_3gpp_cell_net);
|
||||
os_free(conf->domain_name);
|
||||
|
||||
#ifdef CONFIG_RADIUS_TEST
|
||||
|
|
|
@ -396,6 +396,10 @@ struct hostapd_bss_config {
|
|||
u8 ipaddr_type_availability;
|
||||
u8 ipaddr_type_configured;
|
||||
|
||||
/* IEEE 802.11u - 3GPP Cellular Network */
|
||||
u8 *anqp_3gpp_cell_net;
|
||||
size_t anqp_3gpp_cell_net_len;
|
||||
|
||||
/* IEEE 802.11u - Domain Name */
|
||||
u8 *domain_name;
|
||||
size_t domain_name_len;
|
||||
|
|
|
@ -158,6 +158,8 @@ static void anqp_add_capab_list(struct hostapd_data *hapd,
|
|||
wpabuf_put_le16(buf, ANQP_ROAMING_CONSORTIUM);
|
||||
if (hapd->conf->ipaddr_type_configured)
|
||||
wpabuf_put_le16(buf, ANQP_IP_ADDR_TYPE_AVAILABILITY);
|
||||
if (hapd->conf->anqp_3gpp_cell_net)
|
||||
wpabuf_put_le16(buf, ANQP_3GPP_CELLULAR_NETWORK);
|
||||
if (hapd->conf->domain_name)
|
||||
wpabuf_put_le16(buf, ANQP_DOMAIN_NAME);
|
||||
anqp_add_hs_capab_list(hapd, buf);
|
||||
|
@ -225,6 +227,19 @@ static void anqp_add_ip_addr_type_availability(struct hostapd_data *hapd,
|
|||
}
|
||||
|
||||
|
||||
static void anqp_add_3gpp_cellular_network(struct hostapd_data *hapd,
|
||||
struct wpabuf *buf)
|
||||
{
|
||||
if (hapd->conf->anqp_3gpp_cell_net) {
|
||||
wpabuf_put_le16(buf, ANQP_3GPP_CELLULAR_NETWORK);
|
||||
wpabuf_put_le16(buf,
|
||||
hapd->conf->anqp_3gpp_cell_net_len);
|
||||
wpabuf_put_data(buf, hapd->conf->anqp_3gpp_cell_net,
|
||||
hapd->conf->anqp_3gpp_cell_net_len);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void anqp_add_domain_name(struct hostapd_data *hapd, struct wpabuf *buf)
|
||||
{
|
||||
if (hapd->conf->domain_name) {
|
||||
|
@ -257,6 +272,8 @@ gas_serv_build_gas_resp_payload(struct hostapd_data *hapd,
|
|||
anqp_add_roaming_consortium(hapd, buf);
|
||||
if (request & ANQP_REQ_IP_ADDR_TYPE_AVAILABILITY)
|
||||
anqp_add_ip_addr_type_availability(hapd, buf);
|
||||
if (request & ANQP_REQ_3GPP_CELLULAR_NETWORK)
|
||||
anqp_add_3gpp_cellular_network(hapd, buf);
|
||||
if (request & ANQP_REQ_DOMAIN_NAME)
|
||||
anqp_add_domain_name(hapd, buf);
|
||||
|
||||
|
@ -332,6 +349,12 @@ static void rx_anqp_query_list_id(struct hostapd_data *hapd, u16 info_id,
|
|||
hapd->conf->ipaddr_type_configured,
|
||||
0, 0, qi);
|
||||
break;
|
||||
case ANQP_3GPP_CELLULAR_NETWORK:
|
||||
set_anqp_req(ANQP_REQ_3GPP_CELLULAR_NETWORK,
|
||||
"3GPP Cellular Network",
|
||||
hapd->conf->anqp_3gpp_cell_net != NULL,
|
||||
0, 0, qi);
|
||||
break;
|
||||
case ANQP_DOMAIN_NAME:
|
||||
set_anqp_req(ANQP_REQ_DOMAIN_NAME, "Domain Name",
|
||||
hapd->conf->domain_name != NULL,
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
(1 << (ANQP_ROAMING_CONSORTIUM - ANQP_QUERY_LIST))
|
||||
#define ANQP_REQ_IP_ADDR_TYPE_AVAILABILITY \
|
||||
(1 << (ANQP_IP_ADDR_TYPE_AVAILABILITY - ANQP_QUERY_LIST))
|
||||
#define ANQP_REQ_3GPP_CELLULAR_NETWORK \
|
||||
(1 << (ANQP_3GPP_CELLULAR_NETWORK - ANQP_QUERY_LIST))
|
||||
#define ANQP_REQ_DOMAIN_NAME \
|
||||
(1 << (ANQP_DOMAIN_NAME - ANQP_QUERY_LIST))
|
||||
#define ANQP_REQ_HS_CAPABILITY_LIST \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue