VPNRequest Method
      
 

Description

Called when VPN connection is requested by remote side.

Return Type

None  

Syntax

object.VPNRequest Owner, RemoteIP, RemoteMAC

The VPNRequest Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type IwodVPNNotify.
Owner A wodVPNCom object. Reference to the wodVPNCom instance that called this notification method.
RemoteIPA String value. IP address of remote peer.
RemoteMACA String value. MAC address of remote peer.

Remarks

This method is called only if you have implemented the IwodVPNNotify interface in your application and the wodVPN1.Notification property has received a reference to an instance of your implementation.

This notification method is called when remote peer set RedirectActive property to True on his side, and is ready to start forwarding raw network packets between his adapter, and your adapter. When this method is called, you should choose appropriate adapter from VPNInterfaces (if you haven't done so yet) and also set RedirectActive property to True. At this point wodVPN will start routing packets between them, and VPN is established. wodVPN will overwrite VPNRemoteIP and VPNRemoteMAC properties with RemoteIP and RemoteMAC arguments provided in this event only if those properties are empty. If you have set them manually, these two arguments are ignored.

If RemoteIP contains "0.0.0.0" then remote peer's IP address is not correctly set, and traffic will not be routed correctly (VPN will not work). You should make sure RemoteIP and LocalIP or selected network adapter are in same subnet.