Complete Phase 12 dual-stack networking
Add IPv6-aware Wi-Fi state, HTTPS/SSH listeners, mDNS service reconciliation, and browser Wi-Fi administration. Include a guarded build-local fix for mDNS 1.12.0 membership handling, focused regression suites, and Phase 12 acceptance documentation.
This commit is contained in:
+9
-2
@@ -40,6 +40,7 @@
|
||||
#include "web_diagnostics.h"
|
||||
#include "web_ui.h"
|
||||
#include "wifi_manager.h"
|
||||
#include "mdns_service.h"
|
||||
|
||||
#define WEB_SERVER_PORT 443U
|
||||
#define WEB_SERVER_STATUS_JSON_CAPACITY 3072U
|
||||
@@ -271,7 +272,7 @@ static esp_err_t status_handler(httpd_req_t *request)
|
||||
"{\n"
|
||||
" \"uptime_ms\":%" PRIu64 ",\n"
|
||||
" \"wifi\":{\"available\":%s,\"state\":\"%s\",\"sta_ipv4\":\"%s\","
|
||||
"\"rssi\":%d,\"channel\":%u,\"ap_running\":%s,\"ap_clients\":%u},\n"
|
||||
"\"ipv6_linklocal\":%s,\"ipv6_routable\":%s,\"rssi\":%d,\"channel\":%u,\"ap_running\":%s,\"ap_clients\":%u},\n"
|
||||
" \"serial\":{\"running\":%s,\"config_available\":%s,\"baud\":%" PRIu32 ","
|
||||
"\"data_bits\":\"%s\",\"parity\":\"%s\",\"stop_bits\":\"%s\","
|
||||
"\"flow\":\"%s\",\"rx_bytes\":%" PRIu64 ",\"rx_dropped\":%" PRIu64 ","
|
||||
@@ -289,7 +290,10 @@ static esp_err_t status_handler(httpd_req_t *request)
|
||||
(uint64_t)(esp_timer_get_time() / 1000),
|
||||
wifi_available ? "true" : "false",
|
||||
wifi_available ? wifi_manager_state_to_string(wifi.state) : "unavailable",
|
||||
ipv4, wifi_available ? (int)wifi.sta_rssi : 0,
|
||||
ipv4,
|
||||
wifi_available && wifi.ipv6_linklocal ? "true" : "false",
|
||||
wifi_available && wifi.ipv6_routable ? "true" : "false",
|
||||
wifi_available ? (int)wifi.sta_rssi : 0,
|
||||
wifi_available ? (unsigned int)wifi.sta_channel : 0U,
|
||||
wifi_available && wifi.ap_running ? "true" : "false",
|
||||
wifi_available ? (unsigned int)wifi.ap_client_count : 0U,
|
||||
@@ -786,6 +790,7 @@ static esp_err_t start_server(bool reserved)
|
||||
s_serial_transport_error = attach_error;
|
||||
s_serial_transport_attached = serial_transport_attached;
|
||||
s_admin_transport_owned = admin_transport_owned;
|
||||
mdns_service_set_https_available(error == ESP_OK);
|
||||
if (error == ESP_OK) {
|
||||
s_server = server;
|
||||
++s_counters.starts;
|
||||
@@ -824,6 +829,8 @@ static esp_err_t stop_server(uint32_t expected_generation, bool restart, bool re
|
||||
esp_err_t serial_transport_error = s_serial_transport_error;
|
||||
s_transitioning = true;
|
||||
if (s_generation != UINT32_MAX) ++s_generation;
|
||||
/* Admission is about to close, even if later teardown must be retried. */
|
||||
mdns_service_set_https_available(false);
|
||||
xSemaphoreGive(s_server_mutex);
|
||||
|
||||
web_cookie_auth_stop();
|
||||
|
||||
Reference in New Issue
Block a user