コード例 #1
0
ファイル: RasPppInfo.cs プロジェクト: mogikanin/DotRas
 /// <summary>
 /// Initializes a new instance of the <see cref="DotRas.RasPppInfo"/> class.
 /// </summary>
 /// <param name="ipv4NegotiationErrorCode">The result of a PPP IPv4 network control protocol negotiation.</param>
 /// <param name="ipAddress">The IP address of the local client.</param>
 /// <param name="serverIPAddress">The IP address of the remote server.</param>
 /// <param name="options">The Internet Protocol Control Protocol (IPCP) options for the local client.</param>
 /// <param name="serverOptions">The Internet Protocol Control Protocol (IPCP) options for the remote server.</param>
 /// <param name="ipv6NegotiationErrorCode">The result of a PPP IPv6 network control protocol negotiation.</param>
 /// <param name="interfaceIdentifier">The 64-bit IPv6 interface identifier of the client.</param>
 /// <param name="serverInterfaceIdentifier">the 64-bit IPv6 interface identifier of the server.</param>
 /// <param name="isBundled"><b>true</b> if the connection is composed of multiple links, otherwise <b>false</b>.</param>
 /// <param name="isMultilink"><b>true</b> if the connection supports multiple links, otherwise <b>false</b>.</param>
 /// <param name="authenticationProtocol">The authentication protocol used to authenticate the local client.</param>
 /// <param name="authenticationData">The authentication data used by the local client.</param>
 /// <param name="serverAuthenticationProtocol">The authentication protocol used by the remote server.</param>
 /// <param name="serverAuthenticationData">The authentication data used by the remote server.</param>
 /// <param name="eapTypeId">The type identifier of the Extensible Authentication Protocol (EAP) used to authenticate the local client.</param>
 /// <param name="serverEapTypeId">The type identifier of the Extensible Authentication Protocol (EAP) used to authenticate the remote server.</param>
 /// <param name="lcpOptions">The Link Control Protocol (LCP) options in use by the local client.</param>
 /// <param name="serverLcpOptions">The Link Control Protocol (LCP) options in use by the remote server.</param>
 /// <param name="ccpCompressionAlgorithm">The compression algorithm in use by the local client.</param>
 /// <param name="serverCcpCompressionAlgorithm">The compression algorithm in use by the remote server.</param>
 /// <param name="ccpOptions">The compression options on the local client.</param>
 /// <param name="serverCcpOptions">The compression options on the remote server.</param>
 internal RasPppInfo(int ipv4NegotiationErrorCode, IPAddress ipAddress, IPAddress serverIPAddress, RasIPOptions options, RasIPOptions serverOptions, int ipv6NegotiationErrorCode, ReadOnlyCollection <byte> interfaceIdentifier, ReadOnlyCollection <byte> serverInterfaceIdentifier, bool isBundled, bool isMultilink, RasLcpAuthenticationType authenticationProtocol, RasLcpAuthenticationDataType authenticationData, RasLcpAuthenticationType serverAuthenticationProtocol, RasLcpAuthenticationDataType serverAuthenticationData, int eapTypeId, int serverEapTypeId, RasLcpOptions lcpOptions, RasLcpOptions serverLcpOptions, RasCompressionType ccpCompressionAlgorithm, RasCompressionType serverCcpCompressionAlgorithm, RasCompressionOptions ccpOptions, RasCompressionOptions serverCcpOptions)
 {
     IPv4NegotiationErrorCode = ipv4NegotiationErrorCode;
     IPAddress                     = ipAddress;
     ServerIPAddress               = serverIPAddress;
     Options                       = options;
     ServerOptions                 = serverOptions;
     IPv6NegotiationErrorCode      = ipv6NegotiationErrorCode;
     InterfaceIdentifier           = interfaceIdentifier;
     ServerInterfaceIdentifier     = serverInterfaceIdentifier;
     IsBundled                     = isBundled;
     IsMultilink                   = isMultilink;
     AuthenticationProtocol        = authenticationProtocol;
     AuthenticationData            = authenticationData;
     ServerAuthenticationProtocol  = serverAuthenticationProtocol;
     ServerAuthenticationData      = serverAuthenticationData;
     EapTypeId                     = eapTypeId;
     ServerEapTypeId               = serverEapTypeId;
     LcpOptions                    = lcpOptions;
     ServerLcpOptions              = serverLcpOptions;
     CcpCompressionAlgorithm       = ccpCompressionAlgorithm;
     ServerCcpCompressionAlgorithm = serverCcpCompressionAlgorithm;
     CcpOptions                    = ccpOptions;
     ServerCcpOptions              = serverCcpOptions;
 }
