Share via


VpnChannel.StartWithMainTransport Method

Definition

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.

public:
 virtual void StartWithMainTransport(IVectorView<HostName ^> ^ assignedClientIPv4list, IVectorView<HostName ^> ^ assignedClientIPv6list, VpnInterfaceId ^ vpnInterfaceId, VpnRouteAssignment ^ assignedRoutes, VpnDomainNameAssignment ^ assignedDomainName, unsigned int mtuSize, unsigned int maxFrameSize, bool Reserved, Platform::Object ^ mainOuterTunnelTransport) = StartWithMainTransport;
void StartWithMainTransport(IVectorView<HostName> const& assignedClientIPv4list, IVectorView<HostName> const& assignedClientIPv6list, VpnInterfaceId const& vpnInterfaceId, VpnRouteAssignment const& assignedRoutes, VpnDomainNameAssignment const& assignedDomainName, uint32_t const& mtuSize, uint32_t const& maxFrameSize, bool const& Reserved, IInspectable const& mainOuterTunnelTransport);
public void StartWithMainTransport(IReadOnlyList<HostName> assignedClientIPv4list, IReadOnlyList<HostName> assignedClientIPv6list, VpnInterfaceId vpnInterfaceId, VpnRouteAssignment assignedRoutes, VpnDomainNameAssignment assignedDomainName, uint mtuSize, uint maxFrameSize, bool Reserved, object mainOuterTunnelTransport);
function startWithMainTransport(assignedClientIPv4list, assignedClientIPv6list, vpnInterfaceId, assignedRoutes, assignedDomainName, mtuSize, maxFrameSize, Reserved, mainOuterTunnelTransport)
Public Sub StartWithMainTransport (assignedClientIPv4list As IReadOnlyList(Of HostName), assignedClientIPv6list As IReadOnlyList(Of HostName), vpnInterfaceId As VpnInterfaceId, assignedRoutes As VpnRouteAssignment, assignedDomainName As VpnDomainNameAssignment, mtuSize As UInteger, maxFrameSize As UInteger, Reserved As Boolean, mainOuterTunnelTransport As Object)

Parameters

assignedClientIPv4list

IVectorView<HostName>

IReadOnlyList<HostName>

A pointer to a Windows.Networking.HostName structure specifying the IPv4 address assigned by the VPN server to the VPN client. The address should be set on the VPN L3 interface. If null, DHCPv4 is used.

assignedClientIPv6list

IVectorView<HostName>

IReadOnlyList<HostName>

A pointer to a Windows.Networking.HostName structure specifying the IPv6 address assigned by the VPN server to the VPN client, and which should be set on the VPN L3 interface. If null, DHCPv6 or RD is used.

vpnInterfaceId
VpnInterfaceId

A pointer to a VpnInterfaceId object.

assignedRoutes
VpnRouteAssignment

A pointer to a **Windows.Networking.VpnRouteAssignment ** class that represents the routes which should be associated / not associated with the VPN interface.

assignedDomainName
VpnDomainNameAssignment

A pointer to a Windows.Networking.DomainNameAssignment class that represents the list of name prefixes that are associated to the VPN channel, including its DNS and proxy servers.

mtuSize
UInt32

unsigned int

uint32_t

A UINT16 value specifying the MTU size of the VPN L3 network interface. This is also the size of the IVpnPacketBuffers in the Receive pool. This value should be configured to be at most 1400.

maxFrameSize
UInt32

unsigned int

uint32_t

A UINT16 value specifying the max size of the frame defined by the VPN protocol encapsulation without counting the outerTunnelTransport. This is also the size of the IVpnPacketBuffers in the Send pool. This value should be configured as mtuSize + [size of encapsulation headers], and should be <=1500. If it would be greater than 1500 either mtuSize or encapsulation header size should be reduced as the platform limits the framesize to 1500.

Reserved
Boolean

bool

Reserved

mainOuterTunnelTransport
Object

Platform::Object

IInspectable

An IInspectable object for socket transport. This object can be a Windows.Networking.Sockets.DatagramSocket or a Windows.Networking.Sockets.StreamSocket. This socket object controls the connection to the VPN server, and is used to send encapsulated IP packets and to receive encapsulated data. The socket must be unconnected at the time of the call.

Windows requirements

App capabilities
networkingVpnProvider

Applies to

See also