Add Network Tools And Nested Command Completion

This commit is contained in:
2026-08-23 15:47:28 +02:00
parent c5f3595173
commit f9d3e9ece5
12 changed files with 1141 additions and 94 deletions
+8
View File
@@ -16,6 +16,7 @@
#include "esp_wifi_types.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "network_console.h"
#include "wifi_config.h"
#include "wifi_manager.h"
@@ -35,6 +36,9 @@ static void print_usage(void)
printf(" wifi ap channel <1..11>\n");
printf(" wifi ap secret|show-secret\n");
printf(" wifi save|load|defaults|reset\n");
printf(" wifi ping <host> [count]\n");
printf(" wifi nslookup <host>\n");
printf(" wifi traceroute <host> [max-hops]\n");
}
static bool parse_u32(const char *text, uint32_t maximum, uint32_t *value)
@@ -589,6 +593,10 @@ static int queue_lifecycle(const char *operation)
static int command_wifi(int argc, char **argv)
{
if (argc >= 2 && network_console_is_command(argv[1])) {
/* Shift `wifi` away so aliases and subcommands share one implementation. */
return network_console_execute(argc - 1, argv + 1);
}
if (argc == 1 || (argc == 2 && strcmp(argv[1], "status") == 0)) {
return show_status();
}