class NETSNMP::ScopedPDU

Attributes

auth_param[RW]
engine_id[R]
security_level[RW]

Public Class Methods

new(type:, headers:, **options) click to toggle source
Calls superclass method NETSNMP::PDU::new
# File lib/netsnmp/scoped_pdu.rb, line 11
def initialize(type:, headers:, **options)
  @engine_id, @context = headers
  super(type: type, headers: [3, nil], **options)
end

Private Instance Methods

encode_headers_asn() click to toggle source
# File lib/netsnmp/scoped_pdu.rb, line 18
def encode_headers_asn
  [
    OpenSSL::ASN1::OctetString.new(@engine_id || "").with_label(:engine_id),
    OpenSSL::ASN1::OctetString.new(@context || "").with_label(:context)
  ]
end