NetSim Source Code Help
Loading...
Searching...
No Matches
Stack.h File Reference
#include "List.h"
#include "Wireless.h"
Include dependency graph for Stack.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stru_macaddress
 
struct  stru_NetSim_Coordinates
 
struct  stru_NetSim_SimulationParameter
 
struct  stru_NetSim_SocketInterface
 
struct  stru_NetSim_ApplicationLayer
 
struct  stru_NetSim_TransportLayer
 
struct  stru_ip_wrapper
 
struct  stru_NetSim_NetworkLayer
 
struct  stru_NetSim_MacLayer
 
struct  stru_NetSim_PhysicalLayer
 
struct  stru_NetSim_Device_Buffer
 
struct  stru_NetSim_Access_Interface
 
struct  stru_NodeJoinProfile
 
struct  stru_NetSim_Links
 
union  stru_NetSim_Links::uni_NetSim_MediumProp
 
struct  stru_NetSim_Links::uni_NetSim_MediumProp::stru_NetSim_WiredLink
 
struct  stru_NetSim_Links::uni_NetSim_MediumProp::stru_NetSim_wirelessLink
 
union  stru_NetSim_Links::uni_NetSim_Link_DeviceList
 
struct  stru_NetSim_Links::uni_NetSim_Link_DeviceList::stru_NetSim_P2P
 
struct  stru_NetSim_Links::uni_NetSim_Link_DeviceList::stru_NetSim_P2MP
 
struct  stru_NetSim_Links::uni_NetSim_Link_DeviceList::stru_NetSim_MP2MP
 
struct  stru_NetSim_Links::stru_linkFailureModel
 
struct  stru_NetSim_Interface
 
struct  stru_NetSim_Device
 
struct  stru_NetSim_Network
 
struct  stru_NetSim_EventDetails
 

Macros

#define EXPORTED   extern
 
#define MICROSECOND   (1.0)
 
#define NANOSECOND   (MICROSECOND/1000.0)
 
#define MILLISECOND   (1000.0*MICROSECOND)
 
#define SECOND   (1000.0*MILLISECOND)
 
#define MINUTE   (60.0*SECOND)
 
#define HOUR   (60.0*MINUTE)
 
#define INFINITY   (0xFFFFFFFF)
 
#define NEGATIVE_INFINITY   (-1.0*INFINITY)
 
#define PROTOCOL_METRICS   2
 Internal module. More...
 
#define PROTOCOL_MOBILITY   3
 
#define PROTOCOL_APPLICATION   4
 
#define PROTOCOL_LINK   5
 
#define PROTOCOL_HWI   6
 
#define PROTOCOL_CLI   7
 
#define M_PI   3.14159265358979323846
 
#define DegreesToRadians(degree)   ((degree) * (M_PI / 180.0))
 
#define RadiansToDegrees(radian)   ((radian) * (180.0 / M_PI))
 
#define JOIN_PROFILE_ALLOC()   (PNODE_JOIN_PROFILE)list_alloc(sizeof(NODE_JOIN_PROFILE),offsetof(NODE_JOIN_PROFILE,ele))
 
#define JOIN_PROFILE_NEXT(profile)   profile=(PNODE_JOIN_PROFILE)LIST_NEXT(profile)
 
#define JOIN_PROFILE_ADD(lprofile, profile)   LIST_ADD_LAST((void**)lprofile,profile)
 
#define SEED_COUNT   2
 
#define DEVICE(DeviceId)   NETWORK->ppstruDeviceList[DeviceId-1]
 
#define DEVICE_TYPE(DeviceId)   DEVICE(DeviceId)->nDeviceType
 
#define DEVICE_NAME(DeviceId)   DEVICE(DeviceId)->szDeviceName
 
#define DEVICE_VAR(DeviceId)   DEVICE(DeviceId)->deviceVar
 
#define DEVICE_SEED0(DeviceId)   &(DEVICE(DeviceId)->ulSeed[0])
 
#define DEVICE_SEED1(DeviceId)   &(DEVICE(DeviceId)->ulSeed[1])
 
#define DEVICE_SEED(DeviceId)   DEVICE_SEED0(DeviceId),DEVICE_SEED1(DeviceId)
 
#define DEVICE_CONFIGID(DeviceId)   DEVICE(DeviceId)->nConfigDeviceId
 
#define DEVICE_INTERFACE(DeviceId, InterfaceId)   DEVICE(DeviceId)->ppstruInterfaceList[InterfaceId-1]
 
#define DEVICE_INTERFACE_CONFIGID(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->nConfigInterfaceId
 
#define DEVICE_APPLAYER(DeviceId)   DEVICE(DeviceId)->pstruApplicationLayer
 
#define DEVICE_APPVAR(DeviceId, protocolId)   (fn_NetSim_Stack_GetAppProtocolData(DeviceId,protocolId))
 
#define DEVICE_TRXLayer(DeviceId)   DEVICE(DeviceId)->pstruTransportLayer
 
#define DEVICE_NWLAYER(DeviceId)   DEVICE(DeviceId)->pstruNetworkLayer
 
#define DEVICE_MACLAYER(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->pstruMACLayer
 
#define DEVICE_MACPROTOCOL(DeviceId, InterfaceId)   DEVICE_MACLAYER(DeviceId,InterfaceId)->nMacProtocolId
 
#define DEVICE_PHYLAYER(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->pstruPhysicalLayer
 
#define DEVICE_LINK(DeviceId, InterfaceId)   (DEVICE_PHYLAYER(DeviceId,InterfaceId)->pstruNetSimLinks)
 
#define DEVICE_POSITION(DeviceId)   DEVICE(DeviceId)->pstruDevicePosition
 
#define DEVICE_MOBILITY(DeviceId)   DEVICE(DeviceId)->pstruDeviceMobility
 
#define DEVICE_SOCKETINTERFACE(DeviceId)   DEVICE(DeviceId)->pstruSocketInterface
 
#define DEVICE_MAC_NW_INTERFACE(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->pstruAccessInterface
 
#define DEVICE_ACCESSBUFFER(DeviceId, InterfaceId)   DEVICE_MAC_NW_INTERFACE(DeviceId,InterfaceId)->pstruAccessBuffer
 
#define DEVICE_MYACCESSBUFFER()   DEVICE_ACCESSBUFFER(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)
 
#define DEVICE_PHYMEDIUM(DeviceId, InterfaceId)   DEVICE_PHYLAYER(DeviceId,InterfaceId)->nPhyMedium
 
#define DEVICE_PHYVAR(DeviceId, InterfaceId)   DEVICE_PHYLAYER(DeviceId,InterfaceId)->phyVar
 
#define DEVICE_MACVAR(DeviceId, InterfaceId)   DEVICE_MACLAYER(DeviceId,InterfaceId)->MacVar
 
#define DEVICE_HWADDRESS(DeviceId, InterfaceId)   DEVICE_MACLAYER(DeviceId,InterfaceId)->szMacAddress
 
#define DEVICE_NWROUTINGVAR(DeviceId)   DEVICE_NWLAYER(DeviceId)->RoutingVar
 
#define IP_WRAPPER_GET(DeviceId)   ((ptrIP_WRAPPER)(DEVICE_NWLAYER(DeviceId)->ipWrapper))
 
#define IP_TABLE_GET(DeviceId)   ((ptrIP_ROUTINGTABLE)(IP_WRAPPER_GET(DeviceId)->table))
 
#define PIP_TABLE_GET(DeviceId)   (&IP_TABLE_GET(DeviceId))
 
#define DEVICE_NWPROTOCOL(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->nProtocolId
 
#define DEVICE_NWADDRESS(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->szAddress
 
#define DEVICE_MYIP()   DEVICE_NWADDRESS(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)
 
#define DEVICE_SUBNETMASK(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->szSubnetMask
 
#define DEVICE_MYMASK()   DEVICE_SUBNETMASK(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)
 
#define DEVICE_PUBLICIP(DeviceId, InterfaceId)   DEVICE_INTERFACE(DeviceId,InterfaceId)->publicIP
 
#define DEVICE_FIRST_PUBLICIP(DeviceId)   DEVICE_PUBLICIP(DeviceId,1)
 
#define DEVICE_TCPVAR(DeviceId)   DEVICE_TRXLayer(DeviceId)->TCPProtocol
 
#define DEVICE_UDPVAR(DeviceId)   DEVICE_TRXLayer(DeviceId)->UDPProtocol
 
#define DEVICE_APPINFO(DeviceId)   DEVICE_APPLAYER(DeviceId)->pstruApplicationInfo
 
#define DEVICE_DISTANCE(d1, d2)   (fn_NetSim_Utilities_CalculateDistance(DEVICE_POSITION(d1), DEVICE_POSITION(d2)))
 
#define EVENT_TYPE(EventDetails)   (EventDetails)->nEventType
 
#define EVENT_TIME(EventDetails)   (EventDetails)->dEventTime
 
#define EVENT_DEVICETYPE(EventDetails)   (EventDetails)->nDeviceType
 
#define EVENT_DEVICEID(EventDetails)   (EventDetails)->nDeviceId
 
#define EVENT_INTERFACEID(EventDetails)   (EventDetails)->nInterfaceId
 
#define EVENT_APPID(EventDetails)   (EventDetails)->nApplicationId
 
#define EVENT_PACKETSIZE(EventDetails)   (EventDetails)->dPacketSize
 
#define EVENT_PACKET(EventDetails)   (EventDetails)->pPacket
 
#define EVENT_PACKETID(EventDetails)   (EventDetails)->nPacketId
 
#define EVENT_SUBEVENTTYPE(EventDetails)   (EventDetails)->nSubEventType
 
#define EVENT_OTHERDETAILS(EventDetails)   (EventDetails)->szOtherDetails
 
#define NETSIM_RAND_MAX   (double)10000000000
 
#define NETSIM_RAND()   fn_NetSim_Utilities_GenerateRandomNo(DEVICE_SEED(1))
 
#define NETSIM_RAND_01()   (NETSIM_RAND()/NETSIM_RAND_MAX)
 
#define NETSIM_RAND_RN(max, min)   (min+NETSIM_RAND_01()*(max-min))
 
#define fn_NetSim_xmlGetFirstChildElement(xmlNetSimNode, childName)   fn_NetSim_xmlGetChildElement(xmlNetSimNode,childName,0)
 
#define fn_NetSim_Metrics_Add(packet)   fn_NetSim_Metrics_Add_new(packet,__LINE__,__FILE__,__FUNCTION__)
 
#define DEFAULT_MAC_FRAGMENT_SIZE   1500
 
#define DEFAULT_TRX_MSS   1472
 
#define DEFAULT_NW_LAYER_SIZE   1480
 
#define getXmlVar(var, name, xmlNode, flag, type, protocol)   if(!GetXmlVal(var,#name,xmlNode,flag,type)) *(var)= protocol##_##name##_DEFAULT
 
