|  | NetSim Source Code Help
    | 


Go to the source code of this file.
| Data Structures | |
| struct | stru_SocketInfo | 
| Structure to store socket information.  More... | |
| struct | stru_Application_Info | 
| Structure to store application information.  More... | |
| struct | stru_Application_DataInfo | 
| Structure for Data information such as packet size and inter arrival time,this is applicable for custom,FTP,Database Traffic.  More... | |
| struct | stru_Application_BSMInfo | 
| Structure for Data information such as packet size and inter arrival time,this is applicable for Vanet application.  More... | |
| struct | stru_Application_VoiceInfo | 
| Structure for voice information such as packet size, inter arrival time and service type,this is applicable for voice traffic.  More... | |
| struct | stru_Application_VideoInfo | 
| structure to store the video application information  More... | |
| struct | stru_Application_EmulationInfo | 
| Structure to store the emulation application information.  More... | |
| struct | stru_Application_HTTPInfo | 
| Structure to store the HTTP application information.  More... | |
| struct | stru_Application_COAPInfo | 
| Structure to store the COAP application information.  More... | |
| struct | stru_Application_EMAILInfo | 
| Structure to store email application information.  More... | |
| struct | stru_Application_EMAILInfo::stru_emailinfo | 
| struct | stru_Application_P2P_SeederList | 
| Structure for Seeder list of peer_to_peer traffic.  More... | |
| struct | stru_Application_p2P_PeerList | 
| Structure for peer list of peer_to_peer traffic.  More... | |
| struct | stru_Application_P2PInfo | 
| Structure fot peer_to_peer application.  More... | |
| struct | stru_Application_CallInfo | 
| Structure for Erlang_call application.  More... | |
| struct | stru_email_detail | 
| Macros | |
| #define | roundoff(d) ((long)(d+0.5)) | 
| #define | MAX_TTL 255 | 
| #define | MAX_PORT 65535 | 
| #define | VANET_APP_RANDOM_WAIT_TIME_DEFAULT 5*MILLISECOND | 
| #define | RANDOM_STARTUP_DELAY 0.1*SECOND | 
| #define | SOCKETINFO_ALLOC() (struct stru_SocketInfo*)list_alloc(sizeof(struct stru_SocketInfo),offsetof(struct stru_SocketInfo,ele)) | 
| Variables | |
| unsigned int | nApplicationCount | 
| ptrAPPLICATION_INFO * | applicationInfo | 
| static const char * | strVIDEOMODEL [] | 
| bool | nApplicationThroughputPlotFlag | 
| char * | szApplicationThroughputPlotVal | 
| bool | nApplicationThroughputPlotRealTime | 
| PNETSIMPLOT * | applicationThroughputPlots | 
| bool * | nAppPlotFlag | 
| #define MAX_PORT 65535 | 
Definition at line 35 of file Application.h.
| #define MAX_TTL 255 | 
Definition at line 34 of file Application.h.
| #define RANDOM_STARTUP_DELAY 0.1*SECOND | 
Definition at line 38 of file Application.h.
| #define roundoff | ( | d | ) | ((long)(d+0.5)) | 
Definition at line 33 of file Application.h.
| #define SOCKETINFO_ALLOC | ( | ) | (struct stru_SocketInfo*)list_alloc(sizeof(struct stru_SocketInfo),offsetof(struct stru_SocketInfo,ele)) | 
Definition at line 94 of file Application.h.
| #define VANET_APP_RANDOM_WAIT_TIME_DEFAULT 5*MILLISECOND | 
Definition at line 37 of file Application.h.
| typedef struct stru_Application_BSMInfo APP_BSM_INFO | 
Structure for Data information such as packet size and inter arrival time,this is applicable for Vanet application.
| typedef struct stru_Application_CallInfo APP_CALL_INFO | 
Definition at line 48 of file Application.h.
| typedef struct stru_Application_COAPInfo APP_COAP_INFO | 
Definition at line 50 of file Application.h.
| typedef struct stru_Application_DataInfo APP_DATA_INFO | 
Definition at line 42 of file Application.h.
| typedef struct stru_Application_EMAILInfo APP_EMAIL_INFO | 
Definition at line 46 of file Application.h.
| typedef struct stru_Application_EmulationInfo APP_EMULATION_INFO | 
Definition at line 49 of file Application.h.
| typedef struct stru_Application_HTTPInfo APP_HTTP_INFO | 
Definition at line 45 of file Application.h.
| typedef struct stru_Application_P2PInfo APP_P2P_INFO | 
Definition at line 47 of file Application.h.
| typedef struct stru_Application_VideoInfo APP_VIDEO_INFO | 
Definition at line 44 of file Application.h.
| typedef struct stru_Application_VoiceInfo APP_VOICE_INFO | 
Definition at line 43 of file Application.h.
| typedef struct stru_Application_Info APPLICATION_INFO | 
Structure to store application information.
| typedef struct stru_email_detail DETAIL | 
| typedef struct stru_Application_BSMInfo * PAPP_BSM_INFO | 
| typedef struct stru_Application_p2P_PeerList PEER_LIST | 
Structure for peer list of peer_to_peer traffic.
| typedef struct stru_Application_Info * ptrAPPLICATION_INFO | 
| typedef struct stru_Application_P2P_SeederList SEEDER_LIST | 
Structure for Seeder list of peer_to_peer traffic.
| enum APP_CONTROL_PACKET | 
Enumeration for application control packets.
| Enumerator | |
|---|---|
| packet_HTTP_REQUEST | |
| packet_COAP_REQUEST | |
Definition at line 69 of file Application.h.
| enum APP_EVENT | 
Enumeration for application events.
| Enumerator | |
|---|---|
| event_APP_START | |
| event_APP_END | |
| event_APP_RESTART | |
Definition at line 52 of file Application.h.
| enum APP_STATE | 
Enumeration for application state.
| Enumerator | |
|---|---|
| appState_Started | |
| appState_Paused | |
| appState_Terminated | |
Definition at line 76 of file Application.h.
| enum ENCRYPTION | 
| Enumerator | |
|---|---|
| Encryption_None | |
| Encryption_XOR | |
| Encryption_TEA | |
| Encryption_AES | |
| Encryption_DES | |
Definition at line 59 of file Application.h.
| enum VIDEOMODEL | 
Definition at line 174 of file Application.h.
| void add_multicast_route | ( | ptrAPPLICATION_INFO | info | ) | 
Definition at line 17 of file Component 1/Part 4/Application/Multicast.c.


| bool add_sae_j2735_payload | ( | NetSim_PACKET * | packet, | 
| ptrAPPLICATION_INFO | info | ||
| ) | 
| int aes256 | ( | char * | str, | 
| int * | len | ||
| ) | 
| void appmetrics_dest_add | ( | ptrAPPLICATION_INFO | appInfo, | 
| NetSim_PACKET * | packet, | ||
| NETSIM_ID | dest | ||
| ) | 

| void appmetrics_src_add | ( | ptrAPPLICATION_INFO | appInfo, | 
| _In_ NetSim_PACKET * | packet | ||
| ) | 

| int des | ( | char * | buf, | 
| int * | len | ||
| ) | 
| int fn_NetSim_Add_DummyPayload | ( | NetSim_PACKET * | packet, | 
| ptrAPPLICATION_INFO | info | ||
| ) | 
Definition at line 641 of file Application.c.


| int fn_NetSim_App_RestartApplication | ( | ) | 

| int fn_NetSim_Application_BSM | ( | PAPP_BSM_INFO | info, | 
| double * | fSize, | ||
| double * | ldArrival, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1, | ||
| unsigned long * | uSeed2, | ||
| unsigned long * | uSeed3 | ||
| ) | 
| int fn_NetSim_Application_COAP_ProcessRequest | ( | ptrAPPLICATION_INFO | pstruappinfo, | 
| NetSim_PACKET * | pstruPacket | ||
| ) | 
| int fn_NetSim_Application_Configure_F | ( | void ** | var | ) | 

