[SNMP4J] problem of trap

abdel boutz1 at caramail.com
Fri Apr 1 17:00:15 CEST 2005


hello, I would like to know how to see when its run when I Trap waits because I put this end of code: 
 try
        {
          Address targetAddress = GenericAddress.parse("udp:0.0.0.0/162");  //0.0.0.0 means that everyone can send a trap request to him ?
 
          TransportMapping transport = new DefaultUdpTransportMapping();
          Snmp snmp = new Snmp(transport);
          
         CommandResponder trapPrinter = new CommandResponder() { 
          public synchronized void processPdu(CommandResponderEvent e) 
          {
            PDU command = e.getPDU();
            if (command != null) 
            {
               System.out.println(command.toString());
            }
          }
        };
        snmp.addCommandResponder(trapPrinter);
        transport.listen();  //when I do the command netstat - an I don't see that I am on listen , why? 

But I can't see whether that is good. Sorry for my english 
Thank you . 


More information about the SNMP4J mailing list