138 fnNetSimError(
"%s is not valid ip for any device.Check VPN server ip setting.\n",server);
146 vpn=
calloc(1,
sizeof* vpn);
203 else if(newip->
type == 6)
205#pragma message(__LOC__"fn_NetSim_IP_VPN_GetIPFromServer needs to be implemented for IPV6")
336 NULL, 1, &virtualIp, &virtualInterface,
VPN_METRIC,
"VPN");
381 memcpy(newVpn,vpnPacket,
sizeof* newVpn);
382 return (
void*)newVpn;
ptrIP_ROUTINGTABLE iptable_add(ptrIP_WRAPPER wrapper, NETSIM_IPAddress dest, NETSIM_IPAddress subnet, unsigned int prefix_len, NETSIM_IPAddress gateway, UINT interfaceCount, NETSIM_IPAddress *interfaceIp, NETSIM_ID *interfaceId, unsigned int metric, char *type)
NETSIM_IPAddress IP_COPY(NETSIM_IPAddress ip)
#define IP_NETWORK_ADDRESS_IPV4(ip, subnet)
NETSIM_IPAddress IP_COPY_FORCE(NETSIM_IPAddress ip)
NETSIM_IPAddress IP_NETWORK_ADDRESS(NETSIM_IPAddress ip, NETSIM_IPAddress subnet, unsigned int prefix_len)
#define IP_COMPARE(ip1, ip2)
#define STR_TO_IP4(ipstr)
#define _declspec(dllexport)
This function is used to trigger the update.
#define fnNetSimError(x,...)
#define LIST_ADD_LAST(ls, mem)
NETSIM_IPAddress fn_NetSim_Stack_GetFirstIPAddressAsId(NETSIM_ID nDeviceId, unsigned int type)
EXPORTED struct stru_NetSim_Network * NETWORK
#define DEVICE_NWLAYER(DeviceId)
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
#define DEVICE_INTERFACE(DeviceId, InterfaceId)
#define IP_WRAPPER_GET(DeviceId)
NETSIM_ID fn_NetSim_Stack_GetDeviceId_asIP(NETSIM_IPAddress ip, NETSIM_ID *nInterfaceId)
int freeVPNPacket(VPN_PACKET *vpnPacket)
int fn_NetSim_IP_VPN_Init()
NETSIM_IPAddress fn_NetSim_IP_FindWANInterfaceIP(NETSIM_ID ndeviceId)
void * copyVPNPacket(VPN_PACKET *vpnPacket)
int fn_NetSim_IP_VPN_Run()
int fn_NetSim_IP_VPN_GetIPFromServer(NETSIM_IPAddress server, NETSIM_IPAddress *ip, NETSIM_IPAddress *mask, NETSIM_ID nCurrentDeviceId)
NETSIM_IPAddress vpn_getVirtualIp(NETSIM_ID ndeviceId)
int vpn_addtable(ptrIP_WRAPPER wrapper, NETSIM_ID serverId, NETSIM_IPAddress virtualIp, NETSIM_ID virtualInterface)
NETSIM_IPAddress getVirtualIP(NETSIM_ID ndeviceId)
#define fnpAddEvent(pstruEvent)
Structure to store the device ip details.
NETSIM_IPAddress ipPoolEnd
NETSIM_IPAddress ipPoolStart
NETSIM_IPAddress ipPoolMask
NETSIM_IPAddress serverIP
struct stru_NetSim_NetworkLayer * pstruNetworkLayer
struct stru_NetSim_Interface ** ppstruInterfaceList
NETSIM_ID nNumOfInterface
struct stru_NetSim_Packet * pPacket
NETWORK_LAYER_PROTOCOL nLocalNetworkProtocol
NETSIM_IPAddress szSubnetMask
INTERFACE_TYPE nInterfaceType
struct stru_NetSim_Interface * pstruPrevInterface
NETWORK_LAYER_PROTOCOL nProtocolId
struct stru_NetSim_Interface * pstruNextInterface
NETSIM_IPAddress szAddress
struct stru_NetSim_Device ** ppstruDeviceList
NETSIM_IPAddress szGatewayIP
NETSIM_IPAddress szDestIP
void * Packet_NetworkProtocol
NETSIM_IPAddress szNextHopIp
NETSIM_IPAddress szSourceIP
char szPacketType[MAX_PACKET_TYPE_LEN]
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
unsigned int nControlDataType
void * ipVar
Original IP header.
unsigned int nControlPacketType
Original control packet type.
NETSIM_IPAddress sourceIP
Original source.
PACKET_TYPE nPacketType
Original packet type.
NETSIM_IPAddress destIP
Original destination
NETSIM_IPAddress * LocalIP
unsigned int nConnectedDeviceCount
NETSIM_IPAddress * InternetIP
struct stru_ip::@5::ipv4 IPV4