#define ConfigReadEnum(xmlNode, attriName, enumName, isErrorMsg)   fn_NetSim_Config_ConvertStrToEnum(xmlNode,attriName,(const char**)str ## enumName, #enumName, sizeof(str ## enumName)/sizeof(str ## enumName ## [0]), isErrorMsg)
 

Typedefs

typedef enum enum_sim_state SIMSTATE
 
typedef enum enum_common_subevent COMMON_SUBEVENT
 
typedef enum enum_QueuingTechnique QUEUINGTECHNIQUE
 
typedef enum enum_NodeAction NODE_ACTION
 
typedef struct stru_macaddress NETSIM_MACADDRESS
 
typedef struct stru_macaddressPNETSIM_MACADDRESS
 
typedef enum enum_refEllipsoid GEOCORR_REFERENCEELLIPSOID
 
typedef enum enum_corrType NETSIM_COORDINATETYPE
 
typedef struct stru_NetSim_SocketInterface SOCKETINTERFACE
 
typedef struct stru_NetSim_SocketInterfaceptrSOCKETINTERFACE
 
typedef struct stru_ip_wrapper IP_WRAPPER
 
typedef struct stru_ip_wrapperptrIP_WRAPPER
 
typedef struct stru_NodeJoinProfile NODE_JOIN_PROFILE
 
typedef struct stru_NodeJoinProfilePNODE_JOIN_PROFILE
 
typedef unsigned long long int(* fn_NetSim_Utilities_AddEvent) (struct stru_NetSim_EventDetails *, int, const char *)
 
typedef NETSIM_IPAddress(* fndns_query) (NETSIM_ID nDeviceId, NETSIM_ID id)
 
typedef int(* _fnMobilityCallBack) (NETSIM_ID nDeviceId)
 
typedef int(* _fnNodeJoinCallBack) (NETSIM_ID nDeviceId, double time, NODE_ACTION)
 
typedef enum xmlDataType XMLDATATYPE
 
typedef int(* fun) (NETSIM_ID, NETSIM_ID, bool)
 

Enumerations

enum  enum_Flag { ZERO , ONE }
 
enum  enum_sim_state { SIMSTATE_NOTSTARTED , SIMSTATE_PAUSED , SIMSTATE_RUNNING , SIMSTATE_STOPPED }
 
enum  enum_LayerType {
  LAYER_NULL =0 , PHYSICAL_LAYER = 1 , MAC_LAYER , NETWORK_LAYER ,
  TRANSPORT_LAYER , APPLICATION_LAYER
}
 
enum  enum_EventType {
  END_EVENT = 0 , PHYSICAL_OUT_EVENT = PHYSICAL_LAYER*10+1 , PHYSICAL_IN_EVENT = PHYSICAL_LAYER*10+2 , MAC_OUT_EVENT = MAC_LAYER*10+1 ,
  MAC_IN_EVENT = MAC_LAYER*10+2 , NETWORK_OUT_EVENT = NETWORK_LAYER*10+1 , NETWORK_IN_EVENT = NETWORK_LAYER*10+2 , TRANSPORT_OUT_EVENT = TRANSPORT_LAYER*10+1 ,
  TRANSPORT_IN_EVENT = TRANSPORT_LAYER*10+2 , APPLICATION_OUT_EVENT = APPLICATION_LAYER*10+1 , APPLICATION_IN_EVENT = APPLICATION_LAYER*10+2 , TIMER_EVENT = 1 ,
  INTERNAL_NETSIM_EVENT =2
}
 
enum  enum_common_subevent {
  SUBEVENT_GETLINKQUALITY = TIMER_EVENT*100+1 , SUBEVENT_JOIN_MULTICAST_GROUP , SUBEVENT_LINKUP , SUBEVENT_LINKDOWN ,
  SUBEVENT_HWIRECV , SUBEVENT_HWI_CLEANUP , SUBEVENT_PAUSESIMULATION , SUBEVENT_EXECUTECOMMAND ,
  SUBEVNET_LAST
}
 
enum  enum_AppProtocol {
  APP_PROTOCOL_NULL = 0 , APP_PROTOCOL_RIP = APPLICATION_LAYER*100+1 , APP_PROTOCOL_OSPF , APP_PROTOCOL_OPENFLOW ,
  APP_PROTOCOL_RTP , APP_PROTOCOL_CBR =PROTOCOL_APPLICATION , APP_PROTOCOL_VOICE =PROTOCOL_APPLICATION , APP_PROTOCOL_FTP =PROTOCOL_APPLICATION ,
  APP_PROTOCOL_HTTP =PROTOCOL_APPLICATION , APP_PROTOCOL_BSM =PROTOCOL_APPLICATION , APP_PROTOCOL_COAP =PROTOCOL_APPLICATION , APP_PROTOCOL_DATABASE =PROTOCOL_APPLICATION ,
  APP_PROTOCOL_CUSTOM =PROTOCOL_APPLICATION , APP_PROTOCOL_EMAIL =PROTOCOL_APPLICATION , APP_PROTOCOL_ERLANGCALL =PROTOCOL_APPLICATION , APP_PROTOCOL_VIDEO =PROTOCOL_APPLICATION ,
  APP_PROTOCOL_EMULATION =PROTOCOL_APPLICATION
}
 
enum  enum_TrxProtocol { TX_PROTOCOL_NULL = 0 , TX_PROTOCOL_TCP = TRANSPORT_LAYER*100+1 , TX_PROTOCOL_UDP , TX_PROTOCOL_WSMP }
 
enum  enum_NWProtocol {
  NW_PROTOCOL_IPV4 = NETWORK_LAYER*100+1 , NW_PROTOCOL_IPV6 , NW_PROTOCOL_ARP , NW_PROTOCOL_ICMP ,
  NW_PROTOCOL_IGMP , NW_PROTOCOL_DSR , NW_PROTOCOL_AODV , NW_PROTOCOL_ZRP ,
  NW_PROTOCOL_OLSR , NW_PROTOCOL_RPL
}
 
enum  enum_MACProtocol {
  MAC_PROTOCOL_NULL =0 , MAC_PROTOCOL_IEEE802_11 = MAC_LAYER*100+1 , MAC_PROTOCOL_IEEE802_15_4 , MAC_PROTOCOL_IEEE802_22 ,
  MAC_PROTOCOL_IEEE802_3 , MAC_PROTOCOL_P2P , MAC_PROTOCOL_CDMA , MAC_PROTOCOL_GSM ,
  MAC_PROTOCOL_LTE , MAC_PROTOCOL_LTE_NR , MAC_PROTOCOL_TDMA , MAC_PROTOCOL_DTDMA ,
  MAC_PROTOCOL_ALOHA , MAC_PROTOCOL_CSMACD , MAC_PROTOCOL_TOKEN_RING_BUS , MAC_PROTOCOL_IEEE1609 ,
  MAC_PROTOCOL_UWAN , MAC_PROTOCOL_SATELLITE
}
 
enum  enum_PhyMedium { PHY_MEDIUM_NULL = 0 , PHY_MEDIUM_WIRELESS = 1 , PHY_MEDIUM_WIRED = 2 }
 
enum  enum_InterfaceType {
  INTERFACE_NULL =0 , INTERFACE_LAN_802_3 =1 , INTERFACE_LAN_802_11 , INTERFACE_LAN_802_15_4 ,
  INTERFACE_LAN_802_22 , INTERFACE_WAN_ROUTER , INTERFACE_VIRTUAL , INTERFACE_GSM ,
  INTERFACE_CDMA , INTERFACE_LTE , INTERFACE_LTE_NR , INTERFACE_5G = INTERFACE_LTE_NR ,
  INTERFACE_ALOHA , INTERFACE_TOKEN_RING , INTERFACE_TOKEN_BUS , INTERFACE_IEEE1609 ,
  INTERFACE_P2P
}
 
enum  enum_DeviceType {
  Not_Device =0 , NODE =1 , CPE =1 , MOBILESTATION =1 ,
  UE =1 , SENSOR =1 , RSU =1 , SATELLITE_UT =1 ,
  SWITCH =2 , SATELLITE = 2 , HUB =3 , CONCENTRATOR =3 ,
  BASESTATION =4 , eNB =4 , gNB =4 , ACCESSPOINT =5 ,
  ROUTER =6 , MME =6 , HNB_GATEWAY =6 , EPC =6 ,
  SINKNODE = 6 , PANCOORDINATOR = 6 , SATELLITE_GW =6 , _5G_CORE_AMF = 7 ,
  _5G_CORE_SMF = 7 , _5G_CORE_UPF = 7 , MSC =8 , RELAY = 9
}
 
enum  enum_LinkType { LinkType_NULL =0 , LinkType_P2P =1 , LinkType_P2MP =2 , LinkType_MP2MP =3 }
 
enum  enum_LinkState { LINKSTATE_UP , LINKSTATE_DOWN }
 
enum  enum_LinkMode { LinkMode_NULL =0 , LinkMode_HalfDuplex =1 , LinkMode_FullDuplex =2 }
 
enum  enum_SimulationEndType { SimEndType_TIME =1 }
 
enum  enum_SchedulingType {
  SCHEDULING_NONE =0 , SCHEDULING_FIFO =1 , SCHEDULING_PRIORITY =2 , SCHEDULING_ROUNDROBIN =3 ,
  SCHEDULING_WFQ =4 , SCHEDULING_EDF =5 , SCHEDULING_CLASSBASED =6
}
 
enum  enum_QueuingTechnique { QUEUING_NULL , QUEUING_DROPTAIL , QUEUING_RED , QUEUING_WRED }
 
enum  enum_TransmissionType { UNICAST , BROADCAST , MULTICAST }
 
enum  emum_wireshark_option { wireshark_disable =0 , wireshark_online , wireshark_offline }
 
enum  enum_NodeAction { NOT_CONNECTED , CONNECTED , JOIN , LEAVE }
 
enum  enum_refEllipsoid { REFERENCEELLIPSOID_SPHERE , REFERENCEELLIPSOID_WGS84 , REFERENCEELLIPSOID_GRS80 , REFERENCEELLIPSOID_COUNT }
 
enum  enum_corrType { CORRTYPE_CARTESIAN , CORRTYPE_MAP , CORRTYPE_GEO }
 
enum  xmlDataType {
  _INT = 1 , _DOUBLE , _FLOAT , _STRING ,
  _BOOL , _CHAR , _SHORT , _UINT ,
  _UCHAR , _USHORT , _UINT8 , _UINT16 ,
  _RATIO , _SPECIALBOOL
}
 

Functions

void netsim_set_simstate (SIMSTATE state)
 
SIMSTATE netsim_get_simstate ()
 
void fn_NetSim_Coordinate_ConvertMapToCartesian (double lat, double lon, NetSim_COORDINATES *pos)
 
