summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/net-snmp
AgeCommit message (Collapse)Author
2026-05-04triton: encapsulate statistics countersDenys Fedoryshchenko
Group the Triton core statistics in struct triton_stat_t and keep the storage private to triton.c instead of exporting the writable triton_stat object through triton.h. This keeps ownership inside the Triton core while preserving the existing CLI and ACCEL-PPP-MIB counter semantics. Route counter updates through triton_stat_*() helpers. Thread, context, md handler, timer, mempool, CPU, and start-time update paths no longer open-code direct triton_stat mutations; the update policy now lives beside the Triton-owned storage and uses relaxed atomic operations for the simple counters. Make the CLI show-stat path render from a local snapshot and update statCore SNMP readers to use triton_stat_start_time() and triton_stat_cpu(). Out-of-tree modules that accessed the exported triton_stat object directly must switch to the new accessors, because triton_stat is no longer part of the public ABI. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04session: encapsulate statistics countersDenys Fedoryshchenko
Group the core session starting, active, and finishing statistics behind the private ap_session_stat storage in session.c instead of exposing writable counters through ap_session.h. This keeps ownership inside the session core while preserving the existing CLI and ACCEL-PPP-MIB counter semantics. Route session counter updates through ap_session_stat_*() helpers. Session start, activation, termination, finish, and shutdown-idle paths no longer open-code individual counter increments/decrements; the update policy now lives beside the session-owned storage and uses relaxed atomic operations for the simple state counters. Make the CLI show-stat path render from a local snapshot and convert the PPP SNMP starting/active/finishing scalars from watched raw pointers to scalar handlers. PPP controllers now read max-session limits through ap_session_stat_starting() and ap_session_stat_active(), removing external direct access to ap_session_stat. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04sstp: encapsulate statistics countersDenys Fedoryshchenko
Group the SSTP starting and active statistics in struct sstp_stat_t and keep the storage under the SSTP server object instead of exposing writable stat_* globals. This keeps ownership inside the SSTP control code while preserving the existing CLI and ACCEL-PPP-MIB counter semantics. Route counter updates through sstp_stat_*() helpers. Connection accept, transition to PPP setup, and disconnect paths no longer open-code individual counter increments/decrements; the update policy now lives beside the SSTP-owned storage and uses relaxed atomic operations for the simple state counters. Make the CLI show-stat path render from a local snapshot and convert the SSTP SNMP starting/active scalars from watched raw pointers to scalar handlers. SNMP now reads through sstp_stat_starting() and sstp_stat_active(), removing the old sstp_get_stat() pointer escape hatch. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04ipoe: encapsulate statistics countersDenys Fedoryshchenko
Group the IPOE starting, active, and delayed offer statistics in struct ipoe_stat_t and keep the storage private to ipoe.c instead of exposing writable stat_* globals. This keeps ownership inside the IPOE control code while preserving the existing CLI and ACCEL-PPP-MIB counter semantics. Route counter updates through ipoe_stat_*() helpers. Session setup, activation, teardown, and delayed offer queue paths no longer open-code individual counter increments/decrements; the update policy now lives beside the IPOE-owned storage and uses relaxed atomic operations for the simple state counters. Make the CLI show-stat path render from a local snapshot and convert the IPOE SNMP starting/active scalars from watched raw pointers to scalar handlers. SNMP now reads through ipoe_stat_starting() and ipoe_stat_active(), removing the old ipoe_get_stat() pointer escape hatch. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04net-snmp: fix ASN_INTEGER scalar value sizeDenys Fedoryshchenko
Use long storage for ASN_INTEGER scalar values passed to snmp_set_var_typed_value(). PPTP, L2TP, and PPPoE starting/active handlers previously passed unsigned int locals, and statCoreCPU passed triton_stat.cpu directly, which does not match Net-SNMP's C representation for ASN_INTEGER on 64-bit systems. Keep the exposed MIB values and access paths unchanged; only stage the values through correctly sized local variables before encoding them for Net-SNMP. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04pptp: encapsulate statistics countersDenys Fedoryshchenko
Group the PPTP starting and active statistics in struct pptp_stat_t and keep the storage under the PPTP server object instead of exposing writable stat_* globals. This keeps ownership inside the PPTP control code while preserving the existing CLI and ACCEL-PPP-MIB counter semantics. Route counter updates through pptp_stat_*() helpers. Connection setup, transition to PPP, and teardown paths no longer open-code individual counter increments/decrements; the update policy now lives beside the PPTP-owned storage and uses relaxed atomic operations for the simple state counters. Make the CLI show-stat path render from a local snapshot and convert the PPTP SNMP starting/active scalars from watched raw pointers to scalar handlers. SNMP now reads through pptp_stat_starting() and pptp_stat_active(), removing the old pptp_get_stat() pointer escape hatch. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04l2tp: encapsulate statistics countersDenys Fedoryshchenko
Group the L2TP tunnel, control-session, and data-session statistics in struct l2tp_stat_t and keep the storage private to l2tp.c instead of spreading writable stat_* globals through the module. This keeps the ownership boundary in the L2TP control code while preserving the existing CLI and ACCEL-PPP-MIB counter semantics. Route counter updates through l2tp_stat_*() helpers. Tunnel, control-session, and data-session state transitions no longer open-code individual counter increments/decrements; the update policy now lives beside the L2TP-owned storage and uses relaxed atomic operations for the simple state counters. Make the CLI show-stat path render from a local snapshot and convert the L2TP SNMP starting/active scalars from watched raw pointers to scalar handlers. SNMP now reads through l2tp_stat_starting() and l2tp_stat_active(), removing the old l2tp_get_stat() pointer escape hatch. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2026-05-04pppoe: encapsulate statistics countersDenys Fedoryshchenko
Group the PPPoE statistics in struct pppoe_stat_t and keep the storage private to pppoe.c instead of exporting writable counter globals through pppoe.h. The CLI now reads a snapshot with pppoe_stat_get(), while the packet/control paths update the counters through the PPPoE-owned storage using relaxed atomic operations. Convert the PPPoE SNMP starting/active scalars from watched raw pointers to scalar handlers. This removes the old pppoe_get_stat() pointer escape hatch and makes SNMP read the counters through pppoe_stat_starting() and pppoe_stat_active(), so the synchronization policy is applied consistently outside the PPPoE module. This also fixes the long-standing PPPoE starting counter behavior. PPPoE used to expose starting in the CLI and ACCEL-PPP-MIB, but never updated it, so it always reported zero. Track a per-connection ppp_starting state, increment starting when the controller begins channel setup, move the session from starting to active after establish_ppp() succeeds, and decrement starting on setup failure before PPP becomes active. This matches the state accounting used by the other PPP controllers. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
2024-04-29snmp: fix compatibility with net-snmp 5.9.4+ (issue #136)Sergey V. Lobanov
related net-snmp change: https://github.com/net-snmp/net-snmp/commit/a2cb167514ac0c7e1b04e8f151e0b015501362e0 Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2022-11-15SNMP: Fix previous migration to 64 bit countersDmitriy Eshenko
2021-02-06fix build with non-portable _SC_PAGE_SIZEVladislav Grishenko
2018-06-04sstp: snmp: add missed files, fix 0d454ad7102506ecd12a36239f6604f7e4b57aaeVladislav Grishenko
2018-06-03sstp: add snmp supportVladislav Grishenko
2018-01-15cmake: add error messages if postgresql or snmp libraries not foundDmitry Kozlov
2017-12-05net-snmp: fixed crash on table requestDmitry Kozlov
2017-03-27net-snmp: add definition for U64 (if not set)Dmitry Kozlov
2015-12-02net-snmp: export interface counters in the sessionTableDmitry Kozlov
2014-11-22remove trailing whitespacesDmitry Kozlov
2014-10-03get rid of time(), use clock_gettime(CLOCK_MONOTONIC) insteadDmitry Kozlov
2014-04-30net-snmp: add missing memdebug.h includeDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-30net-snmp: fiexed improper handling of empty username when requesting session ↵Dmitry Kozlov
table Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2014-04-29net-snmp: unshare file descriptors namespaceGuillaume Nault
Use unshare(CLONE_FILES) to create a local file descriptors namespace for the SNMP thread. This is similar to what was done in bf5340 'net-snmp: run snmp in "special" thread', but without calling clone() directly. So the net-snmp plugin keeps running in a regular pthread. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-29Revert "net-snmp: run snmp in "special" thread"Guillaume Nault
This reverts commit bf5340291badcc631bd855bb924593cd445ecd26. snmp_thread() needs to be run as regular thread to allow Valgrind analysis. Using a different namespace for file desciptors will be done later on using unshare(). Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
2014-04-11net-snmp: run snmp in "special" threadDmitry Kozlov
NET-SNMP is built on top of stale file descriptor multiplexing mechanism (select) which prevents to use descriptors with number >= 1024. Due to accel-ppp uses a lots of descriptors NET-SNMP easy overflows this limit and fails and even may crash whole accel-ppp process. This patch runs snmp in special thread which does not share file descritor table with main process, so it can use less descriptors and live in __FD_SETSIZE limit. Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2013-10-31net-snmp: fixed ipoe oidsDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2013-10-31net-snmp: add missing IPOE module initializationDmitry Kozlov
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
2013-10-29net-snmp: add ipoe statisticsDmitry Kozlov
2013-09-03snmp: properly terminate snmp threadDmitry Kozlov
2013-03-16ipoe: fixed shared=1 modeKozlov Dmitry
2013-01-25cmake: use CMAKE_FIND_ROOT_PATH and LIB_SUFFIXKozlov Dmitry
2012-06-19general preparation for IPoE integrationKozlov Dmitry
2011-12-27snmp: implemneted new node (ACCEL-PPP-MIB::cli.0) which can be used to send ↵Kozlov Dmitry
cli commands
2011-08-30net-snmp: NETSNMP_PREFIX option to locate net-snmp library at different locationKozlov Dmitry
2011-08-23ppp: ipv6: multiple prefixes, route option, rdnss option implementationKozlov Dmitry
2011-08-19snmp supportKozlov Dmitry