[SNMP4J] SNMP version

Tassos Kontogiorgis tkontogiorgis at antcor.com
Tue Jul 3 13:13:03 CEST 2007


Johny thanx but, I can't find any class TrapEvet or TrapEvent kind class 
with getVersion method....

The only method I found for protocol version is the 
|*getMessageProcessingModel <cid:part1.09000005.08010200 at antcor.com>*() 
for the |class CommandResponderEvent.
But I didn't find corresponding methods for PDU, ResponseEvent etc.
I also used a trick with reflection in order to identify when a PDU 
object is instance of  PDUv1 or not.
But I prefer something more efficient....

Tassos.

Johny_Shaik wrote:
> private String[] sendTrapData(ParsedTrapEvent parsedtrapevent) {
> 		TrapData trapData = new TrapData();
> 		 TrapEvent trapevent =
> (TrapEvent)parsedtrapevent.getSource();
> 	       SnmpPDU snmppdu = trapevent.getTrapPDU();
> 	        
> 	        int i = trapevent.getVersion();
>
> Regards
> Johny
> -----Original Message-----
> From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On
> Behalf Of Tassos Kontogiorgis
> Sent: Tuesday, July 03, 2007 3:53 PM
> To: snmp4j at agentpp.org
> Subject: [SNMP4J] SNMP version 
>
> Hi,
>
> Does anyone know how can I retrieve the SNMP version from an SNMP
> response, either a CommandResponderEvent, Response Event or a PDU ?
> I looked for a get method but I didn't find something related.
>
> Thanx.
>
>
> DISCLAIMER:
> This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
>
>   


More information about the SNMP4J mailing list