void fn_NetSim_Coordinate_ConvertCartesianToMap (NetSim_COORDINATES *pos)
 
void fn_NetSim_Coordinate_ConvertGeoToCartesian (double lat, double lon, double altitude, char *strRefEllipsoid, NetSim_COORDINATES *pos)
 
void fn_NetSim_Coordinate_ConvertCartesianToGeo (NetSim_COORDINATES *pos, GEOCORR_REFERENCEELLIPSOID refEllipsoid)
 
ptrSOCKETINTERFACE fn_NetSim_Socket_CreateNewSocket (NETSIM_ID deviceId, int appProtocol, TRANSPORT_LAYER_PROTOCOL trxProtocol, UINT16 localPort, UINT16 remotePort)
 
ptrSOCKETINTERFACE fn_NetSim_Socket_GetSocketInterface (NETSIM_ID deviceId, APPLICATION_LAYER_PROTOCOL appProtocol, TRANSPORT_LAYER_PROTOCOL trxProtocol, UINT16 localPort, UINT16 remotePort)
 
void fn_NetSim_Socket_PassPacketToInterface (NETSIM_ID deviceId, NetSim_PACKET *packet, ptrSOCKETINTERFACE socketInterface)
 
void * fn_NetSim_Stack_RegisterNewApplicationProtocol (NETSIM_ID deviceId, UINT appProtocol)
 
void * fn_NetSim_Stack_GetAppProtocolData (NETSIM_ID deviceId, UINT appProtocol)
 
void fn_NetSim_Stack_SetAppProtocolData (NETSIM_ID deviceId, UINT appProtocol, void *data)
 
bool fn_NetSim_Socket_GetBufferStatus (ptrSOCKETINTERFACE s)
 
NetSim_PACKETfn_NetSim_Socket_GetPacketFromInterface (ptrSOCKETINTERFACE s, int moveFlag)
 
NETSIM_ID fn_NetSim_Stack_GetInterfaceIdByName (NETSIM_ID nDeviceId, const char *szInterfaceName)
 
int fnDeleteEvent (unsigned long long int nEventId)
 
void set_thread_safe_kernel (bool status)
 
bool isHost (NETSIM_ID d)
 
bool isRouter (NETSIM_ID d)
 
bool isL3Device (NETSIM_ID d)
 
double fn_NetSim_Utilities_CalculateDistance (NetSim_COORDINATES *coordinate1, NetSim_COORDINATES *coordinates2)
 
double fn_NetSim_Utilities_GenerateRandomNo (unsigned long *uSeed, unsigned long *uSeed1)
 
int fn_NetSim_Utilities_ConcatString (int num, char *arg1, const char *arg2,...)
 
int fn_NetSim_Utils_Distribution (int nDistributionType, double *fDistOut, unsigned long *uSeed, unsigned long *uSeed1, double fFirstArg, double fSecondArg)
 
NETSIM_ID fn_NetSim_Stack_GetDeviceId_asName (const char *name)
 
NETSIM_ID fn_NetSim_Stack_GetDeviceId_asIP (NETSIM_IPAddress ip, NETSIM_ID *nInterfaceId)
 
NETSIM_ID fn_NetSim_Stack_GetDeviceId_asMac (PNETSIM_MACADDRESS mac, NETSIM_ID *nInterfaceId)
 
NETSIM_ID fn_NetSim_Stack_GetWirelessInterface (NETSIM_ID nLinkId, NETSIM_ID nDevId)
 
NETSIM_ID fn_NetSim_Stack_GetInterfaceIdFromIP (NETSIM_ID nDeviceId, NETSIM_IPAddress ip)
 
NETSIM_IDfn_NetSim_Stack_GetInterfaceIdbyMacProtocol (NETSIM_ID devId, MAC_LAYER_PROTOCOL protocol, unsigned int *count)
 
NETSIM_IDfn_NetSim_Stack_GetInterfaceIdbyInterfaceType (NETSIM_ID devId, INTERFACE_TYPE ifType, unsigned int *count)
 
NETSIM_ID fn_NetSim_Stack_GetConnectedDevice (NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID *nConnectedDevId, NETSIM_ID *nConnectedInterfaceId)
 
NETSIM_ID fn_NetSim_Stack_GetFirstConnectedDevice (NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID *nConnectedDevId, NETSIM_ID *nConnectedInterfaceId)
 
NETSIM_ID fn_NetSim_Stack_GetConnectedInterface (NETSIM_ID devId, NETSIM_ID ifid, NETSIM_ID conId)
 
NETSIM_ID fn_NetSim_Stack_GetConnectedInterface_Both (NETSIM_ID d, NETSIM_ID r, NETSIM_ID *din, NETSIM_ID *rin)
 
NetSim_LINKSfn_NetSim_Stack_RemoveDeviceFromlink (NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID nLinkId)
 
NetSim_LINKSfn_NetSim_Stack_AddDeviceTolink (NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID nLinkId)
 
MAC_LAYER_PROTOCOL fn_NetSim_Stack_GetMacProtocol (NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
 
NETWORK_LAYER_PROTOCOL fn_NetSim_Stack_GetNWProtocol (NETSIM_ID nDeviceId)
 
NETWORK_LAYER_PROTOCOL fn_NetSim_Stack_GetNWRoutingProtocol (NETSIM_ID nDeviceId)
 
char * fn_NetSim_xmlConfig_GetVal (void *xmlNetSimNode, const char *szName, int flag)
 
char * fn_NetSim_xmlConfigPacketTraceField (const void *xmlNetSimNode, const char *name)
 
int NetSimxmlError (const char *msg, char *val, const void *xmlNetSimNode)
 
void * fn_NetSim_xmlGetChildElement (void *xmlNetSimNode, const char *childName, int count)
 
void * fn_NetSim_xmlGetNextChildElement (void *xmlNetSimNode, void *prevChild)
 
void fn_NetSim_xmlIterateOverChildElement (void *xmlNetSimNode, const char *childName, int(*fun)(void *childNode, int argc, char *argv[]), int argc, char *argv[])
 
LINK_TYPE fn_NetSim_Config_GetLinkType (const char *value)
 
SUPPRESSION_MODEL fn_NetSim_Config_GetSuppressionModel (char *model)
 
SERVICE_TYPE fn_NetSim_Config_GetServiceType (char *type)
 
netsimDEVICE_TYPE fn_NetSim_Config_GetDeviceType (const char *type)
 
DISTRIBUTION fn_NetSim_Config_GetDistribution (const char *szDistribution)
 
INTERFACE_TYPE fn_NetSim_Config_GetInterfaceType (const char *value)
 
int fn_NetSim_Config_GetProtocol (const char *value)
 
PROPAGATION_MODEL fn_NetSim_Config_GetPropagationModel (char *model)
 
PROP_MEDIUM fn_NetSim_Config_GetPropagationMedium (char *med)
 
SHADOW_MODEL fn_NetSim_Config_GetShadowModel (char *model)
 
FADING_MODEL fn_NetSim_Config_GetFadingModel (char *model)
 
PATHLOSS_MODEL fn_NetSim_Config_GetPathLossModel (char *model)
 
NETSIM_IPAddress fn_NetSim_Stack_GetIPAddressByName (const NETSIM_Name szDeviceName, NETSIM_ID nInterfaceId)
 
PNETSIM_MACADDRESS fn_NetSim_Stack_GetMacAddressFromIP (const NETSIM_IPAddress szIPAddress)
 
NETSIM_IPAddress fn_NetSim_Stack_GetIPAddressFromMac (const PNETSIM_MACADDRESS szMacAddress)
 
NETSIM_IPAddress fn_NetSim_Stack_GetFirstIPAddressAsId (NETSIM_ID nDeviceId, unsigned int type)
 
NETSIM_IPAddress fn_NetSim_Stack_GetIPAddressAsId (NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
 
NETSIM_IPAddress fn_NetSim_Stack_GetFirstIPAddressByName (const NETSIM_Name szDeviceName)
 
NETSIM_ID fn_NetSim_Stack_GetConfigIdOfLinkById (NETSIM_ID nLinkId)
 
NETSIM_ID fn_NetSim_Stack_GetLinkIdByConfigId (NETSIM_ID nLinkId)
 
NETSIM_ID fn_NetSim_Stack_GetConfigIdOfDeviceById (NETSIM_ID nDeviceId)
 
NETSIM_ID fn_NetSim_GetDeviceIdByConfigId (NETSIM_ID id)
 
bool isIPForSameDevice (NETSIM_IPAddress ip, NETSIM_ID d)
 
NETSIM_IPAddress get_ip_from_same_subnet (NETSIM_ID d, NETSIM_IPAddress ip)
 
NETSIM_ID fn_NetSim_Stack_GetApplicationIdByConfigId (NETSIM_ID id)
 
NETSIM_ID fn_NetSim_GetInterfaceIdByConfigId (NETSIM_ID devId, NETSIM_ID id)
 
PHYSICAL_LAYER_MEDIUM fn_NetSim_Cofig_GetConnectionMedium (char *medium)
 
int fn_NetSim_xmlConfigureProtocolProperty (void *xmlChildNode, NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, LAYER_TYPE nLayerType, UINT nProtocolId)
 
bool fn_NetSim_Stack_isProtocolConfigured (NETSIM_ID d, LAYER_TYPE layer, UINT protocol)
 
void fn_NetSim_Metrics_Add_new (const NetSim_PACKET *pPacket, int line, char *file, char *function)
 
double fn_NetSim_Stack_GetMSS (const NetSim_PACKET *pPacket)
 
int fn_NetSim_Stack_RegisterICMPCallback (int(*fnCallBack)(NetSim_PACKET *errPacket, NETSIM_ID nDeviceId, unsigned int nICMPErr))
 
int fn_NetSim_Stack_CallICMPErrorFun (NetSim_PACKET *packet, NETSIM_ID nDeviceId, unsigned int nICMPErr)
 
double fn_NetSim_stack_get_link_quality (NETSIM_ID trx, NETSIM_ID tri, NETSIM_ID rx, NETSIM_ID ri)
 
NETSIM_IPAddress DNS_QUERY (NETSIM_ID nDeviceId, NETSIM_ID id)
 
int fnMobilityRegisterCallBackFunction (_fnMobilityCallBack fnCallBack)
 
int fnNodeJoinRegisterCallBackFunction (_fnNodeJoinCallBack fnCallBack)
 
int GetXmlVal (void *var, const char *name, void *xmlNode, int flag, XMLDATATYPE type)
 
double fn_NetSim_Config_read_Frequency (void *xmlNetSimNode, const char *name, double defaultval, const char *returnUnit)
 
double fn_NetSim_Config_read_dataRate (void *xmlNetSimNode, const char *name, double defaultDataRate, const char *returnUnit)
 
double fn_NetSim_Config_read_dataLen (void *xmlNetSimNode, const char *name, double defaultDataLen, const char *returnUnit)
 
double fn_NetSim_Config_read_txPower (void *xmlNetSimNode, const char *name, double defaultTxPower, const char *returnUnit)
 
double fn_NetSim_Config_read_time (void *xmlNetSimNode, const char *name, double defaultTime, const char *returnUnit)
 
int fn_NetSim_Config_ConvertStrToEnum (void *xmlNode, const char *attributeName, const char **enumstr, const char *enumName, int length, bool isErrorMsg)
 
PNETSIM_MACADDRESS STR_TO_MAC (char *mac)
 
char * MAC_TO_STR (PNETSIM_MACADDRESS mac)
 
PNETSIM_MACADDRESS MAC_COPY (PNETSIM_MACADDRESS mac)
 
int MAC_COMPARE (PNETSIM_MACADDRESS mac1, PNETSIM_MACADDRESS mac2)
 
void MAC_FREE (PNETSIM_MACADDRESS mac)
 
void MAC_FREE_ALL ()
 
PNETSIM_MACADDRESS multicastIP_to_Mac (NETSIM_IPAddress multicastIP)
 
bool isBroadcastMAC (PNETSIM_MACADDRESS mac)
 
bool isMulticastMAC (PNETSIM_MACADDRESS mac)
 
void sim_time_to_string (double time, char *strTime)
 
void set_emulation (bool isCustom, int(*load_emulation)(void *emuInterface))
 
void register_interface_state_change (NETSIM_ID d, NETSIM_ID in, fun foo)
 
void notify_interface_up (NETSIM_ID d, NETSIM_ID in)
 
void notify_interface_down (NETSIM_ID d, NETSIM_ID in)
 
int fn_NetSim_Link_RegisterLinkFailureCallback (NETSIM_ID linkId, int(*fnLinkCallBack)(NETSIM_ID, LINK_STATE))
 
bool isFastEmulation ()
 
NETSIM_ID fn_NetSim_Stack_CreateVirtualInterface (NETSIM_ID deviceId, NETSIM_ID parentInterfaceId, char *virtualInterfaceName, bool isNwChanged, bool isMacChanged, bool isPhyChanged)
 
NETSIM_ID fn_NetSim_Stack_FindVirtualInterface (NETSIM_ID d, NETSIM_ID parentIf, char *name)
 
bool isVirtualInterface (NETSIM_ID d, NETSIM_ID in)
 
void netsim_pause_progress ()
 
void netsim_resume_progress ()
 
UINT64 start_timer (NETSIM_ID d, NETSIM_ID in, UINT eventId, double time, void *data)
 
void cancel_timer (UINT64 eventId)
 

Variables

EXPORTED bool isSimulationContinued
 
static char subeventName [SUBEVNET_LAST][100]
 
EXPORTED PNETSIM_MACADDRESS BROADCAST_MAC
 
EXPORTED struct stru_NetSim_NetworkNETWORK
 
EXPORTED struct stru_NetSim_EventDetailspstruEventDetails
 
EXPORTED double ldEventTime
 
EXPORTED EVENT_TYPE nEventType
 
EXPORTED char * pszAppPath
 
EXPORTED char * pszIOPath
 
EXPORTED char * pszIOLogPath
 
EXPORTED NETSIM_VERSIONTYPE nVersionType
 
EXPORTED int nDbgFlag
 
EXPORTED int wireshark_flag
 
EXPORTED fndns_query fnDNS
 

Macro Definition Documentation

◆ ConfigReadEnum

#define ConfigReadEnum (   xmlNode,
  attriName,
  enumName,
  isErrorMsg 
)    fn_NetSim_Config_ConvertStrToEnum(xmlNode,attriName,(const char**)str ## enumName, #enumName, sizeof(str ## enumName)/sizeof(str ## enumName ## [0]), isErrorMsg)

Definition at line 1110 of file Stack.h.

◆ DEFAULT_MAC_FRAGMENT_SIZE

#define DEFAULT_MAC_FRAGMENT_SIZE   1500

Definition at line 1001 of file Stack.h.

◆ DEFAULT_NW_LAYER_SIZE

#define DEFAULT_NW_LAYER_SIZE   1480

Definition at line 1003 of file Stack.h.

◆ DEFAULT_TRX_MSS

#define DEFAULT_TRX_MSS   1472

Definition at line 1002 of file Stack.h.

◆ DegreesToRadians

#define DegreesToRadians (   degree)    ((degree) * (M_PI / 180.0))

Definition at line 398 of file Stack.h.

◆ DEVICE

#define DEVICE (   DeviceId)    NETWORK->ppstruDeviceList[DeviceId-1]

Definition at line 769 of file Stack.h.

◆ DEVICE_ACCESSBUFFER

#define DEVICE_ACCESSBUFFER (   DeviceId,
  InterfaceId 
)    DEVICE_MAC_NW_INTERFACE(DeviceId,InterfaceId)->pstruAccessBuffer

Definition at line 794 of file Stack.h.

◆ DEVICE_APPINFO

#define DEVICE_APPINFO (   DeviceId)    DEVICE_APPLAYER(DeviceId)->pstruApplicationInfo

Definition at line 813 of file Stack.h.

◆ DEVICE_APPLAYER

#define DEVICE_APPLAYER (   DeviceId)    DEVICE(DeviceId)->pstruApplicationLayer

Definition at line 782 of file Stack.h.

◆ DEVICE_APPVAR

#define DEVICE_APPVAR (   DeviceId,
  protocolId 
)    (fn_NetSim_Stack_GetAppProtocolData(DeviceId,protocolId))

