Beispiel #1
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;
 }
Beispiel #2
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);
        }
Beispiel #3
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);
        }