Examples of IpAddress


Examples of ca.coolman.location.IPAddress

        parseLocation(lloc, loc, adsComponent.getLocation());
        setLocation(lloc);
      } else {
        if (loc == null) {
          LocationLookupService lookup = LocationLookupService.createLookupByIP();
          LookupLocation lloc = lookup.getLocation(new IPAddress(null));
          if (lloc.getLookupStatus() == LookupLocation.STATUS_OK) {
            setLocation(lloc);
          }
        } else {
          LocationLookupService lookup = LocationLookupService.createLookupByGeocode();
View Full Code Here

Examples of cli.System.Net.IPAddress

    {
        public int s_addr;

        IPAddress ToIPAddress()
        {
            return new IPAddress(s_addr & 0xFFFFFFFFL);
        }
View Full Code Here

Examples of com.alibaba.druid.support.http.util.IPAddress

            }

            return false;
        }

        IPAddress ipAddress = new IPAddress(remoteAddress);

        for (IPRange range : denyList) {
            if (range.isIPAddressInRange(ipAddress)) {
                return false;
            }
View Full Code Here

Examples of com.bleujin.framework.valid.validator.IpAddress

    assertEquals(true, new Email(b, SVALIE).isValid()) ;
  }

  public void testIpAddress() throws Exception {
    b.setSvalue("1.1.1.1") ;
    assertEquals(true, new IpAddress(b, SVALIE).isValid()) ;

    b.setSvalue("12.12.dd.11") ;
    assertEquals(false, new IpAddress(b, SVALIE).isValid()) ;

    b.setSvalue("abc@ddd") ;
    assertEquals(false, new IpAddress(b, SVALIE).isValid()) ;

    b.setSvalue("400.22.22.22") ;
    assertEquals(false, new IpAddress(b, SVALIE).isValid()) ;
  }
View Full Code Here

Examples of com.cloud.network.IpAddress

        boolean result = true;
        for (VirtualRouter router : routers) {
            if (router.getState() == State.Running) {
                Commands cmds = new Commands(OnError.Continue);
                IpAddress ip = _networkMgr.getIp(vpn.getServerAddressId());

                RemoteAccessVpnCfgCommand removeVpnCmd = new RemoteAccessVpnCfgCommand(false, ip.getAddress().addr(),
                        vpn.getLocalIp(), vpn.getIpRange(), vpn.getIpsecPresharedKey());
                removeVpnCmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
                removeVpnCmd.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(network.getId(), router.getId()));
                removeVpnCmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
View Full Code Here

Examples of com.slytechs.utils.net.IpAddress

    displayName = netint.getDisplayName();
    timezome = TimeZone.getDefault().getRawOffset();

    Enumeration<InetAddress> e = netint.getInetAddresses();
    while (e.hasMoreElements()) {
      addresses.add(new IpAddress(e.nextElement().getAddress()));
    }

  }
View Full Code Here

Examples of com.slytechs.utils.net.IpAddress

    /**
     * Try parsing Ipv4 address.
     */
    String[] c;
    if ( (c = word.split("\\.")).length == 4) {
      r = new IpAddress(parseIntoArray(new byte[4], c, 10));

    } else if ( (c = word.split(":")).length == 16) {
      r = new IpAddress(parseIntoArray(new byte[16], c, 16));

    } else if ( (c = word.split("-")).length == 6 || (c = word.split(":")).length == 6) {
      r = new MacAddress(parseIntoArray(new byte[6], c, 16));

    } else if (c.length > 1) { // Catch all. Allow any type of address separated :
View Full Code Here

Examples of com.sun.messaging.jmq.net.IPAddress

     * Construct an unititialized system message ID. It is assumed
     * the caller will set the fields either explicitly or via
     * readID()
     */
    public SysMessageID() {
  ip = new IPAddress();
  clear();
    }
View Full Code Here

Examples of com.twilio.sdk.resource.instance.sip.IpAddress

  /* (non-Javadoc)
   * @see com.twilio.sdk.resource.ListResource#makeNew(com.twilio.sdk.TwilioRestClient, java.util.Map)
   */
  @Override
  protected IpAddress makeNew(TwilioRestClient client, Map<String, Object> params) {
    return new IpAddress(client, params);
  }
View Full Code Here

Examples of edu.iu.incntre.flowscale.IPAddress

          }
          IPv4Address ipv4Address = new IPv4Address(ipAndSubnet[0]);
          ipv4Address.setSubnet(Integer.parseInt(ipAndSubnet[1]));
          int ipAddressInt = ipv4Address.getIPv4AddressInt();

          IPAddress ipAddress = new IPAddress();
          ipAddress.setIpAddressValue(ipAddressInt);
          ipAddress.setSubnet(Integer.parseInt(ipAndSubnet[1]));

          short maskingBits = (short) (ipAddress.getSubnet());
          int wildCardSource = OFMatch.OFPFW_ALL
              ^ OFMatch.OFPFW_DL_TYPE
              ^ OFMatch.OFPFW_NW_SRC_ALL
              ^ (((maskingBits) - 1) << OFMatch.OFPFW_NW_SRC_SHIFT);

          OFMatch ofMatchSource = new OFMatch();
          ofMatchSource.setDataLayerType((short) 0x0800);

          ofMatchSource.setNetworkSource(ipAddress
              .getIpAddressValue());

          ofMatchSource.setWildcards(wildCardSource);
          ofMatch = ofMatchSource;
          OFFlowMod flowModRule = new OFFlowMod();
          flowModRule.setCommand(OFFlowMod.OFPFC_MODIFY_STRICT);
          flowModRule.setPriority(changedFlow.getPriority());
          flowModRule.setHardTimeout((short) 0);
          flowModRule.setIdleTimeout((short) 0);
         
          flowModRule.setBufferId(-1);
          flowModRule.setMatch(ofMatch);
     

         
          OFActionOutput ofAction = new OFActionOutput();
          ofAction.setPort(increasedPort);
          ArrayList<OFAction> actions = new ArrayList<OFAction>();
          actions.add(ofAction);
          if (mirroredPorts.get(increasedPort) != null) {
            OFActionOutput ofActionMirror = new OFActionOutput();
            ofActionMirror
                .setPort(mirroredPorts.get(increasedPort));
            actions.add(ofActionMirror);
          }

          flowModRule.setActions(actions);

 

          flowMods.add(flowModRule);

          OFMatch ofMatchDest = new OFMatch();
          ofMatchDest.setDataLayerType((short) 0x0800);
          ofMatchDest.setNetworkDestination(ipAddress
              .getIpAddressValue());

          int wildCardDest = OFMatch.OFPFW_ALL
              ^ OFMatch.OFPFW_DL_TYPE
              ^ OFMatch.OFPFW_NW_DST_ALL
              ^ (((maskingBits) - 1) << OFMatch.OFPFW_NW_DST_SHIFT);

          ofMatchDest.setWildcards(wildCardDest);

          OFFlowMod flowModRule1 = new OFFlowMod();
          flowModRule1.setCommand(OFFlowMod.OFPFC_MODIFY_STRICT);
          flowModRule1.setPriority(changedFlow.getPriority());
          flowModRule1.setHardTimeout((short) 0);
          flowModRule1.setIdleTimeout((short) 0);
          flowModRule1.setBufferId(-1);
          flowModRule1.setMatch(ofMatchDest);

          flowModRule1.setActions(actions);

       

          flowMods.add(flowModRule1);

        }

        pattern = Pattern
            .compile("nw_dst=([0-9]+.[0-9]+.[0-9]+.[0-9]+)/([0-9]*)");

        matcher = pattern.matcher(changedFlow.getFlowString());

        while (matcher.find()) {

          try {
            logger.debug("ip address is {} and subnet is {}",

            matcher.group(1), matcher.group(2));

          } catch (IndexOutOfBoundsException ioe) {
            break;
          }
          IPv4Address ipv4Address = new IPv4Address(matcher.group(1));
          ipv4Address.setSubnet(Integer.parseInt(matcher.group(2)));
          int ipAddressInt = ipv4Address.getIPv4AddressInt();

          IPAddress ipAddress = new IPAddress();
          ipAddress.setIpAddressValue(ipAddressInt);
          ipAddress.setSubnet(Integer.parseInt(matcher.group(2)));

          short maskingBits = (short) (ipAddress.getSubnet());
          int wildCardDestination = OFMatch.OFPFW_ALL
              ^ OFMatch.OFPFW_DL_TYPE
              ^ OFMatch.OFPFW_NW_DST_ALL
              ^ (((maskingBits) - 1) << OFMatch.OFPFW_NW_DST_SHIFT);

          OFMatch ofMatchDestination = new OFMatch();
          ofMatchDestination.setDataLayerType((short) 0x0800);

          ofMatchDestination.setNetworkDestination(ipAddress
              .getIpAddressValue());

          ofMatchDestination.setWildcards(wildCardDestination);
          ofMatch = ofMatchDestination;
          OFFlowMod flowModRule = new OFFlowMod();
          flowModRule.setCommand(OFFlowMod.OFPFC_MODIFY_STRICT);
          flowModRule.setHardTimeout((short) 0);
          flowModRule.setIdleTimeout((short) 0);
          flowModRule.setBufferId(-1);
          flowModRule.setMatch(ofMatch);
          flowModRule.setPriority(changedFlow.getPriority());
         
          OFActionOutput ofAction = new OFActionOutput();
          ofAction.setPort(increasedPort);
          ArrayList<OFAction> actions = new ArrayList<OFAction>();
          actions.add(ofAction);
          if (mirroredPorts.get(increasedPort) != null) {
            OFActionOutput ofActionMirror = new OFActionOutput();
            ofActionMirror
                .setPort(mirroredPorts.get(increasedPort));
            actions.add(ofActionMirror);
          }
          flowModRule.setActions(actions);

       

          flowMods.add(flowModRule);

          OFMatch ofMatchSrc = new OFMatch();
          ofMatchSrc.setDataLayerType((short) 0x0800);
          ofMatchSrc.setNetworkSource(ipAddress.getIpAddressValue());

          int wildCardSrc = OFMatch.OFPFW_ALL
              ^ OFMatch.OFPFW_DL_TYPE
              ^ OFMatch.OFPFW_NW_SRC_ALL
              ^ (((maskingBits) - 1) << OFMatch.OFPFW_NW_SRC_SHIFT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.