Definition at line 783 of file Stack.h.

◆ DEVICE_CONFIGID

#define DEVICE_CONFIGID (   DeviceId)    DEVICE(DeviceId)->nConfigDeviceId

Definition at line 779 of file Stack.h.

◆ DEVICE_DISTANCE

#define DEVICE_DISTANCE (   d1,
  d2 
)    (fn_NetSim_Utilities_CalculateDistance(DEVICE_POSITION(d1), DEVICE_POSITION(d2)))

Definition at line 814 of file Stack.h.

◆ DEVICE_FIRST_PUBLICIP

#define DEVICE_FIRST_PUBLICIP (   DeviceId)    DEVICE_PUBLICIP(DeviceId,1)

Definition at line 810 of file Stack.h.

◆ DEVICE_HWADDRESS

#define DEVICE_HWADDRESS (   DeviceId,
  InterfaceId 
)    DEVICE_MACLAYER(DeviceId,InterfaceId)->szMacAddress

Definition at line 799 of file Stack.h.

◆ DEVICE_INTERFACE

#define DEVICE_INTERFACE (   DeviceId,
  InterfaceId 
)    DEVICE(DeviceId)->ppstruInterfaceList[InterfaceId-1]

Definition at line 780 of file Stack.h.

◆ DEVICE_INTERFACE_CONFIGID

#define DEVICE_INTERFACE_CONFIGID (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->nConfigInterfaceId

Definition at line 781 of file Stack.h.

◆ DEVICE_LINK

#define DEVICE_LINK (   DeviceId,
  InterfaceId 
)    (DEVICE_PHYLAYER(DeviceId,InterfaceId)->pstruNetSimLinks)

Definition at line 789 of file Stack.h.

◆ DEVICE_MAC_NW_INTERFACE

#define DEVICE_MAC_NW_INTERFACE (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->pstruAccessInterface

Definition at line 793 of file Stack.h.

◆ DEVICE_MACLAYER

#define DEVICE_MACLAYER (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->pstruMACLayer

Definition at line 786 of file Stack.h.

◆ DEVICE_MACPROTOCOL

#define DEVICE_MACPROTOCOL (   DeviceId,
  InterfaceId 
)    DEVICE_MACLAYER(DeviceId,InterfaceId)->nMacProtocolId

Definition at line 787 of file Stack.h.

◆ DEVICE_MACVAR

#define DEVICE_MACVAR (   DeviceId,
  InterfaceId 
)    DEVICE_MACLAYER(DeviceId,InterfaceId)->MacVar

Definition at line 798 of file Stack.h.

◆ DEVICE_MOBILITY

#define DEVICE_MOBILITY (   DeviceId)    DEVICE(DeviceId)->pstruDeviceMobility

Definition at line 791 of file Stack.h.

◆ DEVICE_MYACCESSBUFFER

#define DEVICE_MYACCESSBUFFER ( )    DEVICE_ACCESSBUFFER(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)

Definition at line 795 of file Stack.h.

◆ DEVICE_MYIP

#define DEVICE_MYIP ( )    DEVICE_NWADDRESS(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)

Definition at line 806 of file Stack.h.

◆ DEVICE_MYMASK

#define DEVICE_MYMASK ( )    DEVICE_SUBNETMASK(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)

Definition at line 808 of file Stack.h.

◆ DEVICE_NAME

#define DEVICE_NAME (   DeviceId)    DEVICE(DeviceId)->szDeviceName

Definition at line 774 of file Stack.h.

◆ DEVICE_NWADDRESS

#define DEVICE_NWADDRESS (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->szAddress

Definition at line 805 of file Stack.h.

◆ DEVICE_NWLAYER

#define DEVICE_NWLAYER (   DeviceId)    DEVICE(DeviceId)->pstruNetworkLayer

Definition at line 785 of file Stack.h.

◆ DEVICE_NWPROTOCOL

#define DEVICE_NWPROTOCOL (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->nProtocolId

Definition at line 804 of file Stack.h.

◆ DEVICE_NWROUTINGVAR

#define DEVICE_NWROUTINGVAR (   DeviceId)    DEVICE_NWLAYER(DeviceId)->RoutingVar

Definition at line 800 of file Stack.h.

◆ DEVICE_PHYLAYER

#define DEVICE_PHYLAYER (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->pstruPhysicalLayer

Definition at line 788 of file Stack.h.

◆ DEVICE_PHYMEDIUM

#define DEVICE_PHYMEDIUM (   DeviceId,
  InterfaceId 
)    DEVICE_PHYLAYER(DeviceId,InterfaceId)->nPhyMedium

Definition at line 796 of file Stack.h.

◆ DEVICE_PHYVAR

#define DEVICE_PHYVAR (   DeviceId,
  InterfaceId 
)    DEVICE_PHYLAYER(DeviceId,InterfaceId)->phyVar

Definition at line 797 of file Stack.h.

◆ DEVICE_POSITION

#define DEVICE_POSITION (   DeviceId)    DEVICE(DeviceId)->pstruDevicePosition

Definition at line 790 of file Stack.h.

◆ DEVICE_PUBLICIP

#define DEVICE_PUBLICIP (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->publicIP

Definition at line 809 of file Stack.h.

◆ DEVICE_SEED

#define DEVICE_SEED (   DeviceId)    DEVICE_SEED0(DeviceId),DEVICE_SEED1(DeviceId)

Definition at line 778 of file Stack.h.

