NetSim Source Code Help
Loading...
Searching...
No Matches
VPN.c File Reference
#include "main.h"
#include "List.h"
#include "IP.h"
#include "VPN.h"
Include dependency graph for VPN.c:

Go to the source code of this file.

Functions

int fn_NetSim_IP_VPN_GetIPFromServer (NETSIM_IPAddress server, NETSIM_IPAddress *ip, NETSIM_IPAddress *mask, NETSIM_ID nCurrentDeviceId)
 
NETSIM_IPAddress fn_NetSim_IP_FindWANInterfaceIP (NETSIM_ID ndeviceId)
 
NETSIM_IPAddress vpn_getVirtualIp (NETSIM_ID ndeviceId)
 
int vpn_addtable (ptrIP_WRAPPER wrapper, NETSIM_ID serverId, NETSIM_IPAddress virtualIp, NETSIM_ID virtualInterface)
 
int fn_NetSim_IP_VPN_Init ()
 
int fn_NetSim_IP_VPN_Run ()
 
NETSIM_IPAddress getVirtualIP (NETSIM_ID ndeviceId)
 
int freeVPN (VPN *vpn)
 
int freeVPNPacket (VPN_PACKET *vpnPacket)
 
void * copyVPNPacket (VPN_PACKET *vpnPacket)
 

Function Documentation

◆ copyVPNPacket()

void * copyVPNPacket ( VPN_PACKET vpnPacket)

This function is used to copy the vpn packet.

Definition at line 378 of file VPN.c.

◆ fn_NetSim_IP_FindWANInterfaceIP()

NETSIM_IPAddress fn_NetSim_IP_FindWANInterfaceIP ( NETSIM_ID  ndeviceId)

This function is to find the WLAN interface IP address.

Definition at line 301 of file VPN.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IP_VPN_GetIPFromServer()

int fn_NetSim_IP_VPN_GetIPFromServer ( NETSIM_IPAddress  server,
NETSIM_IPAddress ip,
NETSIM_IPAddress mask,
NETSIM_ID  nCurrentDeviceId 
)

This function is to get the ip address from the server.

Definition at line 127 of file VPN.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IP_VPN_Init()

int fn_NetSim_IP_VPN_Init ( )

This function is to initialize the VPN(Virtual Private Network).

Definition at line 25 of file VPN.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IP_VPN_Run()

int fn_NetSim_IP_VPN_Run ( )

This function is to trigger the events of VPN, which includes NETWORK_OUT and NETWORK_IN events.

Definition at line 212 of file VPN.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeVPN()

int freeVPN ( VPN vpn)

This function is to free the VPN

Definition at line 357 of file VPN.c.

◆ freeVPNPacket()

int freeVPNPacket ( VPN_PACKET vpnPacket)

This function is to free the packets of VPN.

Definition at line 370 of file VPN.c.

◆ getVirtualIP()

NETSIM_IPAddress getVirtualIP ( NETSIM_ID  ndeviceId)

Definition at line 313 of file VPN.c.

Here is the caller graph for this function:

◆ vpn_addtable()

int vpn_addtable ( ptrIP_WRAPPER  wrapper,
NETSIM_ID  serverId,
NETSIM_IPAddress  virtualIp,
NETSIM_ID  virtualInterface 
)

Definition at line 325 of file VPN.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vpn_getVirtualIp()

NETSIM_IPAddress vpn_getVirtualIp ( NETSIM_ID  ndeviceId)

This function is to get the virtual ip.

Definition at line 344 of file VPN.c.

Here is the caller graph for this function: