NetSim Source Code Help
Loading...
Searching...
No Matches
Packet.h
Go to the documentation of this file.
1/************************************************************************************
2* Copyright (C) 2021 *
3* TETCOS, Bangalore. India *
4* *
5* Tetcos owns the intellectual property rights in the Product and its content. *
6* The copying, redistribution, reselling or publication of any or all of the *
7* Product or its content without express prior written consent of Tetcos is *
8* prohibited. Ownership and / or any other right relating to the software and all *
9* intellectual property rights therein shall remain at all times with Tetcos. *
10* *
11* This source code is licensed per the NetSim license agreement. *
12* *
13* No portion of this source code may be used as the basis for a derivative work, *
14* or used, for any purpose other than its intended use per the NetSim license *
15* agreement. *
16* *
17* This source code and the algorithms contained within it are confidential trade *
18* secrets of TETCOS and may not be used as the basis for any other software, *
19* hardware, product or service. *
20* *
21* Author: Shashi Kant Suman *
22* *
23* ----------------------------------------------------------------------------------*/
24#ifndef _NETSIM_PACKET_H_
25#define _NETSIM_PACKET_H_
26#ifdef __cplusplus
27extern "C" {
28#endif
29/* Enumerator for Suppression model*/
31{
35};
36/* Enumeration for Distribution*/
38{
48};
49/* Enumeration for packet type*/
51{
67};
68/* Enumeration for Service type*/
70{
74};
75
76/* Enumeration for packet priority */
78{
83};
84
85/* Enumeration for QOS class */
87{
93
94 //LTE QoS class
97};
98/* Enumeration for packet status */
100{
107};
108
109/* Enumeration for fragment */
111{
116};
117/* Enumerator for Buffer status */
119{
122};
123
124typedef enum
125{
135
136/*Enumeration for traffic type*/
138{
157
158/* App layer of packet*/
160{
161 int nSegmentId;//Unique id of segment
162 NETSIM_ID nApplicationId; //Unique id of application
164 double dArrivalTime; //Arrival time in application layer
165 double dStartTime; //Start time in application layer
166 double dEndTime; //End time in application layer
167 double dPacketSize; //Packet in app layer
168 double dPayload; //Payload in app layer
169 double dOverhead; //Overhead due to app layer
170 int nAppEndFlag; // 1 for last packet of the application
173 void* Packet_AppProtocol; //Pointer to app layer protocol overhead
174};
175/* Transport layer of packet*/
177{
178 double dArrivalTime; //Arrival time in transport layer
179 double dStartTime; //Start time from transport layer
180 double dEndTime; //End time from transport layer
181 double dPacketSize; //packet size in transport layer
182 double dPayload; //Payload in transport layer
183 double dOverhead; //Overhead due to transport layer
184 unsigned short int nSourcePort; //Source port
185 unsigned short int nDestinationPort; //Destination port
186 TRANSPORT_LAYER_PROTOCOL nTransportProtocol; //Transport layer protocol id
187 void* Packet_TransportProtocol; //Pointer to transport layer overhead
188};
189/* Network layer of packet*/
191{
192 double dArrivalTime; //Arrival time in network layer
193 double dStartTime; //Start time from network layer
194 double dEndTime; //End time from network layer
195 double dPacketSize; //Packet size in network layer
196 double dPayload;//Payload in network layer
197 double dOverhead; //Overhead due to network layer
198 NETSIM_IPAddress szSourceIP;//IP address of source device
199 NETSIM_IPAddress szDestIP;//IP address of dest device
200 NETSIM_IPAddress szGatewayIP; //IP address of the gate way
201 NETSIM_IPAddress szNextHopIp;//IP address of next hop
202 unsigned int nTTL:8; //Time to live
204 NETWORK_LAYER_PROTOCOL nNetworkProtocol; //Network layer protocol id
205 NETWORK_LAYER_PROTOCOL nRoutingProtocol; //Network layer routing protocol
206 void* Packet_NetworkProtocol; //Pointer to network layer overhead
207 void* Packet_RoutingProtocol; //Pointer to routing layer overhead
208 unsigned int nPacketFlag;
210};
211/* Mac layer of packet*/
213{
214 double dArrivalTime; //Arrival time in Mac layer
215 double dStartTime; //Start time from Mac layer
216 double dEndTime; //End time from Mac layer
217 double dPacketSize; //Packet size in Mac layer
218 double dPayload;//payload in Mac layer
219 double dOverhead; //Overhead dur to Mac layer
220 PNETSIM_MACADDRESS szSourceMac;//MAC address of source device
221 PNETSIM_MACADDRESS szDestMac;//MAC address of dest device
222 PNETSIM_MACADDRESS szNextHopMac;//MAC address of next hop
223 MAC_LAYER_PROTOCOL nMACProtocol; //Mac layer protocol id
224 void* Packet_MACProtocol; //Pointer to Mac layer overhead
225 bool dontFree; // Signal other protocol to don't free mac overhead or change
226};
227/* Physical layer of packet*/
229{
230 double dArrivalTime; //Arrival time in Phy layer
231 double dStartTime; //Start time from Phy layer
232 double dEndTime; //End time from Phy layer
233 double dPacketSize; //Packet size in Phy layer
234 double dPayload;//Payload in phy layer
235 double dOverhead; //Overhead due to Phy layer
238 void* Packet_PhyData; //Pointer to phy layer overhead
239};
240
241#define MAXBUF 0x800
242typedef struct stru_packet_info
243{
244 unsigned char packet[MAXBUF];
245 unsigned int packet_len;
246 void* addr;
247 int flag;
248 long long int captureTime;
249 long long int reinjectTime;
251
252#define MAX_PACKET_TYPE_LEN 100
253/* Structure for packet*/
255{
256 long long int nPacketId; //Unique id of packet
257 PACKET_TYPE nPacketType; //Packet type
258 unsigned int nControlDataType; //Control packet type
261 QUALITY_OF_SERVICE nQOS; //Quality of service
262 double dEventTime; //event time
263 NETSIM_ID nSourceId; //Unique id of source
264 void* destInfo;
265 NETSIM_ID nTransmitterId; //Unique id of transmitter (As per IEEE802.11b)
266 NETSIM_ID nReceiverId; //Unique id of receiver (As per IEEE802.11b)
267 //Next hop in Routing (RIP)
268 //Address[n] in DSR
269 PPACKET_INFO szPayload;//Actual payload of packet.
270 void* szOverhead;//Actual overhead of packet.
272 PACKET_STATUS nPacketStatus; //0 - No error, 1- Error, 2- collided, 3- Dropped
273 struct stru_NetSim_Packet_AppLayer* pstruAppData; //App layer details
274 struct stru_NetSim_Packet_TransportLayer* pstruTransportData; //Transport layer details
275 struct stru_NetSim_Packet_NetworkLayer* pstruNetworkData; //Network layer details
276 struct stru_NetSim_Packet_MACLayer* pstruMacData; //MAC layer details
277 struct stru_NetSim_Packet_PhyLayer* pstruPhyData; //Physical layer details
278 struct stru_NetSim_Packet* pstruNextPacket; //Pointer to next packet
279
280 //Function pointer for notification used for lower layer to higher layer notification
281 int (*DropNotification)(struct stru_NetSim_Packet* packet);
283};
284
285/* PACKET API*/
286/*MACROS*/
287# define PACKET_ID(pPacket) (pPacket)->nPacketId
288# define PACKET_SERVICETYPE(pPacket) (pPacket)->nServiceType
289# define PACKET_EVENTTIME(pPacket) (pPacket)->dEventTime
290# define PACKET_SOURCE(pPacket) (pPacket)->nSourceId
291# define PACKET_DESTINATION(pPacket) (pPacket)->nDestinationId
292# define PACKET_TRANSMITTER(pPacket) (pPacket)->nTransmitterId
293# define PACKET_RECEIVER(pPacket) (pPacket)->nReceiverId
294# define PACKET_APPDATA(pPacket) (pPacket)->pstruAppData
295# define PACKET_TRXDATA(pPacket) (pPacket)->pstruTransportData
296# define PACKET_NWDATA(pPacket) (pPacket)->pstruNetworkData
297# define PACKET_MACDATA(pPacket) (pPacket)->pstruMacData
298# define PACKET_PHYDATA(pPacket) (pPacket)->pstruPhyData
299# define PACKET_PHYPROTOCOLDATA(pPacket) PACKET_PHYDATA(pPacket)->Packet_PhyData
300# define PACKET_MACPROTOCOLDATA(pPacket) PACKET_MACDATA(pPacket)->Packet_MACProtocol
301# define PACKET_NWPROTOCOLDATA(pPacket) PACKET_NWDATA(pPacket)->Packet_NetworkProtocol
302# define PACKET_TRXPROTOCOLDATA(pPacket) PACKET_TRXDATA(pPacket)->Packet_TransportProtocol
303# define PACKET_APPPROTOCOLDATA(pPacket) PACKET_APPDATA(pPacket)->Packet_AppProtocol
304# define PACKET_NEXTPACKET(pPacket) (pPacket)->pstruNextPacket
305
306/* PACKET API */
307//Used to create a new packet of any layer
308_declspec(dllexport) NetSim_PACKET* fn_NetSim_Packet_CreatePacket_dbg(int nLayer,int line,const char* file);
309//Used to free mac layer protocol data
311//Used to free the packet
312_declspec(dllexport) int fn_NetSim_Packet_FreePacket_dbg(NetSim_PACKET** pstruPacket,int line,const char* file);
313//Used to add the packet to list
314_declspec(dllexport) int fn_NetSim_Packet_AddPacketToList_dbg(NetSim_BUFFER* pstruBuffer,NetSim_PACKET* pstruPacket, int nInsertionType /* 1- head,2-Tail,3-Order of event time*/,int line,const char* file);
315
316/** Used to check whether any packet is there in buffer or not
317 * Return true if there is a packet in buffer
318 * Return false if there is no packet in buffer
319 */
320_declspec(dllexport) bool fn_NetSim_GetBufferStatus(NetSim_BUFFER* pstruBuffer);
321
322/** Used to get a packet from list
323 * pass nFlag = 1 if want to move buffer
324 * pass nFlag = 0 if don't want to move buffer
325 */
327
328//Used to create error in packet
329_declspec(dllexport) PACKET_STATUS fn_NetSim_Packet_DecideError(double dBER, long double dPacketSize);
330//Used to copy a packet into a new packet
331_declspec(dllexport) NetSim_PACKET* fn_NetSim_Packet_CopyPacket_dbg(const NetSim_PACKET* pstruPacket,int line,const char* file);
332//Used to copy a list of packet
333_declspec(dllexport) NetSim_PACKET* fn_NetSim_Packet_CopyPacketList_dbg(const NetSim_PACKET* pstruPacket,int line,const char* file);
334_declspec(dllexport) int fn_NetSim_Packet_CopyPhyData(NetSim_PACKET* pstruDestPacket,const NetSim_PACKET* pstruSrcPacket,int,const char*);
335//Used to copy mac/data link layer data of a packet to another packet
336_declspec(dllexport) int fn_NetSim_Packet_CopyMacData(NetSim_PACKET* pstruDestPacket,const NetSim_PACKET* pstruSrcPacket,int,const char*);
337//Used to copy network layer data of a packet to another packet
338_declspec(dllexport) int fn_NetSim_Packet_CopyNWData(NetSim_PACKET* pstruDestPacket, NetSim_PACKET* pstruSrcPacket);
339//Used to copy transport layer data of a packet to another packet
340_declspec(dllexport) int fn_NetSim_Packet_CopyTransportData(NetSim_PACKET* pstruDestPacket,const NetSim_PACKET* pstruSrcPacket,int,const char*);
341//Used to copy application layer data of a packet to another packet
342_declspec(dllexport) int fn_NetSim_Packet_CopyAppData(NetSim_PACKET* pstruDestPacket,const NetSim_PACKET* pstruSrcPacket,int,const char*);
343//Used to write packet trace
344_declspec(dllexport) int fn_NetSim_WritePacketTrace_dbg(const NetSim_PACKET* pstruPacket,int line,const char* file);
345//Used to validate a packet
346_declspec(dllexport) int fnValidatePacket(const NetSim_PACKET* pstruPacket);
347//Used to fragment the packet
348_declspec(dllexport) int fn_NetSim_Stack_FragmentPacket(NetSim_PACKET* pstruPacket,int nMSS);
349//Used to get packet size
350_declspec(dllexport) double fnGetPacketSize(NetSim_PACKET* pstruData);
351//Get packet type as string
354
356_declspec(dllexport) unsigned int getPacketInfoSize();
357
358//Destination
360_declspec(dllexport) void add_destlist_to_packet(NetSim_PACKET* packet, NETSIM_ID* destlist, UINT count);
367
368// Send to HWI
370#ifdef __cplusplus
371}
372#endif
373#endif
374
unsigned int NETSIM_ID
Definition: Animation.h:45
#define UINT
Definition: Linux.h:38
#define _declspec(dllexport)
This function is used to trigger the update.
Definition: Linux.h:41
int fnValidatePacket(const NetSim_PACKET *pstruPacket)
double fnGetPacketSize(NetSim_PACKET *pstruData)
bool fn_NetSim_HWI_Send(NetSim_PACKET *packet)
int fn_NetSim_Dispatch_to_emulator(NetSim_PACKET *packet)
NetSim_PACKET * fn_NetSim_Packet_CopyPacket_dbg(const NetSim_PACKET *pstruPacket, int line, const char *file)
enum_Packet_QOS
Definition: Packet.h:87
@ QOS_UGS
Definition: Packet.h:88
@ QOS_BE
Definition: Packet.h:92
@ QOS_GBR
Definition: Packet.h:95
@ QOS_nrtPS
Definition: Packet.h:91
@ QOS_NONGBR
Definition: Packet.h:96
@ QOS_ertPS
Definition: Packet.h:90
@ QOS_rtPS
Definition: Packet.h:89
char * fn_NetSim_Config_GetControlPacketType(const NetSim_PACKET *, char *type)
NetSim_PACKET * fn_NetSim_Packet_CreatePacket_dbg(int nLayer, int line, const char *file)
int fn_NetSim_Stack_FragmentPacket(NetSim_PACKET *pstruPacket, int nMSS)
bool fn_NetSim_GetBufferStatus(NetSim_BUFFER *pstruBuffer)
Definition: Scheduling.c:41
enum_ServiceType
Definition: Packet.h:70
@ ServiceType_CBR
Definition: Packet.h:72
@ ServiceType_VBR
Definition: Packet.h:73
@ ServiceType_NULL
Definition: Packet.h:71
enum_SuppressionModel
Definition: Packet.h:31
@ SuppModel_NULL
Definition: Packet.h:32
@ SuppModel_MarkovChain
Definition: Packet.h:34
@ SuppModel_Deterministics
Definition: Packet.h:33
enum_PacketType
Definition: Packet.h:51
@ PacketType_Erlang_Call
Definition: Packet.h:61
@ PacketType_Video
Definition: Packet.h:56
@ PacketType_EMAIL
Definition: Packet.h:59
@ PacketType_FTP
Definition: Packet.h:57
@ PacketType_BSM
Definition: Packet.h:64
@ PacketType_Sensing
Definition: Packet.h:63
@ PacketType_CBR
Definition: Packet.h:53
@ PacketType_HTTP
Definition: Packet.h:58
@ PacketType_COAP
Definition: Packet.h:65
@ PacketType_Control
Definition: Packet.h:66
@ PacketType_Custom
Definition: Packet.h:54
@ PacketType_Emulation
Definition: Packet.h:62
@ PacketType_Voice
Definition: Packet.h:52
@ PacketType_Peer_to_Peer
Definition: Packet.h:60
@ PacketType_DataBase
Definition: Packet.h:55
NETSIM_ID * get_dest_from_packet(NetSim_PACKET *packet, UINT *count)
#define MAX_PACKET_TYPE_LEN
Definition: Packet.h:252
enum enum_ApplicationType APPLICATION_TYPE
int fn_NetSim_Packet_FreeMacProtocolData(NetSim_PACKET *pstruPacket)
char * fn_NetSim_Config_GetPacketTypeAsString(PACKET_TYPE nPacketType)
NetSim_PACKET * fn_NetSim_Packet_GetPacketFromBuffer(NetSim_BUFFER *pstruBuffer, int nFlag)
enum_Segment
Definition: Packet.h:111
@ Segment_LastFragment
Definition: Packet.h:114
@ Segment_Unfragment
Definition: Packet.h:115
@ Segment_FirstSegment
Definition: Packet.h:112
@ Segment_ContinuingFragment
Definition: Packet.h:113
int fn_NetSim_Packet_AddPacketToList_dbg(NetSim_BUFFER *pstruBuffer, NetSim_PACKET *pstruPacket, int nInsertionType, int line, const char *file)
bool isMulticastPacket(NetSim_PACKET *packet)
struct stru_packet_info * PPACKET_INFO
NETSIM_ID get_first_dest_from_packet(NetSim_PACKET *packet)
bool isBroadcastPacket(NetSim_PACKET *packet)
IP_PROTOCOL_NUMBER
Definition: Packet.h:125
@ IPPROTOCOL_ICMP
Definition: Packet.h:127
@ IPPROTOCOL_OSPF
Definition: Packet.h:132
@ IPPROTOCOL_UDP
Definition: Packet.h:130
@ IPPROTOCOL_PIM
Definition: Packet.h:133
@ IPPROTOCOL_IGMP
Definition: Packet.h:128
@ IPPROTOCOL_DSR
Definition: Packet.h:131
@ IPPROTOCOL_TCP
Definition: Packet.h:129
@ IPPROTOCOL_NULL
Definition: Packet.h:126
enum_BUFFER
Definition: Packet.h:119
@ Buffer_Underflow
Definition: Packet.h:120
@ Buffer_Overflow
Definition: Packet.h:121
int fn_NetSim_WritePacketTrace_dbg(const NetSim_PACKET *pstruPacket, int line, const char *file)
enum_ApplicationType
Definition: Packet.h:138
@ TRAFFIC_CUSTOM
Definition: Packet.h:147
@ TRAFFIC_SENSOR_EMULATION
Definition: Packet.h:154
@ TRAFFIC_EMAIL
Definition: Packet.h:148
@ TRAFFIC_DATA
Definition: Packet.h:140
@ TRAFFIC_COAP
Definition: Packet.h:155
@ TRAFFIC_NULL
Definition: Packet.h:139
@ TRAFFIC_VIDEO
Definition: Packet.h:143
@ TRAFFIC_VOICE
Definition: Packet.h:142
@ TRAFFIC_SENSING
Definition: Packet.h:152
@ TRAFFIC_FTP
Definition: Packet.h:144
@ TRAFFIC_DATABASE
Definition: Packet.h:146
@ TRAFFIC_HTTP
Definition: Packet.h:145
@ TRAFFIC_CBR
Definition: Packet.h:141
@ TRAFFIC_BSM_APP
Definition: Packet.h:153
@ TRAFFIC_PEER_TO_PEER
Definition: Packet.h:149
@ TRAFFIC_EMULATION
Definition: Packet.h:151
@ TRAFFIC_ERLANG_CALL
Definition: Packet.h:150
void add_destlist_to_packet(NetSim_PACKET *packet, NETSIM_ID *destlist, UINT count)
bool isDestFoundinPacket(NetSim_PACKET *packet, NETSIM_ID dest)
struct stru_packet_info PACKET_INFO
void remove_dest_from_packet(NetSim_PACKET *packet, NETSIM_ID dest)
int fn_NetSim_Packet_CopyMacData(NetSim_PACKET *pstruDestPacket, const NetSim_PACKET *pstruSrcPacket, int, const char *)
int fn_NetSim_Packet_FreePacket_dbg(NetSim_PACKET **pstruPacket, int line, const char *file)
#define MAXBUF
Definition: Packet.h:241
void add_dest_to_packet(NetSim_PACKET *packet, NETSIM_ID dest)
PACKET_STATUS fn_NetSim_Packet_DecideError(double dBER, long double dPacketSize)
enum_Distribution
Definition: Packet.h:38
@ Distribution_Triangular
Definition: Packet.h:42
@ Distribution_NULL
Definition: Packet.h:39
@ Distribution_Exponential
Definition: Packet.h:40
@ Distribution_Weibull
Definition: Packet.h:43
@ Distribution_Backlog
Definition: Packet.h:45
@ Distribution_Constant
Definition: Packet.h:44
@ Distribution_Normal
Definition: Packet.h:46
@ Distribution_Gamma
Definition: Packet.h:47
@ Distribution_Uniform
Definition: Packet.h:41
unsigned int getPacketInfoSize()
int fn_NetSim_Packet_CopyPhyData(NetSim_PACKET *pstruDestPacket, const NetSim_PACKET *pstruSrcPacket, int, const char *)
enum_PacketPriority
Definition: Packet.h:78
@ Priority_Normal
Definition: Packet.h:80
@ Priority_High
Definition: Packet.h:82
@ Priority_Low
Definition: Packet.h:79
@ Priority_Medium
Definition: Packet.h:81
int fn_NetSim_Packet_CopyAppData(NetSim_PACKET *pstruDestPacket, const NetSim_PACKET *pstruSrcPacket, int, const char *)
int fn_NetSim_Packet_CopyNWData(NetSim_PACKET *pstruDestPacket, NetSim_PACKET *pstruSrcPacket)
int fn_NetSim_Packet_CopyTransportData(NetSim_PACKET *pstruDestPacket, const NetSim_PACKET *pstruSrcPacket, int, const char *)
enum_PacketStatus
Definition: Packet.h:100
@ PacketStatus_Error
Definition: Packet.h:102
@ PacketStatus_TTL_Expired
Definition: Packet.h:105
@ PacketStatus_NoError
Definition: Packet.h:101
@ PacketStatus_Collided
Definition: Packet.h:103
@ PacketStatus_Dropped
Definition: Packet.h:106
@ PacketStatus_Buffer_Dropped
Definition: Packet.h:104
NetSim_PACKET * fn_NetSim_Packet_CopyPacketList_dbg(const NetSim_PACKET *pstruPacket, int line, const char *file)
enum enum_MACProtocol MAC_LAYER_PROTOCOL
Definition: main.h:134
enum enum_Packet_QOS QUALITY_OF_SERVICE
Definition: main.h:127
enum enum_PacketStatus PACKET_STATUS
Definition: main.h:128
enum enum_ServiceType SERVICE_TYPE
Definition: main.h:125
enum enum_NWProtocol NETWORK_LAYER_PROTOCOL
Definition: main.h:133
enum enum_PacketType PACKET_TYPE
Definition: main.h:123
enum enum_PacketPriority PACKET_PRIORITY
Definition: main.h:126
enum enum_PhyMedium PHYSICAL_LAYER_MEDIUM
Definition: main.h:135
enum enum_Segment PACKET_FRAGMENT
Definition: main.h:129
enum enum_TrxProtocol TRANSPORT_LAYER_PROTOCOL
Definition: main.h:132
enum enum_AppProtocol APPLICATION_LAYER_PROTOCOL
Definition: main.h:131
PACKET_FRAGMENT nPacketFragment
Definition: Packet.h:163
APPLICATION_TYPE nAppType
Definition: Packet.h:171
APPLICATION_LAYER_PROTOCOL nApplicationProtocol
Definition: Packet.h:172
MAC_LAYER_PROTOCOL nMACProtocol
Definition: Packet.h:223
PNETSIM_MACADDRESS szNextHopMac
Definition: Packet.h:222
PNETSIM_MACADDRESS szDestMac
Definition: Packet.h:221
PNETSIM_MACADDRESS szSourceMac
Definition: Packet.h:220
struct stru_NetSim_Packet_NetworkLayer * next
Definition: Packet.h:209
NETWORK_LAYER_PROTOCOL nRoutingProtocol
Definition: Packet.h:205
NETSIM_IPAddress szGatewayIP
Definition: Packet.h:200
IP_PROTOCOL_NUMBER IPProtocol
Definition: Packet.h:203
NETWORK_LAYER_PROTOCOL nNetworkProtocol
Definition: Packet.h:204
NETSIM_IPAddress szDestIP
Definition: Packet.h:199
NETSIM_IPAddress szNextHopIp
Definition: Packet.h:201
NETSIM_IPAddress szSourceIP
Definition: Packet.h:198
PACKET_STATUS nPacketErrorFlag
Definition: Packet.h:236
PHYSICAL_LAYER_MEDIUM nPhyMedium
Definition: Packet.h:237
TRANSPORT_LAYER_PROTOCOL nTransportProtocol
Definition: Packet.h:186
unsigned short int nSourcePort
Definition: Packet.h:184
unsigned short int nDestinationPort
Definition: Packet.h:185
long long int nPacketId
Definition: Packet.h:256
struct stru_NetSim_Packet_AppLayer * pstruAppData
Definition: Packet.h:273
void * szOverhead
Definition: Packet.h:270
PACKET_STATUS nPacketStatus
Definition: Packet.h:272
struct stru_NetSim_Packet_PhyLayer * pstruPhyData
Definition: Packet.h:277
char szPacketType[MAX_PACKET_TYPE_LEN]
Definition: Packet.h:271
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
Definition: Packet.h:275
void * destInfo
Definition: Packet.h:264
int(* ReceiveAckNotification)(struct stru_NetSim_Packet *ack)
Definition: Packet.h:282
double dEventTime
Definition: Packet.h:262
NETSIM_ID nReceiverId
Definition: Packet.h:266
unsigned int nControlDataType
Definition: Packet.h:258
struct stru_NetSim_Packet * pstruNextPacket
Definition: Packet.h:278
NETSIM_ID nTransmitterId
Definition: Packet.h:265
QUALITY_OF_SERVICE nQOS
Definition: Packet.h:261
PACKET_TYPE nPacketType
Definition: Packet.h:257
int(* DropNotification)(struct stru_NetSim_Packet *packet)
Definition: Packet.h:281
struct stru_NetSim_Packet_TransportLayer * pstruTransportData
Definition: Packet.h:274
PPACKET_INFO szPayload
Definition: Packet.h:269
PACKET_PRIORITY nPacketPriority
Definition: Packet.h:260
SERVICE_TYPE nServiceType
Definition: Packet.h:259
NETSIM_ID nSourceId
Definition: Packet.h:263
struct stru_NetSim_Packet_MACLayer * pstruMacData
Definition: Packet.h:276
unsigned char packet[MAXBUF]
Definition: Packet.h:244
long long int captureTime
Definition: Packet.h:248
unsigned int packet_len
Definition: Packet.h:245
long long int reinjectTime
Definition: Packet.h:249
void * addr
Definition: Packet.h:246