35 lines
889 B
C
35 lines
889 B
C
#pragma once
|
|
#include "lwip/ip4_addr.h"
|
|
#include <stdbool.h>
|
|
|
|
#define MAX_CLIENTS 10
|
|
#define CAPTIVE_PORTAL_IP "192.168.4.1"
|
|
#define CAPTIVE_PORTAL_URL "http://192.168.4.1/"
|
|
|
|
/* DNS settings */
|
|
#define DNS_PORT 53
|
|
#define UPSTREAM_DNS "8.8.8.8"
|
|
|
|
/* ===== AUTH STATE ===== */
|
|
bool fakeap_is_authenticated(ip4_addr_t ip);
|
|
void fakeap_mark_authenticated(ip4_addr_t ip);
|
|
|
|
/* Internal use only - exported for mod_web_server.c */
|
|
extern ip4_addr_t authenticated_clients[MAX_CLIENTS];
|
|
extern int authenticated_count;
|
|
|
|
/* ===== ACCESS POINT ===== */
|
|
void start_access_point(const char *ssid, const char *password, bool open);
|
|
void stop_access_point(void);
|
|
|
|
/* ===== CAPTIVE PORTAL ===== */
|
|
void *start_captive_portal(void);
|
|
void stop_captive_portal(void);
|
|
|
|
/* ===== SNIFFER ===== */
|
|
void start_sniffer(void);
|
|
void stop_sniffer(void);
|
|
|
|
/* ===== CLIENTS ===== */
|
|
void list_connected_clients(void);
|