VpnChannel VpnChannel VpnChannel VpnChannel Class

Definition

Provides methods to create and destroy a VPN channel, and methods to perform buffer management. A VPN channel is the object in the system that links the network traffic data flow between the VPN plug-in's VPN server socket and the client machine network stack.

public : sealed class VpnChannel : IVpnChannel, IVpnChannel2
struct winrt::Windows::Networking::Vpn::VpnChannel : IVpnChannel, IVpnChannel2
public sealed class VpnChannel : IVpnChannel, IVpnChannel2
Public NotInheritable Class VpnChannel Implements IVpnChannel, IVpnChannel2
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
networkingVpnProvider

Properties

Configuration Configuration Configuration Configuration

Gets or sets a VpnChannelConfiguration object corresponding to the configuration of the VpnChannel and which dictates how to establish the communication with the VPN server.

CurrentRequestTransportContext CurrentRequestTransportContext CurrentRequestTransportContext CurrentRequestTransportContext

Gets the transport context object in use, for example the name of a host or server.

Id Id Id Id

Gets the unique instance ID of a VPN channel. This can be used to simplify demuxing operations between two VPN connection instances.

PlugInContext PlugInContext PlugInContext PlugInContext

Gets or sets a context object that VPN plug-ins can use to associate their internal state with a VpnChannel object for later use while the session is in progress.

SystemHealth SystemHealth SystemHealth SystemHealth

Gets the statement of health of the client machine.

Methods

AddAndAssociateTransport(Object, Object) AddAndAssociateTransport(Object, Object) AddAndAssociateTransport(Object, Object) AddAndAssociateTransport(Object, Object)

Prepares, marks, and creates the transport for use by the VPN framework as a transport link communicating the VPN plug-in to the VPN server. This call must be performed before any other operations related to the VPN framework APIs.

AssociateTransport(Object, Object) AssociateTransport(Object, Object) AssociateTransport(Object, Object) AssociateTransport(Object, Object)

Prepares and marks the transport for use by the VPN framework as a transport link communicating the VPN plug-in to the VPN server. This call must be performed before any other operations related to the VPN framework APIs.

GetSlotTypeForTransportContext(Object) GetSlotTypeForTransportContext(Object) GetSlotTypeForTransportContext(Object) GetSlotTypeForTransportContext(Object)

Retrieves the slot type (hardware or software) for the specified transport context object.

GetVpnReceivePacketBuffer() GetVpnReceivePacketBuffer() GetVpnReceivePacketBuffer() GetVpnReceivePacketBuffer()

Requests a VpnPacketBuffer object from the receive packet buffer pool to be used in the decapsulation or injection of a received packet from the VPN server into the local network stack

GetVpnSendPacketBuffer() GetVpnSendPacketBuffer() GetVpnSendPacketBuffer() GetVpnSendPacketBuffer()

Retrieves a VpnPacketBuffer object from the send packet buffer pool to use in encapsulation and transmission of a data packet from the client network stack to the VPN server.

LogDiagnosticMessage(String) LogDiagnosticMessage(String) LogDiagnosticMessage(String) LogDiagnosticMessage(String)

Writes a diagnostic message to the system log.

ProcessEventAsync(Object, Object) ProcessEventAsync(Object, Object) ProcessEventAsync(Object, Object) ProcessEventAsync(Object, Object)

Processes any pending VpnChannel events.

ReplaceAndAssociateTransport(Object, Object) ReplaceAndAssociateTransport(Object, Object) ReplaceAndAssociateTransport(Object, Object) ReplaceAndAssociateTransport(Object, Object)

Replaces an existing transport with a new one for use by the VPN framework as a transport link communicating the VPN plug-in to the VPN server.

RequestCredentials(VpnCredentialType, Boolean, Boolean, Certificate) RequestCredentials(VpnCredentialType, Boolean, Boolean, Certificate) RequestCredentials(VpnCredentialType, Boolean, Boolean, Certificate) RequestCredentials(VpnCredentialType, Boolean, Boolean, Certificate)

Request the VPN platform to collect credentials from the user. The plug-in can specify the type and form of credentials to collect. The result is an object containing the main credentials depending on the type and the secondary credentials for change and expiration cases.

RequestCredentialsAsync(VpnCredentialType) RequestCredentialsAsync(VpnCredentialType) RequestCredentialsAsync(VpnCredentialType) RequestCredentialsAsync(VpnCredentialType)

Requests the VPN platform to collect credentials of a given credential type from the user.

RequestCredentialsAsync(VpnCredentialType, UInt32) RequestCredentialsAsync(VpnCredentialType, UInt32) RequestCredentialsAsync(VpnCredentialType, UInt32) RequestCredentialsAsync(VpnCredentialType, UInt32)

Requests the VPN platform to collect credentials from the user. The plug-in can specify the type and form of credentials to collect. The result is an object containing the main credentials depending on the type, and the secondary credentials for change and expiration cases.

RequestCredentialsAsync(VpnCredentialType, UInt32, Certificate) RequestCredentialsAsync(VpnCredentialType, UInt32, Certificate) RequestCredentialsAsync(VpnCredentialType, UInt32, Certificate) RequestCredentialsAsync(VpnCredentialType, UInt32, Certificate)

