From 765988a57b6e0f1436c87aef3ad67eefac4a6eea Mon Sep 17 00:00:00 2001 From: blackhedd Date: Mon, 18 Dec 2006 19:56:50 +0000 Subject: [PATCH] supported parsing of get-response packets --- lib/net/snmp.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/net/snmp.rb b/lib/net/snmp.rb index 56284b8..ef981f5 100644 --- a/lib/net/snmp.rb +++ b/lib/net/snmp.rb @@ -160,6 +160,11 @@ module Net send :pdu_type=, :get_next_request # This PDU is identical to get-request except for the type. parse_get_request data + when 2 + send :pdu_type=, :get_response + # This PDU is identical to get-request except for the type, + # and the fact that the variable bindings will be non-null. + parse_get_request data else raise Error.new( "unknown snmp-pdu type: #{app_tag}" ) end