#include "graphs/conntrack.h"
#include "graphs/contextswitches.h"
#include "graphs/hostapd-station-bandwidth.h"
+#include "graphs/hostapd-station-rate-info.h"
#include "graphs/hostapd-station-signal.h"
#include "graphs/loadavg.h"
#include "graphs/memory.h"
&conntrack_graph,
&contextswitches_graph,
&hostapd_station_bandwidth_graph,
+ &hostapd_station_rate_info_graph,
&hostapd_station_signal_graph,
&loadavg_graph,
&memory_graph,
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#include <limits.h>
+
+#include "../string.h"
+#include "graph.h"
+#include "hostapd-station-rate-info.h"
+
+static int hostapd_station_rate_info_title(td_ctx* ctx, td_graph* graph,
+ const char* object, char* title, size_t length) {
+ return __td_string_format(title, length, _("Station %s - Rate Information"), object);
+}
+
+static int hostapd_station_rate_info_vlabel(td_ctx* ctx, td_graph* graph,
+ const char* object, char* vlabel, size_t length) {
+ return __td_string_set(vlabel, length, _("Bits Per Second"));
+}
+
+static int hostapd_station_rate_info_render(td_ctx* ctx,
+ td_graph* graph, td_args* args, const char* object) {
+ int r;
+
+ // Require the source
+ r = td_graph_require_source(graph, args, "hostapd", object);
+ if (r < 0)
+ return r;
+
+ // Header
+ PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum"));
+
+ // Receive Rate
+ DRAW_LINE2_WITH_LABEL(args, "rx_rate", object, GREEN, _("Receive Rate"));
+ PRINT_CAMM(args, "rx_rate", object, BPS, _("Bps"));
+
+ // Transmit Rate
+ DRAW_LINE2_WITH_LABEL(args, "tx_rate", object, RED, _("Transmit Rate"));
+ PRINT_CAMM(args, "tx_rate", object, BPS, _("Bps"));
+
+ return 0;
+}
+
+const td_graph_impl hostapd_station_rate_info_graph = {
+ .name = "HostapdStationRateInfo",
+ .render = hostapd_station_rate_info_render,
+ .title = hostapd_station_rate_info_title,
+ .vlabel = hostapd_station_rate_info_vlabel,
+
+ // Limits
+ .lower_limit = 0,
+ .upper_limit = LONG_MAX,
+};
--- /dev/null
+/*#############################################################################
+# #
+# telemetryd - The IPFire Telemetry Collection Service #
+# Copyright (C) 2025 IPFire Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef TELEMETRY_GRAPH_HOSTAPD_STATION_RATE_INFO_H
+#define TELEMETRY_GRAPH_HOSTAPD_STATION_RATE_INFO_H
+
+#include "../graph.h"
+
+extern const td_graph_impl hostapd_station_rate_info_graph;
+
+#endif /* TELEMETRY_GRAPH_HOSTAPD_STATION_RATE_INFO_H */