Skip to content

snmp-trap: SNMPv1 Trap-PDU (0xA4) support #97

@indigo423

Description

@indigo423

Follow-up from epic #52 (SNMPv2c trap / INFORM export, shipped). Explicitly out-of-scope in the original proposal.

Why

Some legacy devices and monitoring environments only generate/consume SNMPv1 traps. OpenNMS `trapd` supports v1 and operators occasionally need to validate that path separately from v2c.

Scope

  • SNMPv1 Trap-PDU (tag `0xA4`) encoder alongside the existing `0xA7` (v2c TRAP) and `0xA6` (v2c INFORM).
  • v1 PDU shape differs from v2c: includes enterprise OID, agent-addr (IPv4), generic-trap (enum 0..6), specific-trap (int), timestamp (TimeTicks).
  • Catalog schema extension: a v1 emission path needs `enterpriseOID` + generic-trap + specific-trap fields per entry (not all v2c catalog entries translate cleanly).
  • New CLI flag `-trap-snmp-version v1|v2c` or per-entry override.
  • Wire-format encoder reuses `snmp_encoding.go` ASN.1 primitives.

Out of scope

  • Mixing v1 and v2c in a single run (operator picks one).

References

  • RFC 1157 §4.1.6 "Trap-PDU"
  • `openspec/changes/archive/2026-04-20-add-snmp-trap-v2c/design.md` Non-Goals

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions