Ejemplo n.º 1
0
 public DHCP_IP_RESERVATION_V4_Managed(DHCP_IP_ADDRESS reservedIpAddress, DHCP_CLIENT_UID_Managed reservedForClient, DHCP_CLIENT_TYPE allowedClientTypes)
 {
     ReservedIpAddress        = reservedIpAddress;
     AllowedClientTypes       = allowedClientTypes;
     ReservedForClientPointer = Marshal.AllocHGlobal(Marshal.SizeOf(reservedForClient));
     Marshal.StructureToPtr(reservedForClient, ReservedForClientPointer, false);
 }
Ejemplo n.º 2
0
 public DHCP_BOOTP_IP_RANGE(DHCP_IP_ADDRESS startAddress, DHCP_IP_ADDRESS endAddress, int bootpAllocated, int maxBootpAllowed)
 {
     StartAddress    = startAddress;
     EndAddress      = endAddress;
     BootpAllocated  = bootpAllocated;
     MaxBootpAllowed = maxBootpAllowed;
 }
 public DHCP_OPTION_DATA_ELEMENT_Managed(DHCP_IP_ADDRESS dataIpAddress)
 {
     OptionType = (IntPtr)DHCP_OPTION_DATA_TYPE.DhcpIpAddressOption;
     Data       = new DHCP_OPTION_DATA_ELEMENT_ManagedValue()
     {
         DataIpAddress = dataIpAddress
     };
 }
Ejemplo n.º 4
0
 public DHCP_SUBNET_INFO_Managed(DHCP_IP_ADDRESS subnetAddress, DHCP_IP_MASK subnetMask, string subnetName, string subnetComment, DHCP_HOST_INFO_Managed primaryHost, DHCP_SUBNET_STATE subnetState)
 {
     SubnetAddress = subnetAddress;
     SubnetMask    = subnetMask;
     SubnetName    = subnetName;
     SubnetComment = subnetComment;
     PrimaryHost   = primaryHost;
     SubnetState   = subnetState;
 }
Ejemplo n.º 5
0
        public DHCP_IP_ARRAY_Managed(DHCP_IP_ADDRESS element)
        {
            var elementSize     = Marshal.SizeOf(typeof(DHCP_IP_ADDRESS));
            var elementsPointer = Marshal.AllocHGlobal(elementSize);

            NumElements     = 1;
            ElementsPointer = elementsPointer;

            Marshal.StructureToPtr(element, elementsPointer, true);
        }
Ejemplo n.º 6
0
 public DHCP_CLIENT_INFO_Managed(DHCP_IP_ADDRESS clientIpAddress, DHCP_IP_MASK subnetMask, DHCP_BINARY_DATA_Managed clientHardwareAddress, string clientName, string clientComment, DATE_TIME clientLeaseExpires, DHCP_HOST_INFO_Managed ownerHost)
 {
     ClientIpAddress       = clientIpAddress;
     SubnetMask            = subnetMask;
     ClientHardwareAddress = clientHardwareAddress;
     ClientName            = clientName;
     ClientComment         = clientComment;
     ClientLeaseExpires    = clientLeaseExpires;
     OwnerHost             = ownerHost;
 }
Ejemplo n.º 7
0
 public DHCP_SUBNET_INFO_VQ_Managed(DHCP_IP_ADDRESS subnetAddress, DHCP_IP_MASK subnetMask, string subnetName, string subnetComment, DHCP_HOST_INFO_Managed primaryHost, DHCP_SUBNET_STATE subnetState, uint quarantineOn, uint reserved1, uint reserved2, ulong reserved3, ulong reserved4)
 {
     SubnetAddress = subnetAddress;
     SubnetMask    = subnetMask;
     SubnetName    = subnetName;
     SubnetComment = subnetComment;
     PrimaryHost   = primaryHost;
     SubnetState   = subnetState;
     QuarantineOn  = quarantineOn;
     Reserved1     = reserved1;
     Reserved2     = reserved2;
     Reserved3     = reserved3;
     Reserved4     = reserved4;
 }
Ejemplo n.º 8
0
 public DHCP_CLIENT_INFO_VQ_Managed(DHCP_IP_ADDRESS clientIpAddress, DHCP_IP_MASK subnetMask, DHCP_BINARY_DATA_Managed clientHardwareAddress, string clientName, string clientComment, DATE_TIME clientLeaseExpires, DHCP_HOST_INFO_Managed ownerHost, DHCP_CLIENT_TYPE clientType, byte addressState, QuarantineStatus status, DATE_TIME probationEnds, bool quarantineCapable)
 {
     ClientIpAddress       = clientIpAddress;
     SubnetMask            = subnetMask;
     ClientHardwareAddress = clientHardwareAddress;
     ClientName            = clientName;
     ClientComment         = clientComment;
     ClientLeaseExpires    = clientLeaseExpires;
     OwnerHost             = ownerHost;
     ClientType            = clientType;
     AddressState          = addressState;
     Status            = status;
     ProbationEnds     = probationEnds;
     QuarantineCapable = quarantineCapable;
 }
Ejemplo n.º 9
0
 public DHCP_FAILOVER_RELATIONSHIP_Managed(DHCP_IP_ADDRESS primaryServer, DHCP_IP_ADDRESS secondaryServer, DHCP_FAILOVER_MODE mode, DHCP_FAILOVER_SERVER serverType, FSM_STATE state, FSM_STATE prevState, int mclt, int safePeriod, string relationshipName, string primaryServerName, string secondaryServerName, IntPtr scopesPointer, byte percentage, string sharedSecret)
 {
     PrimaryServer       = primaryServer;
     SecondaryServer     = secondaryServer;
     Mode                = mode;
     ServerType          = serverType;
     State               = state;
     PrevState           = prevState;
     Mclt                = mclt;
     SafePeriod          = safePeriod;
     RelationshipName    = relationshipName;
     PrimaryServerName   = primaryServerName;
     SecondaryServerName = secondaryServerName;
     ScopesPointer       = scopesPointer;
     Percentage          = percentage;
     SharedSecret        = sharedSecret;
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Constructor to support DhcpV4FailoverAddScopeToRelationship
        /// </summary>
        public DHCP_FAILOVER_RELATIONSHIP_Managed(string relationshipName, DHCP_IP_ARRAY_Managed scopes)
        {
            PrimaryServer       = (DHCP_IP_ADDRESS)0;
            SecondaryServer     = (DHCP_IP_ADDRESS)0;
            Mode                = (DHCP_FAILOVER_MODE)(-1);
            ServerType          = (DHCP_FAILOVER_SERVER)(-1);
            State               = (FSM_STATE)(-1);
            PrevState           = (FSM_STATE)(-1);
            Mclt                = -1;
            SafePeriod          = -1;
            RelationshipName    = relationshipName;
            PrimaryServerName   = null;
            SecondaryServerName = null;
            Percentage          = 0xFF;
            SharedSecret        = null;

            ScopesPointer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(DHCP_IP_ARRAY_Managed)));
            Marshal.StructureToPtr(scopes, ScopesPointer, false);
        }
Ejemplo n.º 11
0
        public DHCP_FAILOVER_RELATIONSHIP_Managed(DHCP_IP_ADDRESS primaryServer, DHCP_IP_ADDRESS secondaryServer, DHCP_FAILOVER_MODE mode, DHCP_FAILOVER_SERVER serverType, FSM_STATE state, FSM_STATE prevState, int mclt, int safePeriod, string relationshipName, string primaryServerName, string secondaryServerName, DHCP_IP_ARRAY_Managed scopes, byte percentage, string sharedSecret)
        {
            PrimaryServer       = primaryServer;
            SecondaryServer     = secondaryServer;
            Mode                = mode;
            ServerType          = serverType;
            State               = state;
            PrevState           = prevState;
            Mclt                = mclt;
            SafePeriod          = safePeriod;
            RelationshipName    = relationshipName;
            PrimaryServerName   = primaryServerName;
            SecondaryServerName = secondaryServerName;
            Percentage          = percentage;
            SharedSecret        = sharedSecret;

            ScopesPointer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(DHCP_IP_ARRAY_Managed)));
            Marshal.StructureToPtr(scopes, ScopesPointer, false);
        }
Ejemplo n.º 12
0
 public DHCP_OPTION_SCOPE_INFO_Managed_Subnet(DHCP_IP_ADDRESS subnetScopeInfo)
 {
     scopeType       = (IntPtr)DHCP_OPTION_SCOPE_TYPE.DhcpSubnetOptions;
     SubnetScopeInfo = subnetScopeInfo;
 }
Ejemplo n.º 13
0
 public DHCP_CLIENT_UID_Managed(DHCP_IP_ADDRESS data)
 {
     DataLength  = Marshal.SizeOf(data);
     DataPointer = Marshal.AllocHGlobal(DataLength);
     Marshal.StructureToPtr(data, DataPointer, false);
 }
Ejemplo n.º 14
0
 public DHCP_IP_RANGE(DHCP_IP_ADDRESS StartAddress, DHCP_IP_ADDRESS EndAddress)
 {
     this.StartAddress = StartAddress;
     this.EndAddress   = EndAddress;
 }
Ejemplo n.º 15
0
 public DHCP_OPTION_SCOPE_INFO_Managed_Reserved(DHCP_IP_ADDRESS reservedIpSubnetAddress, DHCP_IP_ADDRESS reservedIpAddress)
 {
     scopeType               = (IntPtr)DHCP_OPTION_SCOPE_TYPE.DhcpReservedOptions;
     ReservedIpAddress       = reservedIpAddress;
     ReservedIpSubnetAddress = reservedIpSubnetAddress;
 }
Ejemplo n.º 16
0
 public DHCP_SEARCH_INFO_Managed_IpAddress(DHCP_IP_ADDRESS clientIpAddress)
 {
     searchType      = (IntPtr)DHCP_SEARCH_INFO_TYPE.DhcpClientIpAddress;
     ClientIpAddress = clientIpAddress;
 }
Ejemplo n.º 17
0
 public DHCP_HOST_INFO_Managed(DHCP_IP_ADDRESS ipAddress, string netBiosName, string serverName)
 {
     IpAddress   = ipAddress;
     NetBiosName = netBiosName;
     ServerName  = serverName;
 }