diff --git a/src/common/dpp.c b/src/common/dpp.c index 3922edb63..552d7626c 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -4317,6 +4317,7 @@ void dpp_global_deinit(struct dpp_global *dpp) #ifdef CONFIG_DPP2 + struct wpabuf * dpp_build_presence_announcement(struct dpp_bootstrap_info *bi) { struct wpabuf *msg; @@ -4333,4 +4334,17 @@ struct wpabuf * dpp_build_presence_announcement(struct dpp_bootstrap_info *bi) "DPP: Presence Announcement frame attributes", msg); return msg; } + + +void dpp_notify_chirp_received(void *msg_ctx, int id, const u8 *src, + unsigned int freq, const u8 *hash) +{ + char hex[SHA256_MAC_LEN * 2 + 1]; + + wpa_snprintf_hex(hex, sizeof(hex), hash, SHA256_MAC_LEN); + wpa_msg(msg_ctx, MSG_INFO, + DPP_EVENT_CHIRP_RX "id=%d src=" MACSTR " freq=%u hash=%s", + id, MAC2STR(src), freq, hex); +} + #endif /* CONFIG_DPP2 */ diff --git a/src/common/dpp.h b/src/common/dpp.h index 011098f03..a39e87ed5 100644 --- a/src/common/dpp.h +++ b/src/common/dpp.h @@ -686,6 +686,8 @@ int dpp_tcp_init(struct dpp_global *dpp, struct dpp_authentication *auth, struct dpp_authentication *auth)); struct wpabuf * dpp_build_presence_announcement(struct dpp_bootstrap_info *bi); +void dpp_notify_chirp_received(void *msg_ctx, int id, const u8 *src, + unsigned int freq, const u8 *hash); struct dpp_global_config { void *cb_ctx; diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index 4e42c890f..52888d730 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -202,6 +202,7 @@ extern "C" { #define DPP_EVENT_MUD_URL "DPP-MUD-URL " #define DPP_EVENT_BAND_SUPPORT "DPP-BAND-SUPPORT " #define DPP_EVENT_CSR "DPP-CSR " +#define DPP_EVENT_CHIRP_RX "DPP-CHIRP-RX " /* MESH events */ #define MESH_GROUP_STARTED "MESH-GROUP-STARTED "