Translated all files to ENG (#5)

Reviewed-on: #5
Co-authored-by: Finn <fwaggoner@nmfpgt.de>
Co-committed-by: Finn <fwaggoner@nmfpgt.de>
This commit was merged in pull request #5.
This commit is contained in:
2026-07-12 01:45:38 +01:00
committed by Koda
parent fb542777ca
commit 59274da4e5
14 changed files with 317 additions and 307 deletions
+14 -14
View File
@@ -4,15 +4,15 @@
/*
* openuf - sysinfo.h
*
* Lee estasticas del sistema (CPU, RAM, interfaces, radios).
* Todas las lecturas son del kernel Linux directamente:
* Reads system statistics (CPU, RAM, interfaces, radios).
* All readings come directly from the Linux kernel:
*
* /proc/stat → uso CPU (deltas entre dos snapshots)
* /proc/meminfo → memoria total/libre/buffer/cache
* /proc/net/dev → contadores rx/tx por interfaz
* /proc/stat → CPU usage (deltas between two snapshots)
* /proc/meminfo → total/free/buffer/cache memory
* /proc/net/dev → rx/tx counters per interface
* /sys/class/net/ → speed, duplex, operstate, MAC
* iw dev <if> info → canal actual, potencia TX
* iw dev <if> survey dump → utilización del canal
* iw dev <if> info → current channel, TX power
* iw dev <if> survey dump → channel utilization
*/
#include <stdbool.h>
@@ -28,9 +28,9 @@ typedef struct {
int sysinfo_mem(mem_stats_t *out);
/* ── CPU ─────────────────────────────────────────────────────────── */
/* Retorna % uso CPU (0-100). Primera llamada retorna 0 (toma snapshot).
* Las siguientes calculan el delta respecto a la anterior.
* Con intervalo de 10s da un buen promedio de uso. */
/* Returns % CPU usage (0-100). The first call returns 0 (takes a snapshot).
* Subsequent calls compute the delta relative to the previous one.
* With a 10s interval this gives a good average of usage. */
int sysinfo_cpu_percent(void);
/* ── Interfaz de red ─────────────────────────────────────────────── */
@@ -39,7 +39,7 @@ typedef struct {
char mac[32];
char ip[64];
bool up;
int speed; /* Mbps: 10/100/1000; -1 si no disponible */
int speed; /* Mbps: 10/100/1000; -1 if not available */
bool full_duplex;
long long rx_bytes;
long long tx_bytes;
@@ -60,9 +60,9 @@ typedef struct {
char iface[32];
int channel;
int tx_power;
int cu_total; /* % uso canal total */
int cu_self_tx; /* % tiempo transmitiendo */
int cu_self_rx; /* % tiempo recibiendo */
int cu_total; /* % total channel usage */
int cu_self_tx; /* % time spent transmitting */
int cu_self_rx; /* % time spent receiving */
int num_sta;
int noise; /* dBm */
} radio_stats_t;