◆ DEVICE_SEED0

#define DEVICE_SEED0 (   DeviceId)    &(DEVICE(DeviceId)->ulSeed[0])

Definition at line 776 of file Stack.h.

◆ DEVICE_SEED1

#define DEVICE_SEED1 (   DeviceId)    &(DEVICE(DeviceId)->ulSeed[1])

Definition at line 777 of file Stack.h.

◆ DEVICE_SOCKETINTERFACE

#define DEVICE_SOCKETINTERFACE (   DeviceId)    DEVICE(DeviceId)->pstruSocketInterface

Definition at line 792 of file Stack.h.

◆ DEVICE_SUBNETMASK

#define DEVICE_SUBNETMASK (   DeviceId,
  InterfaceId 
)    DEVICE_INTERFACE(DeviceId,InterfaceId)->szSubnetMask

Definition at line 807 of file Stack.h.

◆ DEVICE_TCPVAR

#define DEVICE_TCPVAR (   DeviceId)    DEVICE_TRXLayer(DeviceId)->TCPProtocol

Definition at line 811 of file Stack.h.

◆ DEVICE_TRXLayer

#define DEVICE_TRXLayer (   DeviceId)    DEVICE(DeviceId)->pstruTransportLayer

Definition at line 784 of file Stack.h.

◆ DEVICE_TYPE

#define DEVICE_TYPE (   DeviceId)    DEVICE(DeviceId)->nDeviceType

Definition at line 773 of file Stack.h.

◆ DEVICE_UDPVAR

#define DEVICE_UDPVAR (   DeviceId)    DEVICE_TRXLayer(DeviceId)->UDPProtocol

Definition at line 812 of file Stack.h.

◆ DEVICE_VAR

#define DEVICE_VAR (   DeviceId)    DEVICE(DeviceId)->deviceVar

Definition at line 775 of file Stack.h.

◆ EVENT_APPID

#define EVENT_APPID (   EventDetails)    (EventDetails)->nApplicationId

Definition at line 823 of file Stack.h.

◆ EVENT_DEVICEID

#define EVENT_DEVICEID (   EventDetails)    (EventDetails)->nDeviceId

Definition at line 821 of file Stack.h.

◆ EVENT_DEVICETYPE

#define EVENT_DEVICETYPE (   EventDetails)    (EventDetails)->nDeviceType

Definition at line 820 of file Stack.h.

◆ EVENT_INTERFACEID

#define EVENT_INTERFACEID (   EventDetails)    (EventDetails)->nInterfaceId

Definition at line 822 of file Stack.h.

◆ EVENT_OTHERDETAILS

#define EVENT_OTHERDETAILS (   EventDetails)    (EventDetails)->szOtherDetails

Definition at line 828 of file Stack.h.

◆ EVENT_PACKET

#define EVENT_PACKET (   EventDetails)    (EventDetails)->pPacket

Definition at line 825 of file Stack.h.

◆ EVENT_PACKETID

#define EVENT_PACKETID (   EventDetails)    (EventDetails)->nPacketId

Definition at line 826 of file Stack.h.

◆ EVENT_PACKETSIZE

#define EVENT_PACKETSIZE (   EventDetails)    (EventDetails)->dPacketSize

Definition at line 824 of file Stack.h.

◆ EVENT_SUBEVENTTYPE

#define EVENT_SUBEVENTTYPE (   EventDetails)    (EventDetails)->nSubEventType

Definition at line 827 of file Stack.h.

◆ EVENT_TIME

#define EVENT_TIME (   EventDetails)    (EventDetails)->dEventTime

Definition at line 819 of file Stack.h.

◆ EVENT_TYPE

#define EVENT_TYPE (   EventDetails)    (EventDetails)->nEventType

Definition at line 818 of file Stack.h.

◆ EXPORTED

#define EXPORTED   extern

Definition at line 46 of file Stack.h.

◆ fn_NetSim_Metrics_Add

#define fn_NetSim_Metrics_Add (   packet)    fn_NetSim_Metrics_Add_new(packet,__LINE__,__FILE__,__FUNCTION__)

Definition at line 998 of file Stack.h.

◆ fn_NetSim_xmlGetFirstChildElement

#define fn_NetSim_xmlGetFirstChildElement (   xmlNetSimNode,
  childName 
)    fn_NetSim_xmlGetChildElement(xmlNetSimNode,childName,0)

Definition at line 933 of file Stack.h.

◆ getXmlVar

#define getXmlVar (   var,
  name,
  xmlNode,
  flag,
  type,
  protocol 
)    if(!GetXmlVal(var,#name,xmlNode,flag,type)) *(var)= protocol##_##name##_DEFAULT

Definition at line 1046 of file Stack.h.

◆ HOUR

#define HOUR   (60.0*MINUTE)

Definition at line 62 of file Stack.h.

◆ INFINITY

#define INFINITY   (0xFFFFFFFF)

Definition at line 66 of file Stack.h.

◆ IP_TABLE_GET

#define IP_TABLE_GET (   DeviceId)    ((ptrIP_ROUTINGTABLE)(IP_WRAPPER_GET(DeviceId)->table))

Definition at line 802 of file Stack.h.

◆ IP_WRAPPER_GET

#define IP_WRAPPER_GET (   DeviceId)    ((ptrIP_WRAPPER)(DEVICE_NWLAYER(DeviceId)->ipWrapper))

Definition at line 801 of file Stack.h.

◆ JOIN_PROFILE_ADD

#define JOIN_PROFILE_ADD (   lprofile,
  profile 
)    LIST_ADD_LAST((void**)lprofile,profile)

Definition at line 605 of file Stack.h.

◆ JOIN_PROFILE_ALLOC

#define JOIN_PROFILE_ALLOC ( )    (PNODE_JOIN_PROFILE)list_alloc(sizeof(NODE_JOIN_PROFILE),offsetof(NODE_JOIN_PROFILE,ele))

Definition at line 603 of file Stack.h.

◆ JOIN_PROFILE_NEXT

#define JOIN_PROFILE_NEXT (   profile)    profile=(PNODE_JOIN_PROFILE)LIST_NEXT(profile)

Definition at line 604 of file Stack.h.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 396 of file Stack.h.

◆ MICROSECOND

#define MICROSECOND   (1.0)

Definition at line 57 of file Stack.h.

◆ MILLISECOND

#define MILLISECOND   (1000.0*MICROSECOND)

Definition at line 59 of file Stack.h.

◆ MINUTE

#define MINUTE   (60.0*SECOND)

Definition at line 61 of file Stack.h.

◆ NANOSECOND

#define NANOSECOND   (MICROSECOND/1000.0)

Definition at line 58 of file Stack.h.

◆ NEGATIVE_INFINITY

#define NEGATIVE_INFINITY   (-1.0*INFINITY)

Definition at line 69 of file Stack.h.

◆ NETSIM_RAND

#define NETSIM_RAND ( )    fn_NetSim_Utilities_GenerateRandomNo(DEVICE_SEED(1))

Definition at line 859 of file Stack.h.

◆ NETSIM_RAND_01

#define NETSIM_RAND_01 ( )    (NETSIM_RAND()/NETSIM_RAND_MAX)

Definition at line 860 of file Stack.h.

◆ NETSIM_RAND_MAX

#define NETSIM_RAND_MAX   (double)10000000000

Definition at line 849 of file Stack.h.

◆ NETSIM_RAND_RN

#define NETSIM_RAND_RN (   max,
  min 
)    (min+NETSIM_RAND_01()*(max-min))

Definition at line 861 of file Stack.h.

◆ PIP_TABLE_GET

#define PIP_TABLE_GET (   DeviceId)    (&IP_TABLE_GET(DeviceId))

Definition at line 803 of file Stack.h.

◆ PROTOCOL_APPLICATION

#define PROTOCOL_APPLICATION   4

Definition at line 143 of file Stack.h.

◆ PROTOCOL_CLI

#define PROTOCOL_CLI   7

Definition at line 146 of file Stack.h.

◆ PROTOCOL_HWI

#define PROTOCOL_HWI   6

Definition at line 145 of file Stack.h.

◆ PROTOCOL_LINK

#define PROTOCOL_LINK   5

Definition at line 144 of file Stack.h.

◆ PROTOCOL_METRICS

#define PROTOCOL_METRICS   2

Internal module.

Definition at line 141 of file Stack.h.

◆ PROTOCOL_MOBILITY

#define PROTOCOL_MOBILITY   3

Definition at line 142 of file Stack.h.

◆ RadiansToDegrees

#define RadiansToDegrees (   radian)    ((radian) * (180.0 / M_PI))

Definition at line 399 of file Stack.h.

◆ SECOND

#define SECOND   (1000.0*MILLISECOND)

Definition at line 60 of file Stack.h.

◆ SEED_COUNT

#define SEED_COUNT   2

Definition at line 705 of file Stack.h.

Typedef Documentation

◆ _fnMobilityCallBack

typedef int(* _fnMobilityCallBack) (NETSIM_ID nDeviceId)

Definition at line 1020 of file Stack.h.

◆ _fnNodeJoinCallBack

typedef int(* _fnNodeJoinCallBack) (NETSIM_ID nDeviceId, double time, NODE_ACTION)

Definition at line 1024 of file Stack.h.

◆ COMMON_SUBEVENT

◆ fn_NetSim_Utilities_AddEvent

typedef unsigned long long int(* fn_NetSim_Utilities_AddEvent) (struct stru_NetSim_EventDetails *, int, const char *)

Definition at line 832 of file Stack.h.

◆ fndns_query

typedef NETSIM_IPAddress(* fndns_query) (NETSIM_ID nDeviceId, NETSIM_ID id)

Definition at line 1015 of file Stack.h.

◆ fun

typedef int(* fun) (NETSIM_ID, NETSIM_ID, bool)

Definition at line 1131 of file Stack.h.

◆ GEOCORR_REFERENCEELLIPSOID

◆ IP_WRAPPER

typedef struct stru_ip_wrapper IP_WRAPPER

◆ NETSIM_COORDINATETYPE

◆ NETSIM_MACADDRESS

◆ NODE_ACTION

◆ NODE_JOIN_PROFILE

◆ PNETSIM_MACADDRESS

◆ PNODE_JOIN_PROFILE

◆ ptrIP_WRAPPER

typedef struct stru_ip_wrapper * ptrIP_WRAPPER

◆ ptrSOCKETINTERFACE

◆ QUEUINGTECHNIQUE

◆ SIMSTATE

typedef enum enum_sim_state SIMSTATE

◆ SOCKETINTERFACE

◆ XMLDATATYPE

typedef enum xmlDataType XMLDATATYPE

Enumeration Type Documentation

◆ emum_wireshark_option

Enumerator
wireshark_disable 
wireshark_online 
wireshark_offline 

Definition at line 369 of file Stack.h.

