if (gIP.compareTo(sIP) == 0 && gIP.compareTo(eIP) < 0) { NeutronSubnet_IPAllocationPool p = new NeutronSubnet_IPAllocationPool(); p.setPoolStart(NeutronSubnet_IPAllocationPool.bigIntegerToIP(sIP.add(BigInteger.ONE))); p.setPoolEnd(poolEnd); ans.add(p); NeutronSubnet_IPAllocationPool p = new NeutronSubnet_IPAllocationPool(); p.setPoolStart(poolStart); p.setPoolEnd(NeutronSubnet_IPAllocationPool.bigIntegerToIP(eIP.subtract(BigInteger.ONE))); ans.add(p); return(ans); NeutronSubnet_IPAllocationPool p = new NeutronSubnet_IPAllocationPool(); p.setPoolStart(poolStart); p.setPoolEnd(NeutronSubnet_IPAllocationPool.bigIntegerToIP(gIP.subtract(BigInteger.ONE))); ans.add(p); NeutronSubnet_IPAllocationPool p2 = new NeutronSubnet_IPAllocationPool(); p2.setPoolStart(NeutronSubnet_IPAllocationPool.bigIntegerToIP(gIP.add(BigInteger.ONE))); p2.setPoolEnd(poolEnd); ans.add(p2);
int length = Integer.parseInt(parts[1]); BigInteger lowAddress_bi = NeutronSubnet_IPAllocationPool.convert_V6(parts[0]); String lowAddress = NeutronSubnet_IPAllocationPool.bigIntegerToIP(lowAddress_bi.add(BigInteger.ONE)); BigInteger mask = BigInteger.ONE.shiftLeft(length).subtract(BigInteger.ONE); String highAddress = NeutronSubnet_IPAllocationPool.bigIntegerToIP(lowAddress_bi.add(mask).subtract(BigInteger.ONE)); if (gatewayIP == null || ("").equals(gatewayIP)) { gatewayIP = lowAddress;