Share via


IVpnPlugIn.Decapsulate Method

Definition

This method instructs the VPN plug-in to prepare receive a buffer from the VPN server outerTunnelTransport, extract any number of IP packets encapsulated in the buffer, and return the IP packets together with any other reply buffers that are needed to be sent back through the outerTunnelTransport to the VPN server.

public:
 void Decapsulate(VpnChannel ^ channel, VpnPacketBuffer ^ encapBuffer, VpnPacketBufferList ^ decapsulatedPackets, VpnPacketBufferList ^ controlPacketsToSend);
void Decapsulate(VpnChannel const& channel, VpnPacketBuffer const& encapBuffer, VpnPacketBufferList const& decapsulatedPackets, VpnPacketBufferList const& controlPacketsToSend);
public void Decapsulate(VpnChannel channel, VpnPacketBuffer encapBuffer, VpnPacketBufferList decapsulatedPackets, VpnPacketBufferList controlPacketsToSend);
function decapsulate(channel, encapBuffer, decapsulatedPackets, controlPacketsToSend)
Public Sub Decapsulate (channel As VpnChannel, encapBuffer As VpnPacketBuffer, decapsulatedPackets As VpnPacketBufferList, controlPacketsToSend As VpnPacketBufferList)

Parameters

channel
VpnChannel

The VPN channel object representing the instance VPN connection of the VPN plug-in to the VPN server.

encapBuffer
VpnPacketBuffer

A buffer originated from the VPN server and received through the outerTunnelTransport.

decapsulatedPackets
VpnPacketBufferList

An IVpnPacketBuffer chain representing any L3 IP packets extracted and decapsulated from the buffer and which need to be injected through the VPN interface to be received by the client machine's TCP/IP stack.

controlPacketsToSend
VpnPacketBufferList

An IVpnPacketBuffer chain representing any control messages that VPN plug-in is required by its protocol specification to reply back to the VPN server.

Windows requirements

App capabilities
networkingVpnProvider

Remarks

If an error occurs the packets will simply be dropped. It is required that any IVpnPacketBuffer objects requested by the plugin be returned to the VPN framework via either the decapsulatedPackets chain, to inject into the client TCP/IP stack, or the controlPacketsToSend chain, to reply back to the VPN server. The VPN framework will send all the VpnPacketBufferList chained on decapsulatedPackets as unique IP packets to the VPN interface.

Applies to