コード例 #2
0
ファイル: RasCcpInfo.cs プロジェクト: kangwl/xk
 /// <summary>
 /// Initializes a new instance of the <see cref="DotRas.RasCcpInfo"/> class.
 /// </summary>
 /// <param name="errorCode">The error code (if any) that occurred.</param>
 /// <param name="compressionAlgorithm">The compression algorithm in use by the client.</param>
 /// <param name="options">The compression options on the client.</param>
 /// <param name="serverCompressionAlgorithm">The compression algorithm in use by the server.</param>
 /// <param name="serverOptions">The compression options on the server.</param>
 internal RasCcpInfo(int errorCode, RasCompressionType compressionAlgorithm, RasCompressionOptions options, RasCompressionType serverCompressionAlgorithm, RasCompressionOptions serverOptions)
 {
     this.ErrorCode = errorCode;
     this.CompressionAlgorithm = compressionAlgorithm;
     this.Options = options;
     this.ServerCompressionAlgorithm = serverCompressionAlgorithm;
     this.ServerOptions = serverOptions;
 }
コード例 #3
0
ファイル: RasCcpInfo.cs プロジェクト: winnster/DotRas-V1
 /// <summary>
 /// Initializes a new instance of the <see cref="DotRas.RasCcpInfo"/> class.
 /// </summary>
 /// <param name="errorCode">The error code (if any) that occurred.</param>
 /// <param name="compressionAlgorithm">The compression algorithm in use by the client.</param>
 /// <param name="options">The compression options on the client.</param>
 /// <param name="serverCompressionAlgorithm">The compression algorithm in use by the server.</param>
 /// <param name="serverOptions">The compression options on the server.</param>
 internal RasCcpInfo(int errorCode, RasCompressionType compressionAlgorithm, RasCompressionOptions options, RasCompressionType serverCompressionAlgorithm, RasCompressionOptions serverOptions)
 {
     this.ErrorCode            = errorCode;
     this.CompressionAlgorithm = compressionAlgorithm;
     this.Options = options;
     this.ServerCompressionAlgorithm = serverCompressionAlgorithm;
     this.ServerOptions = serverOptions;
 }
コード例 #4
0
ファイル: RasCcpInfo.cs プロジェクト: mogikanin/DotRas
 /// <summary>
 /// Initializes a new instance of the <see cref="DotRas.RasCcpInfo"/> class.
 /// </summary>
 /// <param name="errorCode">The error code (if any) that occurred.</param>
 /// <param name="compressionAlgorithm">The compression algorithm in use by the client.</param>
 /// <param name="options">The compression options on the client.</param>
 /// <param name="serverCompressionAlgorithm">The compression algorithm in use by the server.</param>
 /// <param name="serverOptions">The compression options on the server.</param>
 internal RasCcpInfo(int errorCode, RasCompressionType compressionAlgorithm, RasCompressionOptions options, RasCompressionType serverCompressionAlgorithm, RasCompressionOptions serverOptions)
 {
     ErrorCode            = errorCode;
     CompressionAlgorithm = compressionAlgorithm;
     Options = options;
     ServerCompressionAlgorithm = serverCompressionAlgorithm;
     ServerOptions = serverOptions;
 }
