Class: PacketGen::Header::SNMP::VariableBindings

Inherits:
RASN1::Model
  • Object
show all
Defined in:
lib/packetgen/header/snmp.rb

Overview

Class to handle SNMP VariableBindingsList

VarBindList ::= SEQUENCE (SIZE (0..max-bindings)) OF VarBind

Author:

  • Sylvain Daubert

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#[](idx) ⇒ VarBind?

Get ‘idx’th element from the list

Returns:

Since:

  • 2.0.0



81
82
83
# File 'lib/packetgen/header/snmp.rb', line 81

def [](idx)
  value[idx]
end

#sizeInteger

Get element counts in list

Returns:

  • (Integer)

Since:

  • 2.0.0



87
88
89
# File 'lib/packetgen/header/snmp.rb', line 87

def size
  value.size
end