Create wifi backend abstraction

This commit is contained in:
nemunaire 2026-01-01 22:13:18 +07:00
commit 79c28da9c5
7 changed files with 401 additions and 174 deletions

View file

@ -11,6 +11,7 @@ import (
type Config struct {
Bind string
WifiInterface string
WifiBackend string
UseARPDiscovery bool
DHCPLeasesPath string
ARPTablePath string
@ -75,6 +76,11 @@ func ConsolidateConfig() (opts *Config, err error) {
return
}
// Validate configuration
if opts.WifiBackend != "iwd" && opts.WifiBackend != "wpasupplicant" {
log.Fatalf("wifi-backend must be set to 'iwd' or 'wpasupplicant' (got: '%s')", opts.WifiBackend)
}
return
}