#ifndef BEACON_H #define BEACON_H #include #include // For MAC address type, channel functions #include "ui.h" // For ButtonPressType, UIState access #include "scanner.h" // <<< INCLUDE for AccessPointInfo definition // --- Beacon Module States --- enum class BeaconStateType { MODE_SELECTION, // Choose between Random / Target SELECT_TARGET_AP, // Show AP list from scanner to choose target FLOODING_RANDOM, // Flooding random SSIDs from list (old behavior) FLOODING_TARGET // Flooding target SSID with random BSSIDs }; // --- Constants --- #define BEACON_PACKET_INTERVAL 10 // ms between sending beacon packets (adjust as needed) #define BEACON_CHANNEL_HOP_INTERVAL 500 // ms between channel changes #define MAX_BEACON_SSIDS 20 // Max number of SSIDs in our list #define MAX_SSID_LEN 32 // --- Global Variables (accessible by other modules if needed) --- extern bool beacon_flood_active; extern uint8_t beacon_target_ap_bssid[6]; // Store selected target BSSID extern char beacon_target_ap_ssid[33]; // Store selected target SSID extern uint8_t beacon_target_ap_channel; // Store selected target channel // --- Function Declarations --- void beacon_init(); void beacon_update(); void beacon_stop(); // Function to stop the flood cleanly void beacon_draw(); // Function to draw beacon UI based on state void beacon_handle_input(ButtonPressType pressType); // Handle button presses // --- SDK function declarations (already in deauth.h, but good practice) --- extern "C" { #include "user_interface.h" int wifi_send_pkt_freedom(uint8_t *buf, int len, bool sys_seq); bool wifi_set_channel(uint8_t channel); uint8_t wifi_get_channel(); // Add others if needed (e.g., wifi_promiscuous_enable) } #endif // BEACON_H