Sir,

I am trying to use the Adventnet SNMP stack to retrieve the values from the agent, but
the varibles of a Object Id are garbled characters. Can you help me ?
 
my program as below:
 
       Vector vbs=trap.getTrapPDU().getVariableBindings();
       int num=vbs.size();
       for (int i=0;i<num;i++)
      {
          SnmpVarBind vb=(SnmpVarBind)vbs.elementAt(i);
          String tmp1=vb.getObjectID().toString();
          String tmp2=vb.getVariable().toString();
          buff.append("Oid= ");
          buff.append(tmp.substring(1, tmp.length()));
          buff.append("-------Val= ");
          buff.append(tmp2.substring(1,tmp2.length()));
       }
the wrong result as below:
Oid= 1.2.840.10036.1.1.1.10.10-------Val=  !\3L?
 
Thanks & Regards
elle2008
  • No status
Hi,

Can you let me know the type of the variable whose value contains garbled characters?
Post Actions
Statistics
  • 1
     Replies
  • 293
     Views
  • 0
     Followers
Tags for the post
No tags available for this topic.
© 2009 Corp. All rights reserved. Trademarks | Privacy Policy | Site Map | Contact Us | Careers

Edit Link Delete Link

Edit Link Delete Link

LoadingImage