示例#1
0
 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));
 }
示例#2
0
 public IPSubnet(System.String ipAndMaskBits) : this(IPUtil.ExtractIp(ipAndMaskBits), IPUtil.ExtractMaskBits(ipAndMaskBits))
 {
 }
示例#3
0
 public IPSubnet(System.String dottedNet, System.String dottedMask) : this(IPUtil.IpToLong(dottedNet), IPUtil.MaskToLong(dottedMask))
 {
 }
示例#4
0
 public IPSubnet(System.String net, int maskBits) : this(IPUtil.IpToLong(net), IPUtil.MaskToLong(maskBits))
 {
 }
示例#5
0
 public IPSubnet(long net, int maskBits) : this(net, IPUtil.MaskToLong(maskBits))
 {
 }
示例#6
0
 public override long nextNumber()
 {
     return(IPUtil.IpToLong(nextIPAddress()));
 }
示例#7
0
 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)
 {
 }
示例#8
0
 public virtual System.String nextIPAddress()
 {
     return(IPUtil.IpToString(nextNumber()));
 }