◆ enum_AppProtocol

Enumerator
APP_PROTOCOL_NULL 
APP_PROTOCOL_RIP 
APP_PROTOCOL_OSPF 
APP_PROTOCOL_OPENFLOW 
APP_PROTOCOL_RTP 
APP_PROTOCOL_CBR 
APP_PROTOCOL_VOICE 
APP_PROTOCOL_FTP 
APP_PROTOCOL_HTTP 
APP_PROTOCOL_BSM 
APP_PROTOCOL_COAP 
APP_PROTOCOL_DATABASE 
APP_PROTOCOL_CUSTOM 
APP_PROTOCOL_EMAIL 
APP_PROTOCOL_ERLANGCALL 
APP_PROTOCOL_VIDEO 
APP_PROTOCOL_EMULATION 

Definition at line 149 of file Stack.h.

◆ enum_common_subevent

Enumerator
SUBEVENT_GETLINKQUALITY 
SUBEVENT_JOIN_MULTICAST_GROUP 
SUBEVENT_LINKUP 
SUBEVENT_LINKDOWN 
SUBEVENT_HWIRECV 
SUBEVENT_HWI_CLEANUP 
SUBEVENT_PAUSESIMULATION 
SUBEVENT_EXECUTECOMMAND 
SUBEVNET_LAST 

Definition at line 118 of file Stack.h.

◆ enum_corrType

Enumerator
CORRTYPE_CARTESIAN 
CORRTYPE_MAP 
CORRTYPE_GEO 

Definition at line 411 of file Stack.h.

◆ enum_DeviceType

Enumerator
Not_Device 
NODE 
CPE 
MOBILESTATION 
UE 
SENSOR 
RSU 
SATELLITE_UT 
SWITCH 
SATELLITE 
HUB 
CONCENTRATOR 
BASESTATION 
eNB 
gNB 
ACCESSPOINT 
ROUTER 
MME 
HNB_GATEWAY 
EPC 
SINKNODE 
PANCOORDINATOR 
SATELLITE_GW 
_5G_CORE_AMF 
_5G_CORE_SMF 
_5G_CORE_UPF 
MSC 
RELAY 

Definition at line 269 of file Stack.h.

◆ enum_EventType

Enumerator
END_EVENT 
PHYSICAL_OUT_EVENT 
PHYSICAL_IN_EVENT 
MAC_OUT_EVENT 
MAC_IN_EVENT 
NETWORK_OUT_EVENT 
NETWORK_IN_EVENT 
TRANSPORT_OUT_EVENT 
TRANSPORT_IN_EVENT 
APPLICATION_OUT_EVENT 
APPLICATION_IN_EVENT 
TIMER_EVENT 
INTERNAL_NETSIM_EVENT 

Definition at line 101 of file Stack.h.

◆ enum_Flag

enum enum_Flag
Enumerator
ZERO 
ONE 

Definition at line 74 of file Stack.h.

◆ enum_InterfaceType

Enumerator
INTERFACE_NULL 
INTERFACE_LAN_802_3 
INTERFACE_LAN_802_11 
INTERFACE_LAN_802_15_4 
INTERFACE_LAN_802_22 
INTERFACE_WAN_ROUTER 
INTERFACE_VIRTUAL 
INTERFACE_GSM 
INTERFACE_CDMA 
INTERFACE_LTE 
INTERFACE_LTE_NR 
INTERFACE_5G 
INTERFACE_ALOHA 
INTERFACE_TOKEN_RING 
INTERFACE_TOKEN_BUS 
INTERFACE_IEEE1609 
INTERFACE_P2P 

Definition at line 247 of file Stack.h.

◆ enum_LayerType

Enumerator
LAYER_NULL 
PHYSICAL_LAYER 
MAC_LAYER 
NETWORK_LAYER 
TRANSPORT_LAYER 
APPLICATION_LAYER 

Definition at line 91 of file Stack.h.

◆ enum_LinkMode

Enumerator
LinkMode_NULL 
LinkMode_HalfDuplex 
LinkMode_FullDuplex 

Definition at line 328 of file Stack.h.

◆ enum_LinkState

Enumerator
LINKSTATE_UP 
LINKSTATE_DOWN 

Definition at line 321 of file Stack.h.

◆ enum_LinkType

Enumerator
LinkType_NULL 
LinkType_P2P 
LinkType_P2MP 
LinkType_MP2MP 

Definition at line 312 of file Stack.h.

◆ enum_MACProtocol

Enumerator
MAC_PROTOCOL_NULL 
MAC_PROTOCOL_IEEE802_11 
MAC_PROTOCOL_IEEE802_15_4 
MAC_PROTOCOL_IEEE802_22 
MAC_PROTOCOL_IEEE802_3 
MAC_PROTOCOL_P2P 
MAC_PROTOCOL_CDMA 
MAC_PROTOCOL_GSM 
MAC_PROTOCOL_LTE 
MAC_PROTOCOL_LTE_NR 
MAC_PROTOCOL_TDMA 
MAC_PROTOCOL_DTDMA 
MAC_PROTOCOL_ALOHA 
MAC_PROTOCOL_CSMACD 
MAC_PROTOCOL_TOKEN_RING_BUS 
MAC_PROTOCOL_IEEE1609 
MAC_PROTOCOL_UWAN 
MAC_PROTOCOL_SATELLITE 

Definition at line 204 of file Stack.h.

◆ enum_NodeAction

Enumerator
NOT_CONNECTED 
CONNECTED 
JOIN 
LEAVE 

Definition at line 377 of file Stack.h.

◆ enum_NWProtocol

Enumerator
NW_PROTOCOL_IPV4 
NW_PROTOCOL_IPV6 
NW_PROTOCOL_ARP 
NW_PROTOCOL_ICMP 
NW_PROTOCOL_IGMP 
NW_PROTOCOL_DSR 
NW_PROTOCOL_AODV 
NW_PROTOCOL_ZRP 
NW_PROTOCOL_OLSR 
NW_PROTOCOL_RPL 

Definition at line 186 of file Stack.h.

◆ enum_PhyMedium

Enumerator
PHY_MEDIUM_NULL 
PHY_MEDIUM_WIRELESS 
PHY_MEDIUM_WIRED 

Definition at line 239 of file Stack.h.

◆ enum_QueuingTechnique

Enumerator
QUEUING_NULL 
QUEUING_DROPTAIL 
QUEUING_RED 
QUEUING_WRED 

Definition at line 353 of file Stack.h.

◆ enum_refEllipsoid

Enumerator
REFERENCEELLIPSOID_SPHERE 
REFERENCEELLIPSOID_WGS84 
REFERENCEELLIPSOID_GRS80 
REFERENCEELLIPSOID_COUNT 

Definition at line 402 of file Stack.h.

◆ enum_SchedulingType

Enumerator
SCHEDULING_NONE 
SCHEDULING_FIFO 
SCHEDULING_PRIORITY 
SCHEDULING_ROUNDROBIN 
SCHEDULING_WFQ 
SCHEDULING_EDF 
SCHEDULING_CLASSBASED 

Definition at line 342 of file Stack.h.

◆ enum_sim_state

Enumerator
SIMSTATE_NOTSTARTED 
SIMSTATE_PAUSED 
SIMSTATE_RUNNING 
SIMSTATE_STOPPED 

Definition at line 80 of file Stack.h.

◆ enum_SimulationEndType

Enumerator
SimEndType_TIME 

Definition at line 336 of file Stack.h.

◆ enum_TransmissionType

Enumerator
UNICAST 
BROADCAST 
MULTICAST 

Definition at line 361 of file Stack.h.

◆ enum_TrxProtocol

Enumerator
TX_PROTOCOL_NULL 
TX_PROTOCOL_TCP 
TX_PROTOCOL_UDP 
TX_PROTOCOL_WSMP 

Definition at line 177 of file Stack.h.

◆ xmlDataType

Enumerator
_INT 
_DOUBLE 
_FLOAT 
_STRING 
_BOOL 
_CHAR 
_SHORT 
_UINT 
_UCHAR 
_USHORT 
_UINT8 
_UINT16 
_RATIO 
_SPECIALBOOL 

Definition at line 1028 of file Stack.h.

Function Documentation

◆ cancel_timer()

void cancel_timer ( UINT64  eventId)

◆ DNS_QUERY()

NETSIM_IPAddress DNS_QUERY ( NETSIM_ID  nDeviceId,
NETSIM_ID  id 
)
Here is the caller graph for this function:

◆ fn_NetSim_Cofig_GetConnectionMedium()

PHYSICAL_LAYER_MEDIUM fn_NetSim_Cofig_GetConnectionMedium ( char *  medium)

◆ fn_NetSim_Config_ConvertStrToEnum()

int fn_NetSim_Config_ConvertStrToEnum ( void *  xmlNode,
const char *  attributeName,
const char **  enumstr,
const char *  enumName,
int  length,
bool  isErrorMsg 
)

◆ fn_NetSim_Config_GetDeviceType()

netsimDEVICE_TYPE fn_NetSim_Config_GetDeviceType ( const char *  type)

◆ fn_NetSim_Config_GetDistribution()

DISTRIBUTION fn_NetSim_Config_GetDistribution ( const char *  szDistribution)
Here is the caller graph for this function:

◆ fn_NetSim_Config_GetFadingModel()

FADING_MODEL fn_NetSim_Config_GetFadingModel ( char *  model)

◆ fn_NetSim_Config_GetInterfaceType()

INTERFACE_TYPE fn_NetSim_Config_GetInterfaceType ( const char *  value)

◆ fn_NetSim_Config_GetLinkType()

LINK_TYPE fn_NetSim_Config_GetLinkType ( const char *  value)

◆ fn_NetSim_Config_GetPathLossModel()

PATHLOSS_MODEL fn_NetSim_Config_GetPathLossModel ( char *  model)

◆ fn_NetSim_Config_GetPropagationMedium()

PROP_MEDIUM fn_NetSim_Config_GetPropagationMedium ( char *  med)

◆ fn_NetSim_Config_GetPropagationModel()

PROPAGATION_MODEL fn_NetSim_Config_GetPropagationModel ( char *  model)

◆ fn_NetSim_Config_GetProtocol()

int fn_NetSim_Config_GetProtocol ( const char *  value)

◆ fn_NetSim_Config_GetServiceType()

SERVICE_TYPE fn_NetSim_Config_GetServiceType ( char *  type)

◆ fn_NetSim_Config_GetShadowModel()

SHADOW_MODEL fn_NetSim_Config_GetShadowModel ( char *  model)

◆ fn_NetSim_Config_GetSuppressionModel()

SUPPRESSION_MODEL fn_NetSim_Config_GetSuppressionModel ( char *  model)

◆ fn_NetSim_Config_read_dataLen()

double fn_NetSim_Config_read_dataLen ( void *  xmlNetSimNode,
const char *  name,
double  defaultDataLen,
const char *  returnUnit 
)

