Package org.snmp4j.smi

Examples of org.snmp4j.smi.IpAddress


                variable = new TimeTicks(Long.parseLong(value));
                break;
            }

            case 'a': {
                variable = new IpAddress(value);
                break;
            }

            default: {
                throw new IllegalArgumentException("Variable type " + type + " not supported");
View Full Code Here


            this.v1TrapPDU.setSpecificTrap(Integer.parseInt(tmp));
        }

        tmp = systemConfig.getSimpleValue("agentAddress",null);
        if ((tmp != null) && (tmp.length() > 0)) {
            this.v1TrapPDU.setAgentAddress(new IpAddress(tmp));
        }

        tmp = systemConfig.getSimpleValue("privacyProtocol","AES");
        if ((tmp != null) && (tmp.length() > 0)) {
            if (tmp.equals("DES")) {
View Full Code Here

      else if (type == PDU.V1TRAP) {
        PDUv1 pduV1 = (PDUv1)pdu;
        String aa =
            (String) ArgumentParser.getValue(settings, oAgentAddr, 0);
        if (aa != null) {
          pduV1.setAgentAddress(new IpAddress(aa));
        }
        Integer gid = (Integer) ArgumentParser.getValue(settings, oGenericID, 0);
        if (gid != null) {
          pduV1.setGenericTrap(gid.intValue());
        }
View Full Code Here

  public void connectionStateChanged(TransportStateEvent change) {
    if (localhostSubagentsOnly &&
        (change.getNewState() == TransportStateEvent.STATE_CONNECTED) &&
        (change.getPeerAddress() instanceof IpAddress)) {
      IpAddress peerAddress = (IpAddress)change.getPeerAddress();
      if (!peerAddress.getInetAddress().isLoopbackAddress()) {
        LOGGER.warn("Connection attempt made from non loopback (i.e. local) address '"+
                    peerAddress+"' which will be ignored");
        change.setCancelled(true);
        return;
      }
View Full Code Here

TOP

Related Classes of org.snmp4j.smi.IpAddress

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.