private DhcpServerScopeReservation(DhcpServerScope scope, DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress, DhcpServerClientTypes allowedClientTypes)
        {
            Scope              = scope;
            Address            = address;
            HardwareAddress    = hardwareAddress;
            AllowedClientTypes = allowedClientTypes;

            Options = new DhcpServerScopeReservationOptionValueCollection(this);
        }
Exemple #2
0
 public IDhcpServerClient AddClient(DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress, string name, string comment, DateTime leaseExpires, IDhcpServerHost ownerHost, DhcpServerClientTypes clientType, DhcpServerClientAddressStates addressState, DhcpServerClientQuarantineStatuses quarantineStatus, DateTime probationEnds, bool quarantineCapable)
 => DhcpServerClient.CreateClient(Scope, address, hardwareAddress, name, comment, leaseExpires, (DhcpServerHost)ownerHost, clientType, addressState, quarantineStatus, probationEnds, quarantineCapable);
Exemple #3
0
 public IDhcpServerClient AddClient(DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress, string name, string comment, DateTime leaseExpires, IDhcpServerHost ownerHost)
 => DhcpServerClient.CreateClient(Scope, address, hardwareAddress, name, comment, leaseExpires, (DhcpServerHost)ownerHost);
Exemple #4
0
 public IDhcpServerClient AddClient(DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress, string name, string comment)
 => DhcpServerClient.CreateClient(Scope, address, hardwareAddress, name, comment);
Exemple #5
0
 public IDhcpServerClient AddClient(DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress)
 => DhcpServerClient.CreateClient(Scope, address, hardwareAddress);
 /// <summary>
 /// Creates a DHCP scope reservation
 /// </summary>
 /// <param name="address">IP Address to reserve</param>
 /// <param name="hardwareAddress">Hardware address (MAC address) of client associated with this reservation</param>
 /// <param name="allowedClientTypes">Protocols this reservation supports</param>
 /// <returns>The scope reservation</returns>
 public IDhcpServerScopeReservation AddReservation(DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress, DhcpServerClientTypes allowedClientTypes)
 => DhcpServerScopeReservation.CreateReservation(Scope, address, hardwareAddress, allowedClientTypes);
 /// <summary>
 /// Creates a DHCP scope reservation
 /// </summary>
 /// <param name="address">IP Address to reserve</param>
 /// <param name="hardwareAddress">Hardware address (MAC address) of client associated with this reservation</param>
 /// <returns>The scope reservation</returns>
 public IDhcpServerScopeReservation AddReservation(DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress)
 => DhcpServerScopeReservation.CreateReservation(Scope, address, hardwareAddress);
        internal static DhcpServerScopeReservation CreateReservation(DhcpServerScope scope, DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress, DhcpServerClientTypes allowedClientTypes)
        {
            if (!scope.IpRange.Contains(address))
            {
                throw new ArgumentOutOfRangeException(nameof(address), "The DHCP scope does not include the provided address");
            }

            DhcpServerScope.AddSubnetReservationElement(scope.Server, scope.Address, address, hardwareAddress, allowedClientTypes);

            return(new DhcpServerScopeReservation(scope, address, hardwareAddress, allowedClientTypes));
        }
 internal static DhcpServerScopeReservation CreateReservation(DhcpServerScope scope, DhcpServerIpAddress address, DhcpServerHardwareAddress hardwareAddress)
 => CreateReservation(scope, address, hardwareAddress, DhcpServerClientTypes.DhcpAndBootp);