class

SNMP::Message

Inherits Reference / Object

Constructors

new(community : String, request : SNMP::Request, varbind : VarBind | Nil | Array(VarBind) = nil, request_id = rand(REQUEST_ID_RANGE), error_status = ErrorStatus::NoError, error_index = 0, version : SNMP::Version = Version::V2C)
Source
new(community : String, request : SNMP::Request, pdu : PDU, version : SNMP::Version = Version::V2C)

Wrap a pre-built PDU (e.g. a V1Trap with its own wire structure).

Source
new(snmp : Array(ASN1::BER))
Source

Class methods

IO serialisation support

Source

Instance methods

community
Source
community=(community : String)
Source
error_index
Source
error_index=(value)
Source
error_status
Source
error_status=(value)
Source
expects_response?

Returns true if the current SNMP packet is expecting a response

Source
max_repetitions
Source
max_repetitions=(value)
Source
new_request_id
Source
non_repeaters
Source
non_repeaters=(value)
Source
oid

shortcut for .varbinds[0].oid

Source
request
Source
request=(request : Request)
Source
request_id
Source
request_id=(value)
Source
to_ber(pdu = @pdu.to_ber(@request.to_u8))
Source
trap?

Returns true if the current packet is a trap / inform

Source
value

shortcut for .varbinds[0].value

Source
varbind

shortcut for .varbinds[0]

Source
varbinds
Source
varbinds=(value)
Source
version
Source
version=(version : Version)
Source