/** * Sets an IP address in this address pool as used. * * @param addr the address to set used */ public void SetUsed(IPAddress addr) { if (Contains(addr)) { freeList.SetUsed(new BigInteger(addr.GetAddressBytes())); } }
/** * Sets the used. * * @param addr the new used */ public void SetUsed(IPAddress addr) { if (Contains(addr)) { BigInteger prefix = new BigInteger(addr.GetAddressBytes()); BigInteger start = new BigInteger(subnet.GetSubnetAddress().GetAddressBytes()); freeList.SetUsed((prefix - start) / CalculatePrefix()); } }