Used to read data rate. /param: XmlNode /Param: name of variable in config file except units. Config file name must be <NAME>_<UNIT> /Param: default value. Units must be same as return units /Param: return unit type. Valid units are- GB,MB,KB,B,bits

Here is the caller graph for this function:

◆ fn_NetSim_Config_read_dataRate()

double fn_NetSim_Config_read_dataRate ( void *  xmlNetSimNode,
const char *  name,
double  defaultDataRate,
const char *  returnUnit 
)

Used to read data rate. /param: XmlNode /Param: name of variable in config file except units. Config file name must be <NAME>_<UNIT> /Param: default value. Units must be same as return units /Param: return unit type. Valid units are- gbps,mbps,kbps,bps

Here is the caller graph for this function:

◆ fn_NetSim_Config_read_Frequency()

double fn_NetSim_Config_read_Frequency ( void *  xmlNetSimNode,
const char *  name,
double  defaultval,
const char *  returnUnit 
)

Used to read freqency and bandwidth. /param: XmlNode /Param: name of variable in config file except units. Config file name must be <NAME>_<UNIT> /Param: default value. Units must be same as return units /Param: return unit type. Valid units are- GHz, MHz, kHz,Hz

Here is the caller graph for this function:

◆ fn_NetSim_Config_read_time()

double fn_NetSim_Config_read_time ( void *  xmlNetSimNode,
const char *  name,
double  defaultTime,
const char *  returnUnit 
)

Used to read time/duration. /param: XmlNode /Param: name of variable in config file except units. Config file name must be <NAME>_<UNIT> /Param: default value. Units must be same as return units /Param: return unit type. Valid units are- Hr(hour),min(minute),sec(second),ms(millisecond),us(microsecond),ns(nanosecond)

Here is the caller graph for this function:

◆ fn_NetSim_Config_read_txPower()

double fn_NetSim_Config_read_txPower ( void *  xmlNetSimNode,
const char *  name,
double  defaultTxPower,
const char *  returnUnit 
)

Used to read transmitter power. /param: XmlNode /Param: name of variable in config file except units. Config file name must be <NAME>_<UNIT> /Param: default value. Units must be same as return units /Param: return unit type. Valid units are- mW,W,dBm,dB

Here is the caller graph for this function:

◆ fn_NetSim_Coordinate_ConvertCartesianToGeo()

void fn_NetSim_Coordinate_ConvertCartesianToGeo ( NetSim_COORDINATES pos,
GEOCORR_REFERENCEELLIPSOID  refEllipsoid 
)

◆ fn_NetSim_Coordinate_ConvertCartesianToMap()

void fn_NetSim_Coordinate_ConvertCartesianToMap ( NetSim_COORDINATES pos)
Here is the caller graph for this function:

◆ fn_NetSim_Coordinate_ConvertGeoToCartesian()

void fn_NetSim_Coordinate_ConvertGeoToCartesian ( double  lat,
double  lon,
double  altitude,
char *  strRefEllipsoid,
NetSim_COORDINATES pos 
)

◆ fn_NetSim_Coordinate_ConvertMapToCartesian()

void fn_NetSim_Coordinate_ConvertMapToCartesian ( double  lat,
double  lon,
NetSim_COORDINATES pos 
)

◆ fn_NetSim_GetDeviceIdByConfigId()

NETSIM_ID fn_NetSim_GetDeviceIdByConfigId ( NETSIM_ID  id)

◆ fn_NetSim_GetInterfaceIdByConfigId()

NETSIM_ID fn_NetSim_GetInterfaceIdByConfigId ( NETSIM_ID  devId,
NETSIM_ID  id 
)
Here is the caller graph for this function:

◆ fn_NetSim_Link_RegisterLinkFailureCallback()

