[SNMP4J] How to get the community of a CommandResponderEvent

Deon van der Merwe dvdm at truteq.co.za
Fri Oct 21 17:50:59 CEST 2005


Hi Frank,

Here is how I do it:

   public synchronized void processPdu(
       org.snmp4j.CommandResponderEvent aEvent) {
     java.lang.String vCommunityName = new 
java.lang.String(aEvent.getSecurityName());
     if (mMyCommunityName.equals(vCommunityName)) {
       org.snmp4j.PDU vPDU = aEvent.getPDU();
       //...
     } else {
       mLogger.warning("supplied community string does not match 
mine... ignore request: " + aEvent);
     }
   }


At 05:44 PM 10/21/2005, Frank Wiele wrote:
>Hi,
>
>I want to analyze the community of incoming snmp v2c messages,
>especially get commands. Hence I use a CommandResponder. I searched
>the whole API, but did not find a way to obtain the community of a
>CommandResponderEvent.
>
>Could somebody tell me, how to get the community of an incoming
>CommandResponderEvent?
>
>Thanks in advance,
>
>         Frank
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://lists.agentpp.org/mailman/listinfo/snmp4j


-Deon
_____________________________________________________
TruTeq Wireless (Pty) Ltd.  | Tel: +27 (0)12 667 1530
http://www.truteq.co.za     | Fax: +27 (0)12 667 1531
Wireless communications for remote machine management




More information about the SNMP4J mailing list