Example #1
0
        public IP NewAddress(MAC client)
        {
            IP checking = new IP((byte[])ThisIP.ToBytes().Clone());

            do
            {
                checking++;
            } while (!isAvailable(checking, client) || (checking & SubnetMask) != (ThisIP & SubnetMask));

            if ((checking & SubnetMask) != (ThisIP & SubnetMask))
            {
                return(null);
            }
            return((IP)checking.Clone());
        }