Lines Matching refs:anqp
523 static struct nai_realm * nai_realm_parse(struct wpabuf *anqp, u16 *count) in nai_realm_parse() argument
530 if (anqp == NULL) in nai_realm_parse()
532 left = wpabuf_len(anqp); in nai_realm_parse()
536 pos = wpabuf_head_u8(anqp); in nai_realm_parse()
730 static int plmn_id_match(struct wpabuf *anqp, const char *imsi, int mnc_len) in plmn_id_match() argument
756 if (anqp == NULL) in plmn_id_match()
758 pos = wpabuf_head_u8(anqp); in plmn_id_match()
759 end = pos + wpabuf_len(anqp); in plmn_id_match()
981 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL) in interworking_connect_3gpp()
1122 static int roaming_consortium_anqp_match(const struct wpabuf *anqp, in roaming_consortium_anqp_match() argument
1128 if (anqp == NULL) in roaming_consortium_anqp_match()
1131 pos = wpabuf_head(anqp); in roaming_consortium_anqp_match()
1132 end = pos + wpabuf_len(anqp); in roaming_consortium_anqp_match()
1148 static int roaming_consortium_match(const u8 *ie, const struct wpabuf *anqp, in roaming_consortium_match() argument
1152 roaming_consortium_anqp_match(anqp, rc_id, rc_len); in roaming_consortium_match()
1157 const struct wpabuf *anqp, in cred_roaming_consortiums_match() argument
1163 if (roaming_consortium_match(ie, anqp, in cred_roaming_consortiums_match()
1183 (bss->anqp == NULL || bss->anqp->roaming_consortium == NULL)) in cred_no_required_oi_match()
1187 bss->anqp ? in cred_no_required_oi_match()
1188 bss->anqp->roaming_consortium : NULL, in cred_no_required_oi_match()
1229 if (bss->anqp == NULL || bss->anqp->hs20_wan_metrics == NULL) in cred_below_min_backhaul()
1232 wan = wpabuf_head(bss->anqp->hs20_wan_metrics); in cred_below_min_backhaul()
1254 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_below_min_backhaul()
1255 bss->anqp->domain_name : NULL); in cred_below_min_backhaul()
1286 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_over_max_bss_load()
1287 bss->anqp->domain_name : NULL); in cred_over_max_bss_load()
1337 if (bss->anqp == NULL || bss->anqp->hs20_connection_capability == NULL) in cred_conn_capab_missing()
1341 res = interworking_home_sp_cred(wpa_s, cred, bss->anqp ? in cred_conn_capab_missing()
1342 bss->anqp->domain_name : NULL); in cred_conn_capab_missing()
1346 capab = wpabuf_head(bss->anqp->hs20_connection_capability); in cred_conn_capab_missing()
1347 end = capab + wpabuf_len(bss->anqp->hs20_connection_capability); in cred_conn_capab_missing()
1377 const struct wpabuf *anqp; in interworking_credentials_available_roaming_consortium() local
1381 anqp = bss->anqp ? bss->anqp->roaming_consortium : NULL; in interworking_credentials_available_roaming_consortium()
1383 if (!ie && !anqp) in interworking_credentials_available_roaming_consortium()
1398 !roaming_consortium_match(ie, anqp, in interworking_credentials_available_roaming_consortium()
1401 !cred_roaming_consortiums_match(ie, anqp, cred) && in interworking_credentials_available_roaming_consortium()
1404 ie, anqp, cred->required_roaming_consortium, in interworking_credentials_available_roaming_consortium()
1572 const struct wpabuf *anqp; in interworking_connect_roaming_consortium() local
1604 anqp = bss->anqp ? bss->anqp->roaming_consortium : NULL; in interworking_connect_roaming_consortium()
1605 for (i = 0; (ie || anqp) && i < cred->num_roaming_consortiums; i++) { in interworking_connect_roaming_consortium()
1607 ie, anqp, cred->roaming_consortiums[i], in interworking_connect_roaming_consortium()
1767 realm = nai_realm_parse(bss->anqp ? bss->anqp->nai_realm : NULL, in interworking_connect()
1944 if (bss->anqp == NULL || bss->anqp->anqp_3gpp == NULL) { in interworking_credentials_available_3gpp()
1947 bss->anqp, bss->anqp ? bss->anqp->anqp_3gpp : NULL); in interworking_credentials_available_3gpp()
2020 ret = plmn_id_match(bss->anqp->anqp_3gpp, imsi, mnc_len); in interworking_credentials_available_3gpp()
2068 if (bss->anqp == NULL || bss->anqp->nai_realm == NULL) in interworking_credentials_available_realm()
2076 realm = nai_realm_parse(bss->anqp->nai_realm, &count); in interworking_credentials_available_realm()
2359 if (bss->anqp == NULL || bss->anqp->domain_name == NULL) { in roaming_prio()
2364 if (interworking_home_sp_cred(wpa_s, cred, bss->anqp->domain_name) > 0) in roaming_prio()
2372 bss->anqp->domain_name)) { in roaming_prio()
2473 res = interworking_home_sp(wpa_s, bss->anqp ? in interworking_select_network()
2474 bss->anqp->domain_name : NULL); in interworking_select_network()
2608 if (other->anqp == NULL) in interworking_match_anqp_info()
2610 if (other->anqp->roaming_consortium == NULL && in interworking_match_anqp_info()
2611 other->anqp->nai_realm == NULL && in interworking_match_anqp_info()
2612 other->anqp->anqp_3gpp == NULL && in interworking_match_anqp_info()
2613 other->anqp->domain_name == NULL) in interworking_match_anqp_info()
2627 other->anqp->users++; in interworking_match_anqp_info()
2628 return other->anqp; in interworking_match_anqp_info()
2668 if (bss->anqp == NULL) { in interworking_next_anqp_fetch()
2669 bss->anqp = interworking_match_anqp_info(wpa_s, in interworking_next_anqp_fetch()
2671 if (bss->anqp) { in interworking_next_anqp_fetch()
2675 bss->anqp = wpa_bss_anqp_alloc(); in interworking_next_anqp_fetch()
2676 if (bss->anqp == NULL) in interworking_next_anqp_fetch()
2834 struct wpa_bss_anqp *anqp, u16 info_id, in anqp_add_extra() argument
2839 if (!anqp) in anqp_add_extra()
2842 dl_list_for_each(tmp, &anqp->anqp_elems, struct wpa_bss_anqp_elem, in anqp_add_extra()
2855 dl_list_add(&anqp->anqp_elems, &elem->list); in anqp_add_extra()
2901 struct wpa_bss_anqp *anqp = NULL; in interworking_parse_rx_anqp_resp() local
2906 anqp = bss->anqp; in interworking_parse_rx_anqp_resp()
2914 if (anqp) { in interworking_parse_rx_anqp_resp()
2915 wpabuf_free(anqp->capability_list); in interworking_parse_rx_anqp_resp()
2916 anqp->capability_list = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2923 if (anqp) { in interworking_parse_rx_anqp_resp()
2924 wpabuf_free(anqp->venue_name); in interworking_parse_rx_anqp_resp()
2925 anqp->venue_name = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2934 if (anqp) { in interworking_parse_rx_anqp_resp()
2935 wpabuf_free(anqp->network_auth_type); in interworking_parse_rx_anqp_resp()
2936 anqp->network_auth_type = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2944 if (anqp) { in interworking_parse_rx_anqp_resp()
2945 wpabuf_free(anqp->roaming_consortium); in interworking_parse_rx_anqp_resp()
2946 anqp->roaming_consortium = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2955 if (anqp) { in interworking_parse_rx_anqp_resp()
2956 wpabuf_free(anqp->ip_addr_type_availability); in interworking_parse_rx_anqp_resp()
2957 anqp->ip_addr_type_availability = in interworking_parse_rx_anqp_resp()
2965 if (anqp) { in interworking_parse_rx_anqp_resp()
2966 wpabuf_free(anqp->nai_realm); in interworking_parse_rx_anqp_resp()
2967 anqp->nai_realm = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2975 if (anqp) { in interworking_parse_rx_anqp_resp()
2976 wpabuf_free(anqp->anqp_3gpp); in interworking_parse_rx_anqp_resp()
2977 anqp->anqp_3gpp = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2984 if (anqp) { in interworking_parse_rx_anqp_resp()
2985 wpabuf_free(anqp->domain_name); in interworking_parse_rx_anqp_resp()
2986 anqp->domain_name = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
2995 if (anqp) { in interworking_parse_rx_anqp_resp()
2996 wpabuf_free(anqp->fils_realm_info); in interworking_parse_rx_anqp_resp()
2997 anqp->fils_realm_info = wpabuf_alloc_copy(pos, slen); in interworking_parse_rx_anqp_resp()
3005 anqp_add_extra(wpa_s, anqp, info_id, pos, slen, in interworking_parse_rx_anqp_resp()
3060 anqp_add_extra(wpa_s, anqp, info_id, data, slen, in interworking_parse_rx_anqp_resp()
3155 wpas_notify_anqp_query_done(wpa_s, dst, anqp_result, bss ? bss->anqp : NULL); in anqp_resp_cb()