pub struct SSHStampConfig {Show 13 fields
pub hostkey: SignKey,
pub pubkeys: [Option<Ed25519PubKey>; 1],
pub wifi_ap_ssid: String<32>,
pub wifi_ap_pw: String<63>,
pub wifi_ap_band: u8,
pub wifi_sta_ssid: String<32>,
pub wifi_sta_pw: String<63>,
pub mac: [u8; 6],
pub ipv4_static: Option<StaticConfigV4>,
pub ipv6_static: Option<StaticConfigV6>,
pub uart_pins: UartPins,
pub uart_params: UartParams,
pub first_login: bool,
}Fields§
§hostkey: SignKey§pubkeys: [Option<Ed25519PubKey>; 1]Authentication: only pubkey-based auth supported
wifi_ap_ssid: String<32>WiFi
Access Point Mode
wifi_ap_pw: String<63>§wifi_ap_band: u8AP band mode (2.4GHz / 5GHz / Auto). Ignored on chips without 5GHz.
wifi_sta_ssid: String<32>Station Mode
wifi_sta_pw: String<63>§mac: [u8; 6]Networking MAC address. Special values:
[0xFF; 6]: Generate random MAC on each boot- Otherwise: Use the stored MAC (defaults to hardware eFuse MAC)
ipv4_static: Option<StaticConfigV4>None for DHCP
ipv6_static: Option<StaticConfigV6>§uart_pins: UartPinsUART
uart_params: UartParamsUART line parameters (baud, data bits, parity, stop bits) for the
serial bridge. Settable via the SSH_STAMP_UART_* env vars.
first_login: boolTrue until a pubkey is provisioned. Further changes require authentication.
Implementations§
Source§impl SSHStampConfig
impl SSHStampConfig
Sourcepub const CURRENT_VERSION: u8 = 12
pub const CURRENT_VERSION: u8 = 12
Bump this when the format changes
Sourcepub fn is_mac_random(&self) -> bool
pub fn is_mac_random(&self) -> bool
Check if configured for random MAC on each boot
Sourcepub fn resolve_mac(&self) -> Result<[u8; 6]>
pub fn resolve_mac(&self) -> Result<[u8; 6]>
Sourcepub fn new(default_mac: [u8; 6], uart_pins: UartPins) -> Result<Self>
pub fn new(default_mac: [u8; 6], uart_pins: UartPins) -> Result<Self>
Creates a new config with default parameters.
default_mac is the MAC the platform wants the device to default to
(typically read from hardware OTP/eFuse). Stored as-is in the config;
may be overwritten later via the SSH_STAMP_WIFI_MAC_* env vars.
uart_pins is the TX/RX pin assignment, which is target-specific and
must be provided by the port binary.
§Errors
Will only fail on RNG failure.