SNMP::V3::Message
Inherits SNMP::Message / Reference / Object
Constants
MAX_MESSAGE_SIZE = 65507
Largest UDP payload (65535 - 20-byte IP - 8-byte UDP header) — advertised as msgMaxSize, the biggest response this engine will accept.
MSG_MAX_SIZE = ASN1::BER.new.set_integer(MAX_MESSAGE_SIZE)
MSG_VERSION = ASN1::BER.new.set_integer(Version::V3.to_i)
PRIVNONE = ASN1::BER.new.set_string("", tag: UniversalTags::OctetString)
Constructors
new(scoped_pdu : ScopedPDU, security_params : SecurityParams, security : Security | Nil = nil, security_model : SNMP::V3::SecurityModel = SecurityModel::USM, id : Int32 = rand(REQUEST_ID_RANGE))
SourceInstance methods
engine_id
In SNMPv3 the authoritative engine id plays the role the community string
plays in v1/v2c. engine_id is the meaningful accessor here; the inherited
community field is kept in sync only so code shared with SNMP::Message
(which reads #community) keeps working — prefer engine_id in v3 code.
engine_id=(id)
Sourceflags
Sourceflags=(flags : MessageFlags)
Sourceid
Sourcemax_size
Sourcenew_request_id
Sourcepdu=(pdu)
Sourcerequest=(type : Request)
Sourcescoped_pdu
Sourcescoped_pdu=(scoped_pdu : ScopedPDU)
Sourcesecurity_model
Sourcesecurity_model=(security_model : SecurityModel)
Sourcesecurity_params
Sourcesecurity_params=(security_params : SecurityParams)
Sourcesign(security, scoped_pdu = @scoped_pdu.to_ber)
Sourceto_ber(scoped_pdu = @scoped_pdu.to_ber)
The scoped PDU can be passed in as a BER for passing in encrypted values
verify(security, scoped_pdu = @scoped_pdu.to_ber)
Source