class

SNMP::V1Trap

Inherits SNMP::PDU / Reference / Object

An RFC 1157 Trap-PDU. It is its own variant of the protocol's PDU CHOICE — not an SNMPv2 trap — so it derives from PDU directly and carries the v1 fields (enterprise, agent address, generic/specific trap, timestamp) itself. The v2-style request-id / error fields inherited from PDU have no meaning in a v1 trap and stay at their defaults.

Constructors

new(agent_address : String, generic_trap : SNMP::GenericTrap, specific_trap : Int32 = 0, enterprise : String = "", time_ticks : UInt32 = 0_u32, varbinds : Array(VarBind) = [] of VarBind, request_id = 0)
Source
new(ber : ASN1::BER)
Source

Instance methods

agent_address
Source
agent_address=(agent_address : String)
Source
enterprise
Source
enterprise=(enterprise : String)
Source
generic_trap
Source
generic_trap=(generic_trap : GenericTrap)
Source
specific_trap
Source
specific_trap=(specific_trap : Int32)
Source
time_ticks
Source
time_ticks=(time_ticks : UInt32)
Source
to_ber(tag_number)

RFC 1157 Trap-PDU wire structure — distinct from the standard PDU layout, so this overrides PDU#to_ber.

Source