public static IPAddressRange fromString(System.String range) { if (IPUtil.IsRange(range)) { try { return(new IPSubnet(IPUtil.ExtractIp(range), IPUtil.ExtractMaskBits(range))); } catch (System.Exception e) { SupportClass.WriteStackTrace(e, Console.Error); } } return(new IPAddressRange(range, range)); }
public IPSubnet(System.String ipAndMaskBits) : this(IPUtil.ExtractIp(ipAndMaskBits), IPUtil.ExtractMaskBits(ipAndMaskBits)) { }
public IPSubnet(System.String dottedNet, System.String dottedMask) : this(IPUtil.IpToLong(dottedNet), IPUtil.MaskToLong(dottedMask)) { }
public IPSubnet(System.String net, int maskBits) : this(IPUtil.IpToLong(net), IPUtil.MaskToLong(maskBits)) { }
public IPSubnet(long net, int maskBits) : this(net, IPUtil.MaskToLong(maskBits)) { }
public override long nextNumber() { return(IPUtil.IpToLong(nextIPAddress())); }
protected internal IPAddressRange(System.String min, System.String max, bool isRandom, long totalMin, long totalMax) : this(IPUtil.IpToLong(min), IPUtil.IpToLong(max), isRandom, totalMin, totalMax) { }
public virtual System.String nextIPAddress() { return(IPUtil.IpToString(nextNumber())); }