#ifdef NEED_AP_MLME
+
static int hostapd_ctrl_iface_track_sta_list(struct hostapd_data *hapd,
char *buf, size_t buflen)
{
return pos - buf;
}
+
+
+static int hostapd_ctrl_iface_dump_beacon(struct hostapd_data *hapd,
+ char *buf, size_t buflen)
+{
+ struct beacon_data beacon;
+ char *pos, *end;
+ int ret;
+
+ if (hostapd_build_beacon_data(hapd, &beacon) < 0)
+ return -1;
+
+ if (2 * (beacon.head_len + beacon.tail_len) > buflen)
+ return -1;
+
+ pos = buf;
+ end = buf + buflen;
+
+ ret = wpa_snprintf_hex(pos, end - pos, beacon.head, beacon.head_len);
+ pos += ret;
+
+ ret = wpa_snprintf_hex(pos, end - pos, beacon.tail, beacon.tail_len);
+ pos += ret;
+
+ free_beacon_data(&beacon);
+
+ return pos - buf;
+}
+
#endif /* NEED_AP_MLME */
} else if (os_strcmp(buf, "TRACK_STA_LIST") == 0) {
reply_len = hostapd_ctrl_iface_track_sta_list(
hapd, reply, reply_size);
+ } else if (os_strcmp(buf, "DUMP_BEACON") == 0) {
+ reply_len = hostapd_ctrl_iface_dump_beacon(hapd, reply,
+ reply_size);
#endif /* NEED_AP_MLME */
} else if (os_strcmp(buf, "PMKSA") == 0) {
reply_len = hostapd_ctrl_iface_pmksa_list(hapd, reply,
}
-static int hostapd_build_beacon_data(struct hostapd_data *hapd,
- struct beacon_data *beacon)
+int hostapd_build_beacon_data(struct hostapd_data *hapd,
+ struct beacon_data *beacon)
{
struct wpabuf *beacon_extra, *proberesp_extra, *assocresp_extra;
struct wpa_driver_ap_params params;
u8 hostapd_get_active_links(struct hostapd_data *hapd);
struct hostapd_data * hostapd_mld_get_first_bss(struct hostapd_data *hapd);
+int hostapd_build_beacon_data(struct hostapd_data *hapd,
+ struct beacon_data *beacon);
void free_beacon_data(struct beacon_data *beacon);
int hostapd_fill_cca_settings(struct hostapd_data *hapd,
struct cca_settings *settings);