adding more metric reporting (#27)

Reviewed-on: #27
This commit was merged in pull request #27.
This commit is contained in:
2026-07-14 23:09:21 +01:00
parent b014e67753
commit b52a0a165d
5 changed files with 573 additions and 42 deletions
+25
View File
@@ -49,6 +49,7 @@ typedef struct {
long long tx_errors;
long long rx_dropped;
long long tx_dropped;
long long rx_frame;
long long rx_multicast;
} iface_stats_t;
@@ -65,9 +66,33 @@ typedef struct {
int cu_self_rx; /* % time spent receiving */
int num_sta;
int noise; /* dBm */
int nss; /* usable spatial streams */
int tx_antennas; /* configured TX chains */
int rx_antennas; /* configured RX chains */
long long tx_packets;
long long tx_retries;
long long tx_failed;
long long tx_duration; /* microseconds */
long long rx_duration; /* microseconds */
} radio_stats_t;
/* iface: "wlan0", "wlan1" */
int sysinfo_radio(const char *iface, radio_stats_t *out);
#define MAX_SCAN_RESULTS 128
typedef struct {
char bssid[32];
char essid[64];
int frequency;
int channel;
int signal; /* dBm */
int rssi; /* controller-compatible quality, 0-100 */
int age; /* seconds since last seen */
bool secured;
} wifi_scan_t;
/* Read the kernel's cached BSS list without starting a disruptive scan. */
int sysinfo_wifi_scan_cache(const char *iface, wifi_scan_t *out, int max_out);
#endif /* OPENUF_SYSINFO_H */