/* Staged WiFi connect request, written by the network menu and read by * `wifi connectfile `. * * The normal `wifi connect ` command arguments are limited by * SYS_SPAWN's VFS_PATH_MAX buffer (64 bytes), which is too small for a long * SSID plus a 63-character WPA2 passphrase. The menu therefore writes this * fixed-size record to a /share file and spawns a helper with a short path. */ #ifndef WIFI_CFG_H #define WIFI_CFG_H #define WIFI_CFG_MAGIC 0x4E425746u /* "NBWF" */ #define WIFI_CFG_STAGED "/share/netmenu.wifi" #define WIFI_CRED_PATH "/data/WIFI.CFG" struct wifi_cfg { unsigned int magic; unsigned char ssid_len; /* 1..32 */ unsigned char pass_len; /* 0..64 (64 = raw hex PSK) */ unsigned char bssid[6]; unsigned char ssid[32]; char pass[65]; /* NUL terminated, pass_len used */ }; #endif