Lines Matching refs:ifaces

1529 	struct hapd_interfaces *ifaces = hapd->iface->interfaces;  in hostapd_dpp_pb_active()  local
1531 return ifaces && (ifaces->dpp_pb_time.sec || in hostapd_dpp_pb_active()
1532 ifaces->dpp_pb_time.usec); in hostapd_dpp_pb_active()
1538 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_remove_pb_hash() local
1541 if (!ifaces->dpp_pb_bi) in hostapd_dpp_remove_pb_hash()
1544 struct dpp_pb_info *info = &ifaces->dpp_pb[i]; in hostapd_dpp_remove_pb_hash()
1548 if (os_memcmp(info->hash, ifaces->dpp_pb_resp_hash, in hostapd_dpp_remove_pb_hash()
1570 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_rx_conf_result() local
1618 if (!ifaces->dpp_pb_result_indicated && hostapd_dpp_pb_active(hapd)) { in hostapd_dpp_rx_conf_result()
1625 ifaces->dpp_pb_result_indicated = true; in hostapd_dpp_rx_conf_result()
2342 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_rx_pkex_commit_reveal_resp() local
2363 bi = dpp_pkex_finish(ifaces->dpp, pkex, src, freq); in hostapd_dpp_rx_pkex_commit_reveal_resp()
2369 if (ifaces->dpp_pb_bi && in hostapd_dpp_rx_pkex_commit_reveal_resp()
2370 os_memcmp(bi->pubkey_hash_chirp, ifaces->dpp_pb_resp_hash, in hostapd_dpp_rx_pkex_commit_reveal_resp()
2381 ifaces->dpp_pb_resp_hash, SHA256_MAC_LEN); in hostapd_dpp_rx_pkex_commit_reveal_resp()
2384 dpp_bootstrap_remove(ifaces->dpp, id); in hostapd_dpp_rx_pkex_commit_reveal_resp()
2410 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_pb_pkex_init() local
2436 hapd->dpp_pkex_bi = ifaces->dpp_pb_bi; in hostapd_dpp_pb_pkex_init()
2437 os_memcpy(ifaces->dpp_pb_resp_hash, r_hash, SHA256_MAC_LEN); in hostapd_dpp_pb_pkex_init()
2440 "PBPKEX", (const char *) ifaces->dpp_pb_c_nonce, in hostapd_dpp_pb_pkex_init()
2441 ifaces->dpp_pb_bi->curve->nonce_len, in hostapd_dpp_pb_pkex_init()
2452 if (ifaces->dpp_pb_cmd) { in hostapd_dpp_pb_pkex_init()
2455 len = 30 + os_strlen(ifaces->dpp_pb_cmd); in hostapd_dpp_pb_pkex_init()
2462 hapd->dpp_pkex_bi->id, ifaces->dpp_pb_cmd); in hostapd_dpp_pb_pkex_init()
2568 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_rx_pb_presence_announcement() local
2577 if (!ifaces) in hostapd_dpp_rx_pb_presence_announcement()
2595 info = &ifaces->dpp_pb[i]; in hostapd_dpp_rx_pb_presence_announcement()
2607 tmp = &ifaces->dpp_pb[i]; in hostapd_dpp_rx_pb_presence_announcement()
2623 if (!ifaces->dpp_pb_result_indicated && in hostapd_dpp_rx_pb_presence_announcement()
2627 ifaces->dpp_pb_result_indicated = true; in hostapd_dpp_rx_pb_presence_announcement()
2634 info = &ifaces->dpp_pb[0]; in hostapd_dpp_rx_pb_presence_announcement()
2636 tmp = &ifaces->dpp_pb[i]; in hostapd_dpp_rx_pb_presence_announcement()
2651 if (ifaces->dpp_pb_announce_time.sec == 0 && in hostapd_dpp_rx_pb_presence_announcement()
2652 ifaces->dpp_pb_announce_time.usec == 0) { in hostapd_dpp_rx_pb_presence_announcement()
2654 ifaces->dpp_pb_announce_time = now; in hostapd_dpp_rx_pb_presence_announcement()
2657 if (!ifaces->dpp_pb_bi) { in hostapd_dpp_rx_pb_presence_announcement()
2660 res = dpp_bootstrap_gen(ifaces->dpp, "type=pkex"); in hostapd_dpp_rx_pb_presence_announcement()
2663 ifaces->dpp_pb_bi = dpp_bootstrap_get_id(ifaces->dpp, res); in hostapd_dpp_rx_pb_presence_announcement()
2664 if (!ifaces->dpp_pb_bi) in hostapd_dpp_rx_pb_presence_announcement()
2667 if (random_get_bytes(ifaces->dpp_pb_c_nonce, in hostapd_dpp_rx_pb_presence_announcement()
2668 ifaces->dpp_pb_bi->curve->nonce_len)) { in hostapd_dpp_rx_pb_presence_announcement()
2679 os_reltime_sub(&now, &ifaces->dpp_pb_last_resp, &age); in hostapd_dpp_rx_pb_presence_announcement()
2687 ifaces->dpp_pb_bi, r_hash, ifaces->dpp_pb_c_nonce, in hostapd_dpp_rx_pb_presence_announcement()
2688 ifaces->dpp_pb_bi->curve->nonce_len); in hostapd_dpp_rx_pb_presence_announcement()
2697 ifaces->dpp_pb_last_resp = now; in hostapd_dpp_rx_pb_presence_announcement()
2706 if (os_reltime_expired(&now, &ifaces->dpp_pb_announce_time, 15)) in hostapd_dpp_rx_pb_presence_announcement()
3129 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_gas_status_handler() local
3172 if (!ifaces->dpp_pb_result_indicated && hostapd_dpp_pb_active(hapd)) { in hostapd_dpp_gas_status_handler()
3179 ifaces->dpp_pb_result_indicated = true; in hostapd_dpp_gas_status_handler()
3927 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_push_button() local
3929 if (!ifaces || !ifaces->dpp) in hostapd_dpp_push_button()
3931 os_get_reltime(&ifaces->dpp_pb_time); in hostapd_dpp_push_button()
3932 ifaces->dpp_pb_announce_time.sec = 0; in hostapd_dpp_push_button()
3933 ifaces->dpp_pb_announce_time.usec = 0; in hostapd_dpp_push_button()
3934 str_clear_free(ifaces->dpp_pb_cmd); in hostapd_dpp_push_button()
3935 ifaces->dpp_pb_cmd = NULL; in hostapd_dpp_push_button()
3937 ifaces->dpp_pb_cmd = os_strdup(cmd); in hostapd_dpp_push_button()
3938 if (!ifaces->dpp_pb_cmd) in hostapd_dpp_push_button()
3951 struct hapd_interfaces *ifaces = hapd->iface->interfaces; in hostapd_dpp_push_button_stop() local
3953 if (!ifaces || !ifaces->dpp) in hostapd_dpp_push_button_stop()
3958 if (!ifaces->dpp_pb_result_indicated) in hostapd_dpp_push_button_stop()
3962 ifaces->dpp_pb_time.sec = 0; in hostapd_dpp_push_button_stop()
3963 ifaces->dpp_pb_time.usec = 0; in hostapd_dpp_push_button_stop()
3970 if (ifaces->dpp_pb_bi) { in hostapd_dpp_push_button_stop()
3974 for (i = 0; i < ifaces->count; i++) { in hostapd_dpp_push_button_stop()
3975 struct hostapd_iface *iface = ifaces->iface[i]; in hostapd_dpp_push_button_stop()
3981 if (h->dpp_pkex_bi == ifaces->dpp_pb_bi) in hostapd_dpp_push_button_stop()
3986 os_snprintf(id, sizeof(id), "%u", ifaces->dpp_pb_bi->id); in hostapd_dpp_push_button_stop()
3987 dpp_bootstrap_remove(ifaces->dpp, id); in hostapd_dpp_push_button_stop()
3988 ifaces->dpp_pb_bi = NULL; in hostapd_dpp_push_button_stop()
3991 ifaces->dpp_pb_result_indicated = false; in hostapd_dpp_push_button_stop()
3993 str_clear_free(ifaces->dpp_pb_cmd); in hostapd_dpp_push_button_stop()
3994 ifaces->dpp_pb_cmd = NULL; in hostapd_dpp_push_button_stop()