system: configurable hostname (device identity)

Add a device hostname settable from the CLI (`hostname <text>`) and the
System Settings page. The value is sanitized on ingest to JSON-safe
printable ASCII (<=23 chars), stored in a shared __xdata buffer, seeded
to "RTLPlayground" at boot, persisted through the startup-config, and
reported in /information.json. It lives in the common header so other
modules can advertise it (LLDP uses it as the System Name TLV).
This commit is contained in:
d00f
2026-07-25 13:07:09 +02:00
parent 481c02c740
commit f21b3a32bd
8 changed files with 47 additions and 0 deletions
+5
View File
@@ -115,6 +115,11 @@ struct flash_region_t {
extern __xdata char port_names[9][PORT_NAME_SIZE];
/* System hostname (device identity). Set via `hostname <text>` and the System
* Settings page, reported in /information.json. Other modules (e.g. LLDP, which
* advertises it as the System Name TLV) read it from here. */
extern __xdata char hostname[24];
extern __xdata uint8_t uip_buf[UIP_CONF_BUFFER_SIZE+2];
extern __xdata struct uip_eth_addr uip_ethaddr;