Repository navigation
SNMP_Embedded v3.4.1 — SNMP_NO_TRAPS: a leaner agent for endpoints that never trap
SNMP_NO_TRAPS — one flag, for the huge class of endpoints that only ever
answer requests: sensors, actuators, monitors. Set it as a global build flag
and the entire trap/inform subsystem is compiled out of your firmware:
- Smaller: the
SNMPTrapclass, the inform retry queue, and the
inform-ack machinery do not exist in the binary. - Leaner pool: the exact-pricing formula drops the 16-slot trap-tree
term —pool = 2*SNMP_MAX_VARBINDS + 4 + SNMP_MAX_CALLBACKS_PER_AGENT
(the 13-handler 768-B profile derives 25 slots instead of 33). - Loud, never silent: an accidental trap call fails at compile time with
a message naming the flag and the remedy.SNMP_NO_TRAPS=1combined with
SNMP_TRAP_VB_RESERVE>0is a build-time error.
Flag off (the default) is bit-identical to v3.4.0: the host matrix is
green with identical counts (2,125 assertions / 28 cases; zero-copy-off
262 / 23; no-builtin-uptime 2,057 / 23), and the standard ESP8266 flood
soaks re-ran clean — pool 27/33, 0 alarms, 0 crashes, 0 reboots.
New test-notraps host profile (with static_assert proof of the pool
derivation) joins the CI matrix, and a latent tests-Makefile object-dir
collision affecting local back-to-back profile builds is fixed.
Compatibility: public API unchanged when the flag is off (default).
With the flag on, trap/inform API removal is by design and loudly announced
at compile time. Library Manager users: no action needed — the flag is opt-in.
Requires an Ethernet/WiFi UDP stack per the bundled examples; sizing tables
and the full memory model are in the README.