Method: NETSNMP::Session#build_pdu

Defined in:
lib/netsnmp/session.rb

#build_pdu(type, *vars) ⇒ NETSNMP::PDU

Returns a pdu.

Parameters:

  • type (Symbol)

    the type of PDU (:get, :set, :getnext)

  • vars (Array<Hashes>)

    collection of options to generate varbinds (see NETSMP::Varbind.new for all the possible options)

Returns:



38
39
40
# File 'lib/netsnmp/session.rb', line 38

def build_pdu(type, *vars)
  PDU.build(type, version: @version, community: @community, varbinds: vars)
end