コード例 #5
0
        /// <summary>
        /// Creates a copy of this object.
        /// </summary>
        /// <returns>A new <see cref="DotRas.RasCompressionOptions"/> object.</returns>
        public object Clone()
        {
            RasCompressionOptions retval = new RasCompressionOptions();

            retval.CompressionOnly  = this.CompressionOnly;
            retval.HistoryLess      = this.HistoryLess;
            retval.Encryption56Bit  = this.Encryption56Bit;
            retval.Encryption40Bit  = this.Encryption40Bit;
            retval.Encryption128Bit = this.Encryption128Bit;

            return(retval);
        }
コード例 #6
0
        /// <summary>
        /// Creates a copy of this object.
        /// </summary>
        /// <returns>A new <see cref="DotRas.RasCompressionOptions"/> object.</returns>
        public object Clone()
        {
            var retval = new RasCompressionOptions
            {
                CompressionOnly  = CompressionOnly,
                HistoryLess      = HistoryLess,
                Encryption56Bit  = Encryption56Bit,
                Encryption40Bit  = Encryption40Bit,
                Encryption128Bit = Encryption128Bit
            };

            return(retval);
        }
コード例 #7
0
        public void ServerCompressionAlgorithmTest()
        {
            int errorCode = int.MaxValue;
            RasCompressionType compressionAlgorithm = RasCompressionType.Mppc;
            RasCompressionOptions options = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption128Bit);
            RasCompressionType expected = RasCompressionType.Stac;
            RasCompressionOptions serverOptions = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption40Bit);

            RasCcpInfo target = new RasCcpInfo(errorCode, compressionAlgorithm, options, expected, serverOptions);

            RasCompressionType actual;
            actual = target.ServerCompressionAlgorithm;

            Assert.AreEqual(expected, actual);
        }
