24#ifndef _NETSIM_APPLICATION_H_
25#define _NETSIM_APPLICATION_H_
33#define roundoff(d) ((long)(d+0.5))
37#define VANET_APP_RANDOM_WAIT_TIME_DEFAULT 5*MILLISECOND
38#define RANDOM_STARTUP_DELAY 0.1*SECOND
94#define SOCKETINFO_ALLOC() (struct stru_SocketInfo*)list_alloc(sizeof(struct stru_SocketInfo),offsetof(struct stru_SocketInfo,ele))
194"FIRST_ORDER_DEPENDENT_GAUSSIAN",
"H_261",
"H_263",
"MPEG1_Low_Res",
195"MPEG1_High_Res",
"MPEG2_Low_Res",
"MPEG2_High_Res",
"BUFFERED_VIDEO_STREAMING_1",
196"BUFFERED_VIDEO_STREAMING_2",
"BUFFERED_VIDEO_STREAMING_3",
197"BUFFERED_VIDEO_STREAMING_4",
"BUFFERED_VIDEO_STREAMING_5",
198"BUFFERED_VIDEO_STREAMING_6",
"Unknown"};
344 double ldArrivalTime,
348 unsigned long long int nPacketId,
351 unsigned int sourcePort,
352 unsigned int destPort);
362 unsigned long *uSeed,
unsigned long *uSeed1,
double* args);
365_declspec(dllexport)
int fnRandomNo(
long lm,
double *fRandNo,
unsigned long *uSeed,
unsigned long *uSeed1);
383 unsigned long* uSeed,
384 unsigned long* uSeed1);
390 unsigned long* uSeed,
391 unsigned long* uSeed1);
400 unsigned long* uSeed,
401 unsigned long* uSeed1);
426 unsigned long* uSeed,
427 unsigned long* uSeed1,
428 unsigned long* uSeed2,
429 unsigned long* uSeed3);
446 unsigned long* uSeed,
447 unsigned long* uSeed1,
448 unsigned long* uSeed2,
449 unsigned long* uSeed3);
486int aes256(
char* str,
int* len);
487int des(
char* buf,
int* len);
void P2P_create_socket(ptrAPPLICATION_INFO appInfo, NETSIM_ID src, NETSIM_ID dest)
char xor_encrypt(char ch, long key)
void add_multicast_route(ptrAPPLICATION_INFO info)
ptrAPPLICATION_INFO get_email_app_info(void *detail)
int fn_NetSim_Application_StartVoiceAPP(ptrAPPLICATION_INFO appInfo, double time)
int fn_NetSim_Application_GenerateNextPacket(ptrAPPLICATION_INFO appInfo, NETSIM_ID nSource, UINT destCount, NETSIM_ID *nDestination, double time)
bool nApplicationThroughputPlotRealTime
int fn_NetSim_Application_StartErlangCallAPP(ptrAPPLICATION_INFO appInfo, double time)
void fn_NetSim_Emulation_StartApplication(ptrAPPLICATION_INFO appInfo)
int fn_NetSim_Application_StartP2PAPP(ptrAPPLICATION_INFO appInfo, double time)
struct stru_Application_P2P_SeederList SEEDER_LIST
Structure for Seeder list of peer_to_peer traffic.
APP_CONTROL_PACKET
Enumeration for application control packets.
int fn_NetSim_Application_StartBSM(ptrAPPLICATION_INFO appInfo, double time)
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)
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_StartHTTPAPP(ptrAPPLICATION_INFO appInfo, double time)
ptrAPPLICATION_INFO * applicationInfo
int fn_NetSim_Application_P2P_InitPeers(ptrAPPLICATION_INFO appInfo)
int fn_NetSim_Application_P2P_GenerateFile(ptrAPPLICATION_INFO appInfo)
void appmetrics_src_add(ptrAPPLICATION_INFO appInfo, _In_ NetSim_PACKET *packet)
int fn_NetSim_TrafficGenerator_Video(APP_VIDEO_INFO *info, double *fPacketSize, double *ldArrival, unsigned long *uSeed, unsigned long *uSeed1)
int fn_NetSim_Application_COAP_ProcessRequest(ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
int fn_NetSim_Application_StartCOAPAPP(ptrAPPLICATION_INFO appInfo, double time)
@ VidModel_BUFFERED_VIDEO_STREAMING_4
@ VidModel_BUFFERED_VIDEO_STREAMING_6
@ VidModel_FIRST_ORDER_DEPENDENT_GAUSSIAN
@ VidModel_BUFFERED_VIDEO_STREAMING_2
@ VidModel_MPEG2_High_Res
@ VidModel_BUFFERED_VIDEO_STREAMING_1
@ VidModel_MPEG1_High_Res
@ VidModel_BUFFERED_VIDEO_STREAMING_5
@ VidModel_INDEPENDENT_GAUSSIAN
@ VidModel_BUFFERED_VIDEO_STREAMING_3
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_StartVideoAPP(ptrAPPLICATION_INFO appInfo, double time)
int fn_NetSim_Application_ErlangCall_EndCall(NetSim_EVENTDETAILS *pstruEventDetails)
int fn_NetSim_Application_P2P_SendNextPiece(ptrAPPLICATION_INFO appInfo, NETSIM_ID destination, double time)
struct stru_Application_Info APPLICATION_INFO
Structure to store application information.
int fnCreateSocketBuffer(ptrAPPLICATION_INFO appInfo)
char * szApplicationThroughputPlotVal
int fn_NetSim_Application_P2P_MarkReceivedPacket(ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
static const char * strVIDEOMODEL[]
PACKET_TYPE fn_NetSim_Application_GetPacketTypeBasedOnApplicationType(APPLICATION_TYPE nAppType)
APP_STATE
Enumeration for application state.
struct stru_email_detail DETAIL
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_Application_StartDataAPP(ptrAPPLICATION_INFO appInfo, double time)
int fn_NetSim_Application_ConfigureP2PTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int fn_NetSim_Application_ConfigureVoiceTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int fn_NetSim_TrafficGenerator_Voice(APP_VOICE_INFO *info, double *fSize, double *ldArrival, unsigned long *uSeed, unsigned long *uSeed1)
void join_multicast_group(ptrAPPLICATION_INFO info, double time)
int fnDistribution(DISTRIBUTION nDistributionType, double *fDistOut, unsigned long *uSeed, unsigned long *uSeed1, double *args)
struct stru_Application_BSMInfo APP_BSM_INFO
Structure for Data information such as packet size and inter arrival time,this is applicable for Vane...
void fnCreatePort(ptrAPPLICATION_INFO info)
int fn_NetSim_App_RestartApplication()
int fn_NetSim_Application_ConfigureVideoTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
struct stru_Application_Info * ptrAPPLICATION_INFO
int fn_NetSim_Application_ConfigureDatabaseTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
void appmetrics_dest_add(ptrAPPLICATION_INFO appInfo, NetSim_PACKET *packet, NETSIM_ID dest)
int fn_NetSim_Application_ConfigureHTTPTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int fn_NetSim_TrafficGenerator_MPEGVideo(APP_VIDEO_INFO *info, double *fPacketSize, double *ldArrival, unsigned long *uSeed, unsigned long *uSeed1)
ptrAPPLICATION_INFO fn_NetSim_Application_Email_GenerateNextPacket(DETAIL *detail, NETSIM_ID nSourceId, NETSIM_ID nDestinationId, double time)
int fnRandomNo(long lm, double *fRandNo, unsigned long *uSeed, unsigned long *uSeed1)
int fn_NetSim_Application_ConfigureDataTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int des(char *buf, int *len)
int fn_NetSim_Application_StartEmailAPP(ptrAPPLICATION_INFO appInfo, double time)
int fn_NetSim_Application_ConfigureCOAPTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
struct stru_Application_BSMInfo * PAPP_BSM_INFO
int fn_NetSim_Application_ConfigureEmulationTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int fn_NetSim_Application_Metrics_F(PMETRICSWRITER metricsWriter)
int fn_NetSim_Application_P2P_InitSeederList(ptrAPPLICATION_INFO appInfo)
PNETSIMPLOT * applicationThroughputPlots
int fn_NetSim_Application_Init_F()
bool add_sae_j2735_payload(NetSim_PACKET *packet, ptrAPPLICATION_INFO info)
bool nApplicationThroughputPlotFlag
APP_EVENT
Enumeration for application events.
int fn_NetSim_Application_ConfigureFTPTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int fn_NetSim_Add_DummyPayload(NetSim_PACKET *packet, ptrAPPLICATION_INFO)
struct stru_Application_p2P_PeerList PEER_LIST
Structure for peer list of peer_to_peer traffic.
int fn_NetSim_Application_ConfigureEmailTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
int fn_NetSim_Application_Plot(NetSim_PACKET *pstruPacket)
int fn_NetSim_Application_ConfigureMPEGVideo(APP_VIDEO_INFO *info, void *xmlNetSimNode)
void free_app_metrics(ptrAPPLICATION_INFO appInfo)
int aes256(char *str, int *len)
ptrSOCKETINTERFACE fnGetSocket(NETSIM_ID nAppId, NETSIM_ID nSourceId, NETSIM_ID nSourcePort, NETSIM_ID nDestPort)
int fn_NetSim_Application_ConfigureErlangCallTraffic(ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
void process_saej2735_packet(NetSim_PACKET *packet)
#define _declspec(dllexport)
This function is used to trigger the update.
enum enum_ApplicationType APPLICATION_TYPE
#define PROTOCOL_APPLICATION
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
enum enum_TransmissionType TRANSMISSION_TYPE
enum enum_Packet_QOS QUALITY_OF_SERVICE
enum enum_Distribution DISTRIBUTION
enum enum_ServiceType SERVICE_TYPE
enum enum_PacketType PACKET_TYPE
enum enum_SuppressionModel SUPPRESSION_MODEL
enum enum_TrxProtocol TRANSPORT_LAYER_PROTOCOL
enum enum_AppProtocol APPLICATION_LAYER_PROTOCOL
Structure for Data information such as packet size and inter arrival time,this is applicable for Vane...
DISTRIBUTION IATDistribution
DISTRIBUTION packetSizeDistribution
Structure to store the COAP application information.
DISTRIBUTION pageIATDistribution
struct stru_NetSim_COAP_data * pCOAPData
DISTRIBUTION pageSizeDistribution
Structure for Erlang_call application.
DISTRIBUTION callDurationDistribution
unsigned long long int ** nEventId
DISTRIBUTION callIATDistribution
NetSim_PACKET *** nextPacket
int(* fn_BlockCall)(ptrAPPLICATION_INFO appInfo, NETSIM_ID nSourceId, NETSIM_ID nDestinationId, double time)
unsigned long long int ** nAppoutevent
Structure for Data information such as packet size and inter arrival time,this is applicable for cust...
DISTRIBUTION IATDistribution
DISTRIBUTION packetSizeDistribution
DISTRIBUTION durationDistribution
DISTRIBUTION sizeDistribution
Structure to store email application information.
struct stru_Application_EMAILInfo::stru_emailinfo SEND
struct stru_Application_EMAILInfo::stru_emailinfo RECEIVE
Structure to store the emulation application information.
NETSIM_ID nDestinationPort
NETSIM_IPAddress simDestIP
NETSIM_IPAddress realDestIP
NETSIM_IPAddress * realSourceIP
NETSIM_IPAddress * simSourceIP
Structure to store the HTTP application information.
DISTRIBUTION pageIATDistribution
DISTRIBUTION pageSizeDistribution
Structure to store application information.
NETSIM_IPAddress multicastDestIP
APPLICATION_TYPE nAppType
APPLICATION_LAYER_PROTOCOL protocol
struct stru_SocketInfo * socketInfo
TRANSPORT_LAYER_PROTOCOL trxProtocol
unsigned int nSourceCount
TRANSMISSION_TYPE nTransmissionType
NETSIM_ID applicationInstanceCount
unsigned long long int nPacketId
Structure for Seeder list of peer_to_peer traffic.
unsigned int nSeederCount
Structure fot peer_to_peer application.
NetSim_PACKET ** pieceList
SEEDER_LIST ** seederList
DISTRIBUTION fizeSizeDistribution
structure to store the video application information
DISTRIBUTION IATDistribution
DISTRIBUTION packetSizeDistribution
Structure for voice information such as packet size, inter arrival time and service type,...
SERVICE_TYPE nServiceType
SUPPRESSION_MODEL nSuppressionModel
DISTRIBUTION packetSizeDistribution
DISTRIBUTION IATDistribution
Structure for peer list of peer_to_peer traffic.
unsigned int yetToReceiveCount
Structure to store socket information.
NETSIM_ID * nDestinationId
ptrAPPLICATION_INFO appInfo