| int fn_NetSim_Application_ConfigureCOAPTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureDatabaseTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureDataTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureEmailTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureEmulationTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureErlangCallTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureFTPTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureHTTPTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureMPEGVideo | ( | APP_VIDEO_INFO * | info, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureP2PTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureVideoTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| int fn_NetSim_Application_ConfigureVoiceTraffic | ( | ptrAPPLICATION_INFO | appInfo, | 
| void * | xmlNetSimNode | ||
| ) | 
| ptrAPPLICATION_INFO fn_NetSim_Application_Email_GenerateNextPacket | ( | DETAIL * | detail, | 
| NETSIM_ID | nSourceId, | ||
| NETSIM_ID | nDestinationId, | ||
| double | time | ||
| ) | 

| int fn_NetSim_Application_ErlangCall_EndCall | ( | NetSim_EVENTDETAILS * | pstruEventDetails | ) | 

| int fn_NetSim_Application_ErlangCall_StartCall | ( | NetSim_EVENTDETAILS * | pstruEventDetails | ) | 

| int fn_NetSim_Application_GenerateNextPacket | ( | ptrAPPLICATION_INFO | appInfo, | 
| NETSIM_ID | nSource, | ||
| UINT | destCount, | ||
| NETSIM_ID * | nDestination, | ||
| double | time | ||
| ) | 
This function is used to generate the next packet
Definition at line 377 of file Application.c.


| NetSim_PACKET * fn_NetSim_Application_GeneratePacket | ( | ptrAPPLICATION_INFO | info, | 
| double | ldArrivalTime, | ||
| NETSIM_ID | nSourceId, | ||
| UINT | destCount, | ||
| NETSIM_ID * | nDestination, | ||
| unsigned long long int | nPacketId, | ||
| APPLICATION_TYPE | nAppType, | ||
| QUALITY_OF_SERVICE | nQOS, | ||
| unsigned int | sourcePort, | ||
| unsigned int | destPort | ||
| ) | 
This function is used to generate the packets for application
Definition at line 311 of file Application.c.


| PACKET_TYPE fn_NetSim_Application_GetPacketTypeBasedOnApplicationType | ( | APPLICATION_TYPE | nAppType | ) | 

| int fn_NetSim_Application_HTTP_ProcessRequest | ( | ptrAPPLICATION_INFO | pstruappinfo, | 
| NetSim_PACKET * | pstruPacket | ||
| ) | 

| int fn_NetSim_Application_Init_F | ( | ) | 

| int fn_NetSim_Application_Metrics_F | ( | PMETRICSWRITER | metricsWriter | ) | 

| int fn_NetSim_Application_P2P_GenerateFile | ( | ptrAPPLICATION_INFO | appInfo | ) | 
| int fn_NetSim_Application_P2P_InitPeers | ( | ptrAPPLICATION_INFO | appInfo | ) | 
| int fn_NetSim_Application_P2P_InitSeederList | ( | ptrAPPLICATION_INFO | appInfo | ) | 
| int fn_NetSim_Application_P2P_MarkReceivedPacket | ( | ptrAPPLICATION_INFO | pstruappinfo, | 
| NetSim_PACKET * | pstruPacket | ||
| ) | 

| int fn_NetSim_Application_P2P_SendNextPiece | ( | ptrAPPLICATION_INFO | appInfo, | 
| NETSIM_ID | destination, | ||
| double | time | ||
| ) | 

| int fn_NetSim_Application_Plot | ( | NetSim_PACKET * | pstruPacket | ) | 

| int fn_NetSim_Application_StartBSM | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartCOAPAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartDataAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
This function is used to start the Database, FTP and Custom applications
Definition at line 82 of file Database_FTP_Custom.c.


| int fn_NetSim_Application_StartEmailAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartErlangCallAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartHTTPAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartP2PAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartVideoAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| int fn_NetSim_Application_StartVoiceAPP | ( | ptrAPPLICATION_INFO | appInfo, | 
| double | time | ||
| ) | 
| void fn_NetSim_Emulation_StartApplication | ( | ptrAPPLICATION_INFO | appInfo | ) | 
| int fn_NetSim_TrafficGenerator_Custom | ( | APP_DATA_INFO * | info, | 
| double * | fSize, | ||
| double * | ldArrival, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1, | ||
| unsigned long * | uSeed2, | ||
| unsigned long * | uSeed3 | ||
| ) | 

| int fn_NetSim_TrafficGenerator_MPEGVideo | ( | APP_VIDEO_INFO * | info, | 
| double * | fPacketSize, | ||
| double * | ldArrival, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1 | ||
| ) | 
| int fn_NetSim_TrafficGenerator_Video | ( | APP_VIDEO_INFO * | info, | 
| double * | fPacketSize, | ||
| double * | ldArrival, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1 | ||
| ) | 

| int fn_NetSim_TrafficGenerator_Voice | ( | APP_VOICE_INFO * | info, | 
| double * | fSize, | ||
| double * | ldArrival, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1 | ||
| ) | 

| void fnCreatePort | ( | ptrAPPLICATION_INFO | info | ) | 

| int fnCreateSocketBuffer | ( | ptrAPPLICATION_INFO | appInfo | ) | 

| int fnDistribution | ( | DISTRIBUTION | nDistributionType, | 
| double * | fDistOut, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1, | ||
| double * | args | ||
| ) | 
This function is used to run the distributions
Definition at line 17 of file Distribution.c.


| ptrSOCKETINTERFACE fnGetSocket | ( | NETSIM_ID | nAppId, | 
| NETSIM_ID | nSourceId, | ||
| NETSIM_ID | nSourcePort, | ||
| NETSIM_ID | nDestPort | ||
| ) | 

| int fnRandomNo | ( | long | lm, | 
| double * | fRandNo, | ||
| unsigned long * | uSeed, | ||
| unsigned long * | uSeed1 | ||
| ) | 
This function is used to generate the random number
Definition at line 19 of file RandomNumber.c.

| void free_app_metrics | ( | ptrAPPLICATION_INFO | appInfo | ) | 

| ptrAPPLICATION_INFO get_email_app_info | ( | void * | detail | ) | 

| void handle_app_out | ( | ) | 
| void join_multicast_group | ( | ptrAPPLICATION_INFO | info, | 
| double | time | ||
| ) | 
Definition at line 80 of file Component 1/Part 4/Application/Multicast.c.


| void P2P_create_socket | ( | ptrAPPLICATION_INFO | appInfo, | 
| NETSIM_ID | src, | ||
| NETSIM_ID | dest | ||
| ) | 
| void process_saej2735_packet | ( | NetSim_PACKET * | packet | ) | 
| char xor_encrypt | ( | char | ch, | 
| long | key | ||
| ) | 
| ptrAPPLICATION_INFO* applicationInfo | 
Definition at line 136 of file Application.h.
| PNETSIMPLOT* applicationThroughputPlots | 
Definition at line 340 of file Application.h.
| unsigned int nApplicationCount | 
Definition at line 40 of file Application.h.
| bool nApplicationThroughputPlotFlag | 
Definition at line 337 of file Application.h.
| bool nApplicationThroughputPlotRealTime | 
Definition at line 339 of file Application.h.
| bool* nAppPlotFlag | 
Definition at line 341 of file Application.h.
| 
 | static | 
Definition at line 193 of file Application.h.
| char* szApplicationThroughputPlotVal | 
Definition at line 338 of file Application.h.