Example #1
0
 /// <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;
 }
Example #2
0
 /// <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;
 }
Example #3
0
 /// <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;
 }
Example #4
0
 /// <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;
 }
Example #5
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);
        }
Example #6
0
        public void OptionsTest()
        {
            int errorCode = int.MaxValue;
            RasCompressionType    compressionAlgorithm       = RasCompressionType.Mppc;
            RasCompressionOptions expected                   = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption128Bit);
            RasCompressionType    serverCompressionAlgorithm = RasCompressionType.Stac;
            RasCompressionOptions serverOptions              = new RasCompressionOptions(NativeMethods.RASCCPO.Encryption40Bit);

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

            RasCompressionOptions actual;

            actual = target.Options;

            Assert.AreSame(expected, actual);
        }
Example #7
0
        public void CompressionAlgorithmTest()
        {
            int errorCode = int.MaxValue;
            RasCompressionType    expected = 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, expected, options, serverCompressionAlgorithm, serverOptions);

            RasCompressionType actual;

            actual = target.CompressionAlgorithm;

            Assert.AreEqual(expected, actual);
        }
Example #8
0
 /// <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;
 }