int fn_NetSim_Link_RegisterLinkFailureCallback ( NETSIM_ID  linkId,
int(*)(NETSIM_ID, LINK_STATE fnLinkCallBack 
)
Here is the caller graph for this function:

◆ fn_NetSim_Metrics_Add_new()

void fn_NetSim_Metrics_Add_new ( const NetSim_PACKET pPacket,
int  line,
char *  file,
char *  function 
)

◆ fn_NetSim_Socket_CreateNewSocket()

ptrSOCKETINTERFACE fn_NetSim_Socket_CreateNewSocket ( NETSIM_ID  deviceId,
int  appProtocol,
TRANSPORT_LAYER_PROTOCOL  trxProtocol,
UINT16  localPort,
UINT16  remotePort 
)
Here is the caller graph for this function:

◆ fn_NetSim_Socket_GetBufferStatus()

bool fn_NetSim_Socket_GetBufferStatus ( ptrSOCKETINTERFACE  s)
Here is the caller graph for this function:

◆ fn_NetSim_Socket_GetPacketFromInterface()

NetSim_PACKET * fn_NetSim_Socket_GetPacketFromInterface ( ptrSOCKETINTERFACE  s,
int  moveFlag 
)
Here is the caller graph for this function:

◆ fn_NetSim_Socket_GetSocketInterface()

ptrSOCKETINTERFACE fn_NetSim_Socket_GetSocketInterface ( NETSIM_ID  deviceId,
APPLICATION_LAYER_PROTOCOL  appProtocol,
TRANSPORT_LAYER_PROTOCOL  trxProtocol,
UINT16  localPort,
UINT16  remotePort 
)
Here is the caller graph for this function:

◆ fn_NetSim_Socket_PassPacketToInterface()

void fn_NetSim_Socket_PassPacketToInterface ( NETSIM_ID  deviceId,
NetSim_PACKET packet,
ptrSOCKETINTERFACE  socketInterface 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_AddDeviceTolink()

NetSim_LINKS * fn_NetSim_Stack_AddDeviceTolink ( NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId,
NETSIM_ID  nLinkId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_CallICMPErrorFun()

int fn_NetSim_Stack_CallICMPErrorFun ( NetSim_PACKET packet,
NETSIM_ID  nDeviceId,
unsigned int  nICMPErr 
)

◆ fn_NetSim_Stack_CreateVirtualInterface()

NETSIM_ID fn_NetSim_Stack_CreateVirtualInterface ( NETSIM_ID  deviceId,
NETSIM_ID  parentInterfaceId,
char *  virtualInterfaceName,
bool  isNwChanged,
bool  isMacChanged,
bool  isPhyChanged 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_FindVirtualInterface()

NETSIM_ID fn_NetSim_Stack_FindVirtualInterface ( NETSIM_ID  d,
NETSIM_ID  parentIf,
char *  name 
)
Here is the caller graph for this function:

◆ fn_NetSim_stack_get_link_quality()

double fn_NetSim_stack_get_link_quality ( NETSIM_ID  trx,
NETSIM_ID  tri,
NETSIM_ID  rx,
NETSIM_ID  ri 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetApplicationIdByConfigId()

NETSIM_ID fn_NetSim_Stack_GetApplicationIdByConfigId ( NETSIM_ID  id)

◆ fn_NetSim_Stack_GetAppProtocolData()

void * fn_NetSim_Stack_GetAppProtocolData ( NETSIM_ID  deviceId,
UINT  appProtocol 
)

◆ fn_NetSim_Stack_GetConfigIdOfDeviceById()

NETSIM_ID fn_NetSim_Stack_GetConfigIdOfDeviceById ( NETSIM_ID  nDeviceId)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetConfigIdOfLinkById()

NETSIM_ID fn_NetSim_Stack_GetConfigIdOfLinkById ( NETSIM_ID  nLinkId)

◆ fn_NetSim_Stack_GetConnectedDevice()

NETSIM_ID fn_NetSim_Stack_GetConnectedDevice ( NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId,
NETSIM_ID nConnectedDevId,
NETSIM_ID nConnectedInterfaceId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetConnectedInterface()

NETSIM_ID fn_NetSim_Stack_GetConnectedInterface ( NETSIM_ID  devId,
NETSIM_ID  ifid,
NETSIM_ID  conId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetConnectedInterface_Both()

NETSIM_ID fn_NetSim_Stack_GetConnectedInterface_Both ( NETSIM_ID  d,
NETSIM_ID  r,
NETSIM_ID din,
NETSIM_ID rin 
)

◆ fn_NetSim_Stack_GetDeviceId_asIP()

NETSIM_ID fn_NetSim_Stack_GetDeviceId_asIP ( NETSIM_IPAddress  ip,
NETSIM_ID nInterfaceId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetDeviceId_asMac()

NETSIM_ID fn_NetSim_Stack_GetDeviceId_asMac ( PNETSIM_MACADDRESS  mac,
NETSIM_ID nInterfaceId 
)

◆ fn_NetSim_Stack_GetDeviceId_asName()

NETSIM_ID fn_NetSim_Stack_GetDeviceId_asName ( const char *  name)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetFirstConnectedDevice()

NETSIM_ID fn_NetSim_Stack_GetFirstConnectedDevice ( NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId,
NETSIM_ID nConnectedDevId,
NETSIM_ID nConnectedInterfaceId 
)

◆ fn_NetSim_Stack_GetFirstIPAddressAsId()

NETSIM_IPAddress fn_NetSim_Stack_GetFirstIPAddressAsId ( NETSIM_ID  nDeviceId,
unsigned int  type 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetFirstIPAddressByName()

NETSIM_IPAddress fn_NetSim_Stack_GetFirstIPAddressByName ( const NETSIM_Name  szDeviceName)

◆ fn_NetSim_Stack_GetInterfaceIdbyInterfaceType()

NETSIM_ID * fn_NetSim_Stack_GetInterfaceIdbyInterfaceType ( NETSIM_ID  devId,
INTERFACE_TYPE  ifType,
unsigned int *  count 
)

◆ fn_NetSim_Stack_GetInterfaceIdbyMacProtocol()

NETSIM_ID * fn_NetSim_Stack_GetInterfaceIdbyMacProtocol ( NETSIM_ID  devId,
MAC_LAYER_PROTOCOL  protocol,
unsigned int *  count 
)

◆ fn_NetSim_Stack_GetInterfaceIdByName()

NETSIM_ID fn_NetSim_Stack_GetInterfaceIdByName ( NETSIM_ID  nDeviceId,
const char *  szInterfaceName 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetInterfaceIdFromIP()

NETSIM_ID fn_NetSim_Stack_GetInterfaceIdFromIP ( NETSIM_ID  nDeviceId,
NETSIM_IPAddress  ip 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetIPAddressAsId()

NETSIM_IPAddress fn_NetSim_Stack_GetIPAddressAsId ( NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetIPAddressByName()

NETSIM_IPAddress fn_NetSim_Stack_GetIPAddressByName ( const NETSIM_Name  szDeviceName,
NETSIM_ID  nInterfaceId 
)

◆ fn_NetSim_Stack_GetIPAddressFromMac()

NETSIM_IPAddress fn_NetSim_Stack_GetIPAddressFromMac ( const PNETSIM_MACADDRESS  szMacAddress)

◆ fn_NetSim_Stack_GetLinkIdByConfigId()

NETSIM_ID fn_NetSim_Stack_GetLinkIdByConfigId ( NETSIM_ID  nLinkId)

◆ fn_NetSim_Stack_GetMacAddressFromIP()

PNETSIM_MACADDRESS fn_NetSim_Stack_GetMacAddressFromIP ( const NETSIM_IPAddress  szIPAddress)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetMacProtocol()

MAC_LAYER_PROTOCOL fn_NetSim_Stack_GetMacProtocol ( NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetMSS()

double fn_NetSim_Stack_GetMSS ( const NetSim_PACKET pPacket)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetNWProtocol()

NETWORK_LAYER_PROTOCOL fn_NetSim_Stack_GetNWProtocol ( NETSIM_ID  nDeviceId)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_GetNWRoutingProtocol()

NETWORK_LAYER_PROTOCOL fn_NetSim_Stack_GetNWRoutingProtocol ( NETSIM_ID  nDeviceId)

◆ fn_NetSim_Stack_GetWirelessInterface()

NETSIM_ID fn_NetSim_Stack_GetWirelessInterface ( NETSIM_ID  nLinkId,
NETSIM_ID  nDevId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_isProtocolConfigured()

bool fn_NetSim_Stack_isProtocolConfigured ( NETSIM_ID  d,
LAYER_TYPE  layer,
UINT  protocol 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_RegisterICMPCallback()

int fn_NetSim_Stack_RegisterICMPCallback ( int(*)(NetSim_PACKET *errPacket, NETSIM_ID nDeviceId, unsigned int nICMPErr)  fnCallBack)

◆ fn_NetSim_Stack_RegisterNewApplicationProtocol()

void * fn_NetSim_Stack_RegisterNewApplicationProtocol ( NETSIM_ID  deviceId,
UINT  appProtocol 
)

◆ fn_NetSim_Stack_RemoveDeviceFromlink()

NetSim_LINKS * fn_NetSim_Stack_RemoveDeviceFromlink ( NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId,
NETSIM_ID  nLinkId 
)
Here is the caller graph for this function:

◆ fn_NetSim_Stack_SetAppProtocolData()

void fn_NetSim_Stack_SetAppProtocolData ( NETSIM_ID  deviceId,
UINT  appProtocol,
void *  data 
)

◆ fn_NetSim_Utilities_CalculateDistance()

double fn_NetSim_Utilities_CalculateDistance ( NetSim_COORDINATES coordinate1,
NetSim_COORDINATES coordinates2 
)
Here is the caller graph for this function:

◆ fn_NetSim_Utilities_ConcatString()

int fn_NetSim_Utilities_ConcatString ( int  num,
char *  arg1,
const char *  arg2,
  ... 
)
Here is the caller graph for this function:

◆ fn_NetSim_Utilities_GenerateRandomNo()

double fn_NetSim_Utilities_GenerateRandomNo ( unsigned long *  uSeed,
unsigned long *  uSeed1 
)
Here is the caller graph for this function:

◆ fn_NetSim_Utils_Distribution()

int fn_NetSim_Utils_Distribution ( int  nDistributionType,
double *  fDistOut,
unsigned long *  uSeed,
unsigned long *  uSeed1,
double  fFirstArg,
double  fSecondArg 
)
Here is the caller graph for this function:

◆ fn_NetSim_xmlConfig_GetVal()

char * fn_NetSim_xmlConfig_GetVal ( void *  xmlNetSimNode,
const char *  szName,
int  flag 
)
Here is the caller graph for this function:

◆ fn_NetSim_xmlConfigPacketTraceField()

char * fn_NetSim_xmlConfigPacketTraceField ( const void *  xmlNetSimNode,
const char *  name 
)
Here is the caller graph for this function:

◆ fn_NetSim_xmlConfigureProtocolProperty()

int fn_NetSim_xmlConfigureProtocolProperty ( void *  xmlChildNode,
NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId,
LAYER_TYPE  nLayerType,
UINT  nProtocolId 
)

◆ fn_NetSim_xmlGetChildElement()

void * fn_NetSim_xmlGetChildElement ( void *  xmlNetSimNode,
const char *  childName,
int  count 
)
Here is the caller graph for this function:

◆ fn_NetSim_xmlGetNextChildElement()

void * fn_NetSim_xmlGetNextChildElement ( void *  xmlNetSimNode,
void *  prevChild 
)

◆ fn_NetSim_xmlIterateOverChildElement()

void fn_NetSim_xmlIterateOverChildElement ( void *  xmlNetSimNode,
const char *  childName,
int(*)(void *childNode, int argc, char *argv[])  fun,
int  argc,
char *  argv[] 
)

◆ fnDeleteEvent()

int fnDeleteEvent ( unsigned long long int  nEventId)
Here is the caller graph for this function:

◆ fnMobilityRegisterCallBackFunction()

int fnMobilityRegisterCallBackFunction ( _fnMobilityCallBack  fnCallBack)

Definition at line 590 of file Mobility.c.

Here is the caller graph for this function:

◆ fnNodeJoinRegisterCallBackFunction()

int fnNodeJoinRegisterCallBackFunction ( _fnNodeJoinCallBack  fnCallBack)

Definition at line 125 of file NodeJoin.c.

◆ get_ip_from_same_subnet()

NETSIM_IPAddress get_ip_from_same_subnet ( NETSIM_ID  d,
NETSIM_IPAddress  ip 
)
Here is the caller graph for this function:

◆ GetXmlVal()

int GetXmlVal ( void *  var,
const char *  name,
void *  xmlNode,
int  flag,
XMLDATATYPE  type 
)

◆ isBroadcastMAC()

bool isBroadcastMAC ( PNETSIM_MACADDRESS  mac)
Here is the caller graph for this function:

◆ isFastEmulation()

bool isFastEmulation ( )

◆ isHost()

bool isHost ( NETSIM_ID  d)
Here is the caller graph for this function:

◆ isIPForSameDevice()

bool isIPForSameDevice ( NETSIM_IPAddress  ip,
NETSIM_ID  d 
)
Here is the caller graph for this function:

◆ isL3Device()

bool isL3Device ( NETSIM_ID  d)
Here is the caller graph for this function:

◆ isMulticastMAC()

bool isMulticastMAC ( PNETSIM_MACADDRESS  mac)
Here is the caller graph for this function:

◆ isRouter()

bool isRouter ( NETSIM_ID  d)
Here is the caller graph for this function:

◆ isVirtualInterface()

bool isVirtualInterface ( NETSIM_ID  d,
NETSIM_ID  in 
)
Here is the caller graph for this function:

◆ MAC_COMPARE()

int MAC_COMPARE ( PNETSIM_MACADDRESS  mac1,
PNETSIM_MACADDRESS  mac2 
)
Here is the caller graph for this function:

◆ MAC_COPY()

Here is the caller graph for this function:

◆ MAC_FREE()

void MAC_FREE ( PNETSIM_MACADDRESS  mac)

◆ MAC_FREE_ALL()

void MAC_FREE_ALL ( )

◆ MAC_TO_STR()

char * MAC_TO_STR ( PNETSIM_MACADDRESS  mac)

◆ multicastIP_to_Mac()

PNETSIM_MACADDRESS multicastIP_to_Mac ( NETSIM_IPAddress  multicastIP)
Here is the caller graph for this function:

◆ netsim_get_simstate()

SIMSTATE netsim_get_simstate ( )
Here is the caller graph for this function:

◆ netsim_pause_progress()

void netsim_pause_progress ( )

◆ netsim_resume_progress()

void netsim_resume_progress ( )

◆ netsim_set_simstate()

void netsim_set_simstate ( SIMSTATE  state)
Here is the caller graph for this function:

◆ NetSimxmlError()

int NetSimxmlError ( const char *  msg,
char *  val,
const void *  xmlNetSimNode 
)
Here is the caller graph for this function:

◆ notify_interface_down()

void notify_interface_down ( NETSIM_ID  d,
NETSIM_ID  in 
)
Here is the caller graph for this function:

◆ notify_interface_up()

void notify_interface_up ( NETSIM_ID  d,
NETSIM_ID  in 
)
Here is the caller graph for this function:

◆ register_interface_state_change()

void register_interface_state_change ( NETSIM_ID  d,
NETSIM_ID  in,
fun  foo 
)

◆ set_emulation()

void set_emulation ( bool  isCustom,
int(*)(void *emuInterface)  load_emulation 
)

◆ set_thread_safe_kernel()

void set_thread_safe_kernel ( bool  status)

◆ sim_time_to_string()

void sim_time_to_string ( double  time,
char *  strTime 
)

◆ start_timer()

UINT64 start_timer ( NETSIM_ID  d,
NETSIM_ID  in,
UINT  eventId,
double  time,
void *  data 
)

◆ STR_TO_MAC()

PNETSIM_MACADDRESS STR_TO_MAC ( char *  mac)
Here is the caller graph for this function:

Variable Documentation

◆ BROADCAST_MAC

Definition at line 393 of file Stack.h.

◆ fnDNS

Definition at line 1016 of file Stack.h.

◆ isSimulationContinued

EXPORTED bool isSimulationContinued

Definition at line 54 of file Stack.h.

◆ ldEventTime

EXPORTED double ldEventTime

Definition at line 838 of file Stack.h.

◆ nDbgFlag

EXPORTED int nDbgFlag

Definition at line 845 of file Stack.h.

◆ NETWORK

EXPORTED struct stru_NetSim_Network* NETWORK

Definition at line 742 of file Stack.h.

◆ nEventType

EXPORTED EVENT_TYPE nEventType

Definition at line 839 of file Stack.h.

◆ nVersionType

Definition at line 844 of file Stack.h.

◆ pstruEventDetails

EXPORTED struct stru_NetSim_EventDetails* pstruEventDetails

Definition at line 837 of file Stack.h.

◆ pszAppPath

EXPORTED char* pszAppPath

Definition at line 840 of file Stack.h.

◆ pszIOLogPath

EXPORTED char* pszIOLogPath

Definition at line 843 of file Stack.h.

◆ pszIOPath

EXPORTED char* pszIOPath

Definition at line 842 of file Stack.h.

◆ subeventName

char subeventName[SUBEVNET_LAST][100]
static
Initial value:
= { "GET_LINK_QUALITY",
"JOIN_MULTICAST_GROUP",
"LINKUP",
"LINKDOWN",
"HWIRECV",
"HWI_CLEANUP",
"PAUSE_SIMULATION",
"EXECUTE_COMMAND"}

Definition at line 131 of file Stack.h.

◆ wireshark_flag

EXPORTED int wireshark_flag

Definition at line 847 of file Stack.h.