28void encryptBlock(uint8_t* data, uint32_t* len, uint32_t* key);
148 if (info->pCOAPData->_RETRANSMIT < info->maxRetransmit && info->pCOAPData->Response_Received == 0) {
151 info->pCOAPData->Response_Received = 0;
152 info->pCOAPData->RequestACK_Received = 0;
155 info->pCOAPData->_RETRANSMIT += 1;
160 info->pCOAPData->_RETRANSMIT = 1;
161 info->pCOAPData->Response_Received = 0;
216 return "APP_RESTART";
220 return "APP_UNKNOWN_SUBEVENT";
312 double ldArrivalTime,
316 unsigned long long int nPacketId,
319 unsigned int sourcePort,
320 unsigned int destPort)
333 pstruPacket->
nQOS = nQOS;
397 double arrivalTime = 0;
398 double packetSize = 0;
407 if (appInfo->
dEndTime <= time + arrivalTime)
442 double arrivalTime = 0;
443 double packetSize = 0;
449 if (appInfo->
dEndTime <= time + arrivalTime)
480 double arrivalTime = 0;
481 double packetSize = 0;
488 if (appInfo->
dEndTime <= time + arrivalTime)
521 double arrivalTime = 0;
522 double packetSize = 0;
523 if (info->
nCallStatus[nSource - 1][nDestination[0] - 1] == 0 || packet == NULL)
550 if (info->
dCallEndTime[nSource - 1][nDestination[0] - 1] <= time + arrivalTime)
552 info->
nextPacket[nSource - 1][nDestination[0] - 1] = NULL;
556 info->
nextPacket[nSource - 1][nDestination[0] - 1] =
573 double arrivalTime = 0;
574 double packetSize = 0;
583 if (appInfo->
dEndTime <= time + arrivalTime)
625 for (i = 0; i < *payload; i++)
630 real[i] =
'a' + i % 26;
int fn_NetSim_Application_GenerateNextPacket(ptrAPPLICATION_INFO appInfo, NETSIM_ID nSource, UINT destCount, NETSIM_ID *nDestination, double time)
static PACKET_PRIORITY get_priority_based_on_qos(QUALITY_OF_SERVICE qos)
void copy_payload(UINT8 real[], NetSim_PACKET *packet, unsigned int *payload, ptrAPPLICATION_INFO info)
int fn_NetSim_Application_Configure(void **var)
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)
char * fn_NetSim_Application_Trace(int nSubEvent)
int fn_NetSim_Application_CopyPacket(NetSim_PACKET *pstruDestPacket, NetSim_PACKET *pstruSrcPacket)
int fn_NetSim_Application_FreePacket(NetSim_PACKET *pstruPacket)
int fn_NetSim_Application_Finish()
int fn_NetSim_Add_DummyPayload(NetSim_PACKET *packet, ptrAPPLICATION_INFO info)
char * fn_NetSim_Application_ConfigPacketTrace()
int fn_NetSim_Application_Run()
int fn_NetSim_Application_WritePacketTrace(NetSim_PACKET *pstruPacket, char **ppszTrace)
double get_random_startupdelay()
int fn_NetSim_Application_Metrics(PMETRICSWRITER metricsWriter)
void encryptBlock(uint8_t *data, uint32_t *len, uint32_t *key)
int fn_NetSim_Application_Init(struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
char xor_encrypt(char ch, long key)
#define RANDOM_STARTUP_DELAY
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)
ptrAPPLICATION_INFO * applicationInfo
int fn_NetSim_TrafficGenerator_Video(APP_VIDEO_INFO *info, double *fPacketSize, double *ldArrival, unsigned long *uSeed, unsigned long *uSeed1)
int fn_NetSim_Application_StartCOAPAPP(ptrAPPLICATION_INFO appInfo, double time)
int fn_NetSim_Application_HTTP_ProcessRequest(ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
int fn_NetSim_Application_ErlangCall_StartCall(NetSim_EVENTDETAILS *pstruEventDetails)
int fn_NetSim_Application_ErlangCall_EndCall(NetSim_EVENTDETAILS *pstruEventDetails)
int fn_NetSim_Application_P2P_SendNextPiece(ptrAPPLICATION_INFO appInfo, NETSIM_ID destination, double time)
int fn_NetSim_Application_P2P_MarkReceivedPacket(ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
PACKET_TYPE fn_NetSim_Application_GetPacketTypeBasedOnApplicationType(APPLICATION_TYPE nAppType)
int fn_NetSim_Application_Configure_F(void **var)
unsigned int nApplicationCount
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_Voice(APP_VOICE_INFO *info, double *fSize, double *ldArrival, unsigned long *uSeed, unsigned long *uSeed1)
int fn_NetSim_App_RestartApplication()
struct stru_Application_Info * ptrAPPLICATION_INFO
void appmetrics_dest_add(ptrAPPLICATION_INFO appInfo, NetSim_PACKET *packet, NETSIM_ID dest)
int des(char *buf, int *len)
int fn_NetSim_Application_Metrics_F(PMETRICSWRITER metricsWriter)
int fn_NetSim_Application_Init_F()
bool add_sae_j2735_payload(NetSim_PACKET *packet, ptrAPPLICATION_INFO info)
int fn_NetSim_Application_Plot(NetSim_PACKET *pstruPacket)
void free_app_metrics(ptrAPPLICATION_INFO appInfo)
void process_saej2735_packet(NetSim_PACKET *packet)
void fn_NetSim_Application_COAP_AppIn(ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
NETSIM_IPAddress IP_COPY(NETSIM_IPAddress ip)
NETSIM_IPAddress STR_TO_IP(char *ipStr, int type)
#define _declspec(dllexport)
This function is used to trigger the update.
#define fnNetSimError(x,...)
#define LIST_FREE(ls, mem)
int fnValidatePacket(const NetSim_PACKET *pstruPacket)
double fnGetPacketSize(NetSim_PACKET *pstruData)
int fn_NetSim_Dispatch_to_emulator(NetSim_PACKET *packet)
enum enum_ApplicationType APPLICATION_TYPE
NETSIM_ID get_first_dest_from_packet(NetSim_PACKET *packet)
void add_destlist_to_packet(NetSim_PACKET *packet, NETSIM_ID *destlist, UINT count)
NetSim_EVENTDETAILS * pstruEventDetails_Formal
NetSim_EVENTDETAILS char * pszAppPath_Formal
NetSim_EVENTDETAILS char char int nVersion_Type
NetSim_EVENTDETAILS char char * pszWritePath_Formal
NetSim_EVENTDETAILS char char int void ** fnPointer
#define PROTOCOL_APPLICATION
EXPORTED int wireshark_flag
#define DEVICE_TYPE(DeviceId)
NETSIM_IPAddress fn_NetSim_Stack_GetFirstIPAddressAsId(NETSIM_ID nDeviceId, unsigned int type)
EXPORTED struct stru_NetSim_Network * NETWORK
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
NETSIM_IPAddress DNS_QUERY(NETSIM_ID nDeviceId, NETSIM_ID id)
int aes256(char *str, int *len)
#define fn_NetSim_Packet_CreatePacket(layer)
enum enum_Packet_QOS QUALITY_OF_SERVICE
#define fn_NetSim_Packet_FreePacket(pstruPacket)
enum enum_PacketPriority PACKET_PRIORITY
#define fnpAddEvent(pstruEvent)
Structure for Data information such as packet size and inter arrival time,this is applicable for Vane...
Structure to store the COAP application information.
Structure for Erlang_call application.
NetSim_PACKET *** nextPacket
unsigned long long int ** nAppoutevent
Structure for Data information such as packet size and inter arrival time,this is applicable for cust...
Structure to store application information.
NETSIM_IPAddress multicastDestIP
APPLICATION_TYPE nAppType
TRANSMISSION_TYPE nTransmissionType
unsigned long long int nPacketId
structure to store the video application information
Structure for voice information such as packet size, inter arrival time and service type,...
struct stru_NetSim_NetworkLayer * pstruNetworkLayer
unsigned long ulSeed[SEED_COUNT]
struct stru_NetSim_Packet * pPacket
netsimDEVICE_TYPE nDeviceType
struct stru_NetSim_Device ** ppstruDeviceList
APPLICATION_TYPE nAppType
APPLICATION_LAYER_PROTOCOL nApplicationProtocol
NETSIM_IPAddress szDestIP
NETSIM_IPAddress szSourceIP
unsigned short int nSourcePort
unsigned short int nDestinationPort
struct stru_NetSim_Packet_AppLayer * pstruAppData
PACKET_STATUS nPacketStatus
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
unsigned int nControlDataType
struct stru_NetSim_Packet * pstruNextPacket
struct stru_NetSim_Packet_TransportLayer * pstruTransportData
PACKET_PRIORITY nPacketPriority
unsigned char packet[MAXBUF]