Package org.snmp4j.smi

Examples of org.snmp4j.smi.Address


                VacmMIB.vacmViewIncluded, StorageType.nonVolatile);
    }

    protected void initTransportMappings() throws IOException {
        transportMappings = new TransportMapping[1];
        Address addr = GenericAddress.parse(address);
        TransportMapping tm = TransportMappings.getInstance().createTransportMapping(addr);
        transportMappings[0] = tm;
    }
View Full Code Here


   * specified in the listen() method. It extracts a {@link Variable}
   * according to the configured OID prefix and sends its value to the event
   * bus.
   */
  public void processPdu(CommandResponderEvent event) {
    Address addr = event.getPeerAddress();
    if (addr == null) {
      return;
    }
   
    String s = addr.toString().split("/")[0];
    if (s == null) {
      logger.error("TRAP: failed to translate address {}", addr);
      dispatchPdu(addr, event.getPDU());
    } else {
      // Need to change the port to 161, which is what the bindings are configured for since
      // at least some SNMP devices send traps from a random port number. Otherwise the trap
      // won't be found as the address check will fail. It feels like there should be a better
      // way to do this!!!
      Address address = GenericAddress.parse("udp:" + s + "/161");
      dispatchPdu(address, event.getPDU());
    }
  }
View Full Code Here

TOP

Related Classes of org.snmp4j.smi.Address

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.