eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 54b6330845b7085f9db47c5703157cf71d106eda
parent b5aff74e3baa6d0d20449810c7cc0301b635b75e
Author: James Prestwood <prestwoj@gmail.com>
Date:   Fri, 23 Aug 2024 15:23:33 -0700

netdev: define netdev settings in netdev.h

Following knownnetworks, this moves the settings into a header file
which is easier to maintain/read.

Diffstat:
Msrc/netdev.c | 8++++----
Msrc/netdev.h | 5+++++
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/netdev.c b/src/netdev.c @@ -6264,16 +6264,16 @@ static int netdev_init(void) goto fail_netlink; } - if (!l_settings_get_int(settings, "General", "RoamThreshold", + if (!l_settings_get_int(settings, NETDEV_ROAM_THRESHOLD, &LOW_SIGNAL_THRESHOLD)) LOW_SIGNAL_THRESHOLD = -70; - if (!l_settings_get_int(settings, "General", "RoamThreshold5G", + if (!l_settings_get_int(settings, NETDEV_ROAM_THRESHOLD_5G, &LOW_SIGNAL_THRESHOLD_5GHZ)) LOW_SIGNAL_THRESHOLD_5GHZ = -76; - rand_addr_str = l_settings_get_value(settings, "General", - "AddressRandomization"); + rand_addr_str = l_settings_get_value(settings, + NETDEV_ADDRESS_RANDOMIZATION); if (rand_addr_str && !strcmp(rand_addr_str, "network")) mac_per_ssid = true; diff --git a/src/netdev.h b/src/netdev.h @@ -29,6 +29,11 @@ struct eapol_sm; struct mmpdu_header; struct diagnostic_station_info; +#define GENERAL "General" +#define NETDEV_ADDRESS_RANDOMIZATION GENERAL, "AddressRandomization" +#define NETDEV_ROAM_THRESHOLD GENERAL, "RoamThreshold" +#define NETDEV_ROAM_THRESHOLD_5G GENERAL, "RoamThreshold5G" + enum netdev_result { NETDEV_RESULT_OK, NETDEV_RESULT_AUTHENTICATION_FAILED,