VPN platform to collect credentials from the user. If user interaction is required to obtain a credential or consent, the platform provides the necessary user interaction. A VPN plug-in must request credentials before using any type of credential, even if the intent is not to invoke user interaction for it.

RequestCustomPrompt(IVectorView<IVpnCustomPrompt>) RequestCustomPrompt(IVectorView<IVpnCustomPrompt>) RequestCustomPrompt(IVectorView<IVpnCustomPrompt>) RequestCustomPrompt(IVectorView<IVpnCustomPrompt>)

Not supported.

RequestCustomPromptAsync(IVectorView<IVpnCustomPromptElement>) RequestCustomPromptAsync(IVectorView<IVpnCustomPromptElement>) RequestCustomPromptAsync(IVectorView<IVpnCustomPromptElement>) RequestCustomPromptAsync(IVectorView<IVpnCustomPromptElement>)

Requests information from the user by presenting a prompt. Allows the use of prompt elements that can be mixed to construct a full prompt to the user. Input provided by the user is returned to the caller in the objects specified.

RequestVpnPacketBuffer(VpnDataPathType, VpnPacketBuffer) RequestVpnPacketBuffer(VpnDataPathType, VpnPacketBuffer) RequestVpnPacketBuffer(VpnDataPathType, VpnPacketBuffer) RequestVpnPacketBuffer(VpnDataPathType, VpnPacketBuffer)

Not supported. Requests a IVpnPacketBuffer from the specified pool. There is one IVpnPacketBuffer for the send path and another IVpnPacketBuffer for the receive path

SetAllowedSslTlsVersions(Object, Boolean) SetAllowedSslTlsVersions(Object, Boolean) SetAllowedSslTlsVersions(Object, Boolean) SetAllowedSslTlsVersions(Object, Boolean)

Not supported.

SetErrorMessage(String) SetErrorMessage(String) SetErrorMessage(String) SetErrorMessage(String)

Not supported.

Start(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnNamespaceAssignment, UInt32, UInt32, Boolean, Object, Object) Start(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnNamespaceAssignment, UInt32, UInt32, Boolean, Object, Object) Start(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnNamespaceAssignment, UInt32, UInt32, Boolean, Object, Object) Start(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnNamespaceAssignment, UInt32, UInt32, Boolean, Object, Object)

Creates the VPN channel to be used by the VPN plug-in. It also creates an L3 network interface for applications in the client machine to be able to see the corporate network.

StartExistingTransports(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean) StartExistingTransports(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean) StartExistingTransports(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean) StartExistingTransports(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean)

Creates the VPN channel to be used by the VPN plug-in. It also creates an L3 network interface for applications in the client machine to be able to see the corporate network.

StartReconnectingTransport(Object, Object) StartReconnectingTransport(Object, Object) StartReconnectingTransport(Object, Object) StartReconnectingTransport(Object, Object)

Reconnect the socket transport. Transport and transport context are the only parameters that can be changed on a socket transport reconnection.

StartWithMainTransport(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object) StartWithMainTransport(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object) StartWithMainTransport(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object) StartWithMainTransport(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object)

Creates the VPN channel to be used by the VPN plug-in. It also creates an L3 network interface for applications in the client machine to be able to see the corporate network.

StartWithTrafficFilter(IIterable<HostName>, IIterable<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, IIterable<Object>, VpnTrafficFilterAssignment) StartWithTrafficFilter(IIterable<HostName>, IIterable<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, IIterable<Object>, VpnTrafficFilterAssignment) StartWithTrafficFilter(IIterable<HostName>, IIterable<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, IIterable<Object>, VpnTrafficFilterAssignment) StartWithTrafficFilter(IIterable<HostName>, IIterable<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, IIterable<Object>, VpnTrafficFilterAssignment)

Creates the VPN channel for an arbitrary numbers of transports to be used by the VPN plug-in. It also creates an L3 network interface for applications in the client machine to be able to see the corporate network. It allows the specification of traffic filters to use in per-app VPN scenarios.

StartWithTrafficFilter(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object, Object, VpnTrafficFilterAssignment) StartWithTrafficFilter(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object, Object, VpnTrafficFilterAssignment) StartWithTrafficFilter(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object, Object, VpnTrafficFilterAssignment) StartWithTrafficFilter(IVectorView<HostName>, IVectorView<HostName>, VpnInterfaceId, VpnRouteAssignment, VpnDomainNameAssignment, UInt32, UInt32, Boolean, Object, Object, VpnTrafficFilterAssignment)

Creates the VPN channel to be used by the VPN plug-in. It also creates an L3 network interface for applications in the client machine to be able to see the corporate network. It allows the specification of traffic filters to use in per-app VPN scenarios.

Stop() Stop() Stop() Stop()

Destroys a previously established VPN channel object. Disassociates and closes the outerTunnelTransport connection to the VPN server.

TerminateConnection(String) TerminateConnection(String) TerminateConnection(String) TerminateConnection(String)

Allows a VPN plugin to indicate an error message and terminate the connection attempt performed inside the IVpnPlugin.Connect method. Should not be called on reconnect cases.

Events

ActivityChange ActivityChange ActivityChange ActivityChange

Not supported.

ActivityStateChange ActivityStateChange ActivityStateChange ActivityStateChange

Event raised when the channel's activity state has changed. Used by VPN plug-ins to determine whether the channel is active with traffic or idle.