コード例 #8
0
ファイル: RasPppInfo.cs プロジェクト: kangwl/xk
 /// <summary>
 /// Initializes a new instance of the <see cref="DotRas.RasPppInfo"/> class.
 /// </summary>
 /// <param name="ipv4NegotiationErrorCode">The result of a PPP IPv4 network control protocol negotiation.</param>
 /// <param name="ipAddress">The IP address of the local client.</param>
 /// <param name="serverIPAddress">The IP address of the remote server.</param>
 /// <param name="options">The Internet Protocol Control Protocol (IPCP) options for the local client.</param>
 /// <param name="serverOptions">The Internet Protocol Control Protocol (IPCP) options for the remote server.</param>
 /// <param name="ipv6NegotiationErrorCode">The result of a PPP IPv6 network control protocol negotiation.</param>
 /// <param name="interfaceIdentifier">The 64-bit IPv6 interface identifier of the client.</param>
 /// <param name="serverInterfaceIdentifier">the 64-bit IPv6 interface identifier of the server.</param>
 /// <param name="isBundled"><b>true</b> if the connection is composed of multiple links, otherwise <b>false</b>.</param>
 /// <param name="isMultilink"><b>true</b> if the connection supports multiple links, otherwise <b>false</b>.</param>
 /// <param name="authenticationProtocol">The authentication protocol used to authenticate the local client.</param>
 /// <param name="authenticationData">The authentication data used by the local client.</param>
 /// <param name="serverAuthenticationProtocol">The authentication protocol used by the remote server.</param>
 /// <param name="serverAuthenticationData">The authentication data used by the remote server.</param>
 /// <param name="eapTypeId">The type identifier of the Extensible Authentication Protocol (EAP) used to authenticate the local client.</param>
 /// <param name="serverEapTypeId">The type identifier of the Extensible Authentication Protocol (EAP) used to authenticate the remote server.</param>
 /// <param name="lcpOptions">The Link Control Protocol (LCP) options in use by the local client.</param>
 /// <param name="serverLcpOptions">The Link Control Protocol (LCP) options in use by the remote server.</param>
 /// <param name="ccpCompressionAlgorithm">The compression algorithm in use by the local client.</param>
 /// <param name="serverCcpCompressionAlgorithm">The compression algorithm in use by the remote server.</param>
 /// <param name="ccpOptions">The compression options on the local client.</param>
 /// <param name="serverCcpOptions">The compression options on the remote server.</param>
 internal RasPppInfo(int ipv4NegotiationErrorCode, IPAddress ipAddress, IPAddress serverIPAddress, RasIPOptions options, RasIPOptions serverOptions, int ipv6NegotiationErrorCode, ReadOnlyCollection<byte> interfaceIdentifier, ReadOnlyCollection<byte> serverInterfaceIdentifier, bool isBundled, bool isMultilink, RasLcpAuthenticationType authenticationProtocol, RasLcpAuthenticationDataType authenticationData, RasLcpAuthenticationType serverAuthenticationProtocol, RasLcpAuthenticationDataType serverAuthenticationData, int eapTypeId, int serverEapTypeId, RasLcpOptions lcpOptions, RasLcpOptions serverLcpOptions, RasCompressionType ccpCompressionAlgorithm, RasCompressionType serverCcpCompressionAlgorithm, RasCompressionOptions ccpOptions, RasCompressionOptions serverCcpOptions)
 {
     this.IPv4NegotiationErrorCode = ipv4NegotiationErrorCode;
     this.IPAddress = ipAddress;
     this.ServerIPAddress = serverIPAddress;
     this.Options = options;
     this.ServerOptions = serverOptions;
     this.IPv6NegotiationErrorCode = ipv6NegotiationErrorCode;
     this.InterfaceIdentifier = interfaceIdentifier;
     this.ServerInterfaceIdentifier = serverInterfaceIdentifier;
     this.IsBundled = isBundled;
     this.IsMultilink = isMultilink;
     this.AuthenticationProtocol = authenticationProtocol;
     this.AuthenticationData = authenticationData;
     this.ServerAuthenticationProtocol = serverAuthenticationProtocol;
     this.ServerAuthenticationData = serverAuthenticationData;
     this.EapTypeId = eapTypeId;
     this.ServerEapTypeId = serverEapTypeId;
     this.LcpOptions = lcpOptions;
     this.ServerLcpOptions = serverLcpOptions;
     this.CcpCompressionAlgorithm = ccpCompressionAlgorithm;
     this.ServerCcpCompressionAlgorithm = serverCcpCompressionAlgorithm;
     this.CcpOptions = ccpOptions;
     this.ServerCcpOptions = serverCcpOptions;
 }
コード例 #9
0
        public void RasCcpInfoConstructorTest()
        {
            int errorCode = int.MaxValue;
            RasCompressionType compressionAlgorithm = RasCompressionType.Mppc;
            RasCompressionOptions options = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption128Bit);
            RasCompressionType serverCompressionAlgorithm = RasCompressionType.Stac;
            RasCompressionOptions serverOptions = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption40Bit);

            RasCcpInfo target = new RasCcpInfo(errorCode, compressionAlgorithm, options, serverCompressionAlgorithm, serverOptions);

            Assert.IsNotNull(target);
        }
コード例 #10
0
        /// <summary>
        /// Creates a copy of this object.
        /// </summary>
        /// <returns>A new <see cref="DotRas.RasCompressionOptions"/> object.</returns>
        public object Clone()
        {
            RasCompressionOptions retval = new RasCompressionOptions();

            retval.CompressionOnly = this.CompressionOnly;
            retval.HistoryLess = this.HistoryLess;
            retval.Encryption56Bit = this.Encryption56Bit;
            retval.Encryption40Bit = this.Encryption40Bit;
            retval.Encryption128Bit = this.Encryption128Bit;

            return retval;
        }