NetSim Source Code Help
Loading...
Searching...
No Matches
Cellular.c
Go to the documentation of this file.
1/************************************************************************************
2 * Copyright (C) 2020 *
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 * Author: Shashi Kant Suman *
12 * *
13 * ---------------------------------------------------------------------------------*/
14#include "main.h"
15#include "Cellular.h"
16#include "../Application/Application.h"
17/**
18This function is called by NetworkStack.dll, whenever the event gets triggered
19inside the NetworkStack.dll for CDMA or GSM protocols. This is the main function for GSM / CDMA.
20It processes MAC_OUT,MAC_IN, PHYSICAL_OUT, PHYSICAL_IN and TIMER events for mobile station
21and base station.
22 */
24{
26 {
27 case MAC_OUT_EVENT:
28 {
30 {
31 case MOBILESTATION:
32 {
34 do
35 {
40 else
41 {
44 }
45 }while(fn_NetSim_GetBufferStatus(buffer));
46 }
47 break;
48 }
49 }
50 break;
51 case MAC_IN_EVENT:
52 {
54 {
55 case MOBILESTATION:
56 {
58 switch(packet->nControlDataType)
59 {
66 break;
70 break;
76 break;
79 {
81 if(MSMac->pstruAllocatedChannel)
85 MSMac->nApplicationId=0;
86 MSMac->nSourceFlag=0;
88 }
89 break;
93 break;
94 default:
96 break;
97 }
98 }
99 break;
100 case BASESTATION:
101 {
103 {
105 switch(packet->nControlDataType)
106 {
114 break;
118 break;
119 default:
121 break;
122 }
123 }
124 else
125 {
127 {
128 int flag=0;
133 {
139 }
140 else
141 {
142 //Drop the packet
144 }
145 }
146 else
147 {
153 }
154 }
155 }
156 break;
157 case MSC:
158 {
160 }
161 break;
162 }
163 }
164 break;
166 {
168 {
169 case MOBILESTATION:
170 {
172 }
173 break;
174 case BASESTATION:
179 else
180 {
182 }
183 break;
184 case MSC:
186 break;
187 }
188 }
189 break;
191 {
194 }
195 break;
196 case TIMER_EVENT:
197 {
199 {
203 break;
206 {
213 }
214 break;
215 default:
216 fnNetSimError("Unknown timer event for cellular protocol");
217 break;
218 }
219 }
220 break;
221 default:
222 fnNetSimError("Unknown event type for cellular protocol");
223 break;
224 }
225 return 1;
226}
227/**
228This function is used to allocate the channels.
229Channel allocation deals with the allocation of channels to cells in a cellular network.
230Once the channels are allocated, cells may then allow users within the cell to communicate
231via the available channels.
232*/
234{
235 Cellular_CHANNEL_RESPONSE* response=calloc(1,sizeof* response);
237 Cellular_CHANNEL_REQUEST* request=gsmPacket->controlData;
239 Cellular_CHANNEL* channel=BSMac->pstruChannelList;
240 NetSim_PACKET* returnPacket;
241 unsigned int nPacketType;
242 while(channel)
243 {
244 if(channel->nAllocationFlag == 0 &&
246 {
247 channel->nAllocationFlag=1;
248 channel->nApplicationId=request->nApplicationId;
249 channel->nMSId=request->nMSId;
250 channel->nDestId=request->nDestId;
251 break;
252 }
253 channel=channel->pstru_NextChannel;
254 }
255
256 if(channel)
257 {
258 response->channel=channel;
259 response->nAllocationFlag=1;
261 }
262 else
263 {
264 response->channel=calloc(1,sizeof* response->channel);
265 response->channel->nApplicationId=request->nApplicationId;
266 response->channel->nMSId=request->nMSId;
267 response->channel->nDestId=request->nDestId;
269 }
271 nPacketType,
273 request->nMSId,
274 1,
276 gsmPacket=calloc(1,sizeof* gsmPacket);
277 gsmPacket->controlData=response;
278 returnPacket->pstruMacData->Packet_MACProtocol=gsmPacket;
280 pstruEventDetails->pPacket=returnPacket;
282 return 1;
283}
284/**
285This functio is called to perform the channel response functionality
286This function determines if the call is accepted or rejected based on channel availability
287*/
289{
292 Cellular_CHANNEL_RESPONSE* response=gsmPacket->controlData;
293 if(response->nAllocationFlag==1 && MSMac->nMSStatusFlag==Status_ChannelRequested)
294 {
295 NetSim_PACKET* packet;
296 Cellular_PACKET* gsmPacket;
297 Cellular_CHANNEL* channel=response->channel;
298 MSMac->pstruAllocatedChannel=channel;
301 channel->nMSId,
302 channel->nDestId,
303 1,
305 gsmPacket=calloc(1,sizeof* gsmPacket);
306 gsmPacket->nApplicationId=channel->nApplicationId;
307 packet->pstruMacData->Packet_MACProtocol=gsmPacket;
318 }
320 {
321 //Generate call accepted message
322 NetSim_PACKET* packet;
323 Cellular_PACKET* gsmPacket;
324 Cellular_CHANNEL* channel=response->channel;
325 MSMac->pstruAllocatedChannel=channel;
328 channel->nMSId,
329 channel->nDestId,
330 1,
332 gsmPacket=calloc(1,sizeof* gsmPacket);
333 gsmPacket->nApplicationId=channel->nApplicationId;
334 gsmPacket->nTimeSlot=channel->nTimeSlot;
335 packet->pstruMacData->Packet_MACProtocol=gsmPacket;
345 MSMac->MSMetrics.nCallAccepted++;
346 }
348 {
350 }
351 else if(response->nAllocationFlag==0 && MSMac->nMSStatusFlag==Status_ChannelRequested)
352 {
353 unsigned int nProtocol=pstruEventDetails->nProtocolId;
354 Cellular_CHANNEL* channel=response->channel;
355 NetSim_PACKET* packet=MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1];
357 APP_CALL_INFO* info=appInfo[packet->pstruAppData->nApplicationId-1]->appData;
358 info->fn_BlockCall(appInfo[packet->pstruAppData->nApplicationId-1],
359 packet->nSourceId,
363 while(packet)
364 {
365 NetSim_PACKET* temp=packet->pstruNextPacket;
367 packet=temp;
368 }
369 MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1]=NULL;
371 MSMac->nSourceFlag=0;
372 MSMac->nApplicationId=0;
373 MSMac->MSMetrics.nCallBlocked++;
374 }
376 {
377 //Generate call rejected message
378 NetSim_PACKET* packet;
379 Cellular_PACKET* gsmPacket;
380 Cellular_CHANNEL* channel=response->channel;
381 MSMac->pstruAllocatedChannel=NULL;
384 channel->nMSId,
385 channel->nDestId,
386 1,
388 gsmPacket=calloc(1,sizeof* gsmPacket);
389 gsmPacket->nApplicationId=channel->nApplicationId;
390 gsmPacket->nTimeSlot=0;
391 packet->pstruMacData->Packet_MACProtocol=gsmPacket;
401 MSMac->nApplicationId=0;
402 MSMac->MSMetrics.nCallRejected++;
403 }
404 else if(MSMac->nMSStatusFlag==Status_CallEnd)
405 {
406 //Free the channel
407 Cellular_CHANNEL* channel=response->channel;
408 channel->nAllocationFlag=0;
409 channel->nApplicationId=0;
410 channel->nDestId=0;
411 channel->nMSId=0;
413 }
414 else
415 {
416 //assert(false);//Unknown condition
417 }
418 return 1;
419}
420/**
421This functio is called to forward the packet to the MSC
422*/
424{
428 return 0;
429}
430/**
431This function is used to tranmit packet on wired link
432*/
433
435{
436 NETSIM_ID nConnectedDevice,nConnectedInterface,nLinkId;
437 double dDataRate;
441 &(nConnectedDevice),
442 &(nConnectedInterface));
448 packet->nReceiverId=nConnectedDevice;
450 pstruEventDetails->nDeviceId=nConnectedDevice;
451 pstruEventDetails->nDeviceType=DEVICE_TYPE(nConnectedDevice);
453 pstruEventDetails->nInterfaceId=nConnectedInterface;
455 //Call packet trace function
457 fn_NetSim_Metrics_Add(packet);
458 return 1;
459}
460/**
461The VisitorLocationRegister(VLR) contains a copy of most of the data stored at the HomeLocationRegister(HLR). It is, however,
462temporary data which exists for only as long as the subscriber is “active”
463in the particular area covered by the VLR. The VLR provides a local database for
464the subscribers wherever they are physically located within a PLMN, this may or may not
465be the “home” system. This function eliminates the need for excessive and time-consuming
466references to the “home” HLR database.
467
468*/
469int fn_NetSim_Cellular_VLR(NETSIM_ID nMSCId,NETSIM_ID nId,NETSIM_ID* nBTSId,NETSIM_ID* nInterfaceId)
470{
471 DEVVAR_MSC* devVar=NETWORK->ppstruDeviceList[nMSCId-1]->deviceVar;
472 if(devVar->VLRList[nId-1])
473 {
474 *nBTSId=devVar->VLRList[nId-1]->nBTSId;
475 *nInterfaceId=devVar->VLRList[nId-1]->nInterfaceId;
476 }
477 else
478 {
479 *nBTSId=0;
480 *nInterfaceId=0;
481 }
482 return 0;
483}
484/** This function is used to process the packet at the MSC */
486{
487 NETSIM_ID nBTSId,nInterfaceId;
489 NETSIM_ID nSourceId=packet->nSourceId;
490 NETSIM_ID nDestinationId= get_first_dest_from_packet(packet);
491 //Contact VLR list
492 fn_NetSim_Cellular_VLR(pstruEventDetails->nDeviceId,nDestinationId,&nBTSId,&nInterfaceId);
493 if(nBTSId)
494 {
496 packet->nReceiverId=nBTSId;
497 pstruEventDetails->nInterfaceId=nInterfaceId;
500 }
501 else
502 assert(false);
503 return 1;
504}
505/** This function is used to process the call request at the mobile station */
507{
510 NETSIM_ID nSouceId= get_first_dest_from_packet(packet);
511 NETSIM_ID nDestId=packet->nSourceId;
514 {
515 NetSim_PACKET* request;
516 Cellular_PACKET* gsmPacket=calloc(1,sizeof* gsmPacket);
517 Cellular_CHANNEL_REQUEST* requestData=calloc(1,sizeof* requestData);
519 MSMac->nApplicationId=((Cellular_PACKET*)packet->pstruMacData->Packet_MACProtocol)->nApplicationId;
523 MSMac->nBTSId,
524 1,
526 request->pstruMacData->Packet_MACProtocol=gsmPacket;
527 gsmPacket->controlData=requestData;
528 requestData->nApplicationId=((Cellular_PACKET*)packet->pstruMacData->Packet_MACProtocol)->nApplicationId;;
529 requestData->nMSId=pstruEventDetails->nDeviceId;
530 requestData->nDestId=nDestId;
532 //Add packet to physical out
536 pstruEventDetails->pPacket=request;
540 }
541 else
542 {
543 //Call rejected
544 //Generate call rejected message
545 NetSim_PACKET* response;
546 Cellular_PACKET* gsmPacket;
550 packet->nSourceId,
551 1,
553 gsmPacket = calloc(1, sizeof* gsmPacket);
554 gsmPacket->nApplicationId = ((Cellular_PACKET*)packet->pstruMacData->Packet_MACProtocol)->nApplicationId;
555 gsmPacket->nTimeSlot=0;
556 response->pstruMacData->Packet_MACProtocol=gsmPacket;
563 pstruEventDetails->pPacket=response;
565 MSMac->MSMetrics.nCallRejected++;
566 }
567 return 1;
568}
569/** This function is used to process the call response at the mobile station */
571{
574 {
577 {
579 NetSim_PACKET* packet=MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1];
581 MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1] = MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1]->pstruNextPacket;
586 else
587 packet->pstruMacData->dOverhead=0;
590 gsmPacket=packet->pstruMacData->Packet_MACProtocol;
591 gsmPacket->nTimeSlot=channel->nTimeSlot;
592 //Write physical out event
599 //Free old packet
603 }
604 break;
607 {
609 unsigned int nProtocol=pstruEventDetails->nProtocolId;
612 double time=pstruEventDetails->dEventTime;
614 NetSim_PACKET* packet=MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1];
616 APP_CALL_INFO* info=appInfo[packet->pstruAppData->nApplicationId-1]->appData;
617 info->fn_BlockCall(appInfo[packet->pstruAppData->nApplicationId-1],
618 packet->nSourceId,
622 fn_NetSim_Cellular_MS_SendChannelRelease(channel,nMSId,nMSInterface,time);
623 while(packet)
624 {
625 NetSim_PACKET* temp=packet->pstruNextPacket;
627 packet=temp;
628 }
629 MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1]=NULL;
631 MSMac->MSMetrics.nCallBlocked++;
633 }
634 break;
635 }
636 return 1;
637}
638/** This function runs at base station to assign the time slots */
640{
642 NETSIM_ID nApplicationId=gsmPacket->nApplicationId;
643 gsmPacket->nTimeSlot=0;
644 if(!nApplicationId)
645 {
646 assert(false);
647 }
648 else
649 {
650 Cellular_BS_MAC* BSMac=DEVICE_MACVAR(nBTSId,1);
651 Cellular_CHANNEL* channel=BSMac->pstruChannelList;
652 while(channel)
653 {
654 if(channel->nAllocationFlag==1 && channel->nApplicationId==nApplicationId
655 && channel->nMSId == get_first_dest_from_packet(packet))
656 {
657 gsmPacket->nTimeSlot=channel->nTimeSlot;
658 break;
659 }
660 channel=channel->pstru_NextChannel;
661 }
662 }
663 return 1;
664}
665/** This function is used by the mobile station to send the request for channel release to the base station */
667{
668 Cellular_MS_MAC* MSMac=DEVICE_MACVAR(nMSId,nMSInterface);
671 channel->nMSId,
672 MSMac->nBTSId,
673 1,
675 Cellular_PACKET* gsmPacket=calloc(1,sizeof* gsmPacket);
676 gsmPacket->nApplicationId=channel->nApplicationId;
677 gsmPacket->nTimeSlot=0;
678 packet->pstruMacData->Packet_MACProtocol=gsmPacket;
679 //Write physical out event
686 pstruEventDetails->nInterfaceId=nMSInterface;
693 MSMac->pstruAllocatedChannel=NULL;
694 return 1;
695}
696/** This funtion is used by the base station to release the assigned channels */
698{
700 Cellular_CHANNEL* channel=BSMac->pstruChannelList;
703 while(channel)
704 {
705 if(channel->nAllocationFlag==1 && channel->nMSId==nMSId && channel->nApplicationId==nApplicationId)
706 {
707 channel->nAllocationFlag=0;
708 channel->nApplicationId=0;
709 channel->nDestId=0;
710 channel->nMSId=0;
711 break;
712 }
713 channel=channel->pstru_NextChannel;
714 }
715 return 1;
716}
717/** This funcion is called at the mobile station when the PHYSICAL_OUT event is triggered */
719{
725 unsigned int nTimeSlot=gsmPacket->nTimeSlot;
726 double dStartTime;
727 double dDataRate=DATA_RATE;
731 else
732 dStartTime=pstruEventDetails->dEventTime;
733 packet->pstruPhyData->dOverhead=0;
736 packet->pstruPhyData->dStartTime=dStartTime;
737 packet->pstruPhyData->dEndTime=dStartTime+fnGetPacketSize(packet)*8/dDataRate;
740 packet->nReceiverId=MSMac->nNewBTS;
741 else
742 packet->nReceiverId=MSMac->nBTSId;
750 DEVICE_PHYLAYER(nMSID,nMSInterface)->dLastPacketEndTime = pstruEventDetails->dEventTime;
751 //Call packet trace function
753 fn_NetSim_Metrics_Add(packet);
754 //Check for next packet
756 {
762 pstruEventDetails->nInterfaceId=nMSInterface;
768 }
769 else if(MSMac->pstruAllocatedChannel &&
770 MSMac->pstruPacketList &&
772 {
773 //Transmit next packet
774 Cellular_PACKET* gsmPacket;
776 NetSim_PACKET* packet=MSMac->pstruPacketList[channel->nApplicationId][channel->nMSId-1][channel->nDestId-1];
780 else
781 packet->pstruMacData->dOverhead=0;
784 gsmPacket=packet->pstruMacData->Packet_MACProtocol;
785 gsmPacket->nTimeSlot=channel->nTimeSlot;
786 //Write physical out event
793 pstruEventDetails->nInterfaceId=nMSInterface;
801 }
802 else if(packet->pstruAppData && packet->pstruAppData->nAppEndFlag==1 && gsmPacket->isLast==1)
803 {
804 //Add call end event
806 nMSInterface,
809 }
810 return 1;
811}
812
unsigned int NETSIM_ID
Definition: Animation.h:45
int fn_NetSim_Cellular_MS_ReassembleBurst()
Definition: Burst.c:149
int fn_NetSim_Cellular_MS_ProcessCallRequest()
Definition: Cellular.c:506
int fn_NetSim_Cellular_Run()
Definition: Cellular.c:23
int fn_NetSim_Cellular_VLR(NETSIM_ID nMSCId, NETSIM_ID nId, NETSIM_ID *nBTSId, NETSIM_ID *nInterfaceId)
Definition: Cellular.c:469
int fn_NetSim_Cellular_BS_AssignTimeSlot(NetSim_PACKET *packet, NETSIM_ID nBTSId)
Definition: Cellular.c:639
int fn_NetSim_Cellular_Msc_ProcessPacket()
Definition: Cellular.c:485
int fn_NetSim_Cellular_MS_PhyOut()
Definition: Cellular.c:718
int fn_NetSim_Cellular_BS_ReleaseChannel()
Definition: Cellular.c:697
int fn_NetSim_Cellular_TransmitOnwireline()
Definition: Cellular.c:434
int fn_NetSim_Cellular_allocateChannel(NetSim_PACKET *packet)
Definition: Cellular.c:233
int fn_NetSim_Cellular_MS_SendChannelRelease(Cellular_CHANNEL *channel, NETSIM_ID nMSId, NETSIM_ID nMSInterface, double time)
Definition: Cellular.c:666
int fn_NetSim_Cellular_MS_ProcessCallResponse()
Definition: Cellular.c:570
int fn_NetSim_Cellular_ChannelResponse(NetSim_PACKET *packet)
Definition: Cellular.c:288
int fn_NetSim_Cellular_ForwardToMSC()
Definition: Cellular.c:423
int fn_NetSim_Cellular_AddPacketToBuffer(NetSim_PACKET *packet, NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
Definition: GSM.c:123
#define CELLULAR_PACKET_TYPE(protocol, type)
Definition: Cellular.h:66
@ ChannelType_TRAFFICCHANNEL
Definition: Cellular.h:37
NetSim_PACKET * fn_NetSim_Cellular_createPacket(double time, unsigned int nPacketType, NETSIM_ID nSourceId, NETSIM_ID nDestinationId, double dSize, MAC_LAYER_PROTOCOL protocol)
@ Subevent_DropCall
Definition: Cellular.h:70
@ Subevent_TxNextBurst
Definition: Cellular.h:71
int fn_NetSim_Cellular_AllocateChannel(NetSim_EVENTDETAILS *pstruEventDetails, NetSim_PACKET *packet)
Definition: GSM.c:130
#define DATA_RATE
Definition: Cellular.h:31
#define CELLULAR_SUBEVENT(protocol, type)
Definition: Cellular.h:73
int fn_NetSim_Cellular_ChannelResponseForHandover()
Definition: Handover.c:67
int fn_NetSim_Cellular_DropCall()
Definition: Handover.c:103
@ PacketType_CallRejected
Definition: Cellular.h:59
@ PacketType_ChannelGranted
Definition: Cellular.h:55
@ PacketType_ChannelRequest
Definition: Cellular.h:53
@ PacketType_ChannelRelease
Definition: Cellular.h:60
@ PacketType_DropCall
Definition: Cellular.h:62
@ PacketType_ChannelRequestForIncoming
Definition: Cellular.h:57
@ PacketType_CallAccepted
Definition: Cellular.h:58
@ PacketType_ChannelRequestForHandover
Definition: Cellular.h:61
@ PacketType_CallEnd
Definition: Cellular.h:64
@ PacketType_ChannelUngranted
Definition: Cellular.h:56
@ PacketType_CallRequest
Definition: Cellular.h:54
int fn_NetSim_GSM_BS_PhyOut()
Definition: GSM.c:187
int fn_NetSim_Cellular_SendCallend(NETSIM_ID nMSID, NETSIM_ID nMSInterface, NETSIM_ID nDestinationId, double time)
Definition: GSM.c:215
@ Status_ChannelRequestedForIncoming
Definition: Cellular.h:44
@ Status_IDLE
Definition: Cellular.h:42
@ Status_CallRequested
Definition: Cellular.h:46
@ Status_CallInProgress
Definition: Cellular.h:47
@ Status_ChannelRequestedForHandover
Definition: Cellular.h:45
@ Status_CallEnd
Definition: Cellular.h:48
@ Status_ChannelRequested
Definition: Cellular.h:43
int isCellularChannelAllocated(NETSIM_ID nMSId, NETSIM_ID nInterfaceId, NETSIM_ID nApplicationId)
Definition: GSM_Channel.c:129
#define GSM_OVERHEAD
Definition: GSM.h:18
double fn_NetSim_GSM_GetPacketStartTime(double dCurrentTime, unsigned int nTimeSlot)
#define fnNetSimError(x,...)
Definition: Linux.h:56
#define calloc(c, s)
Definition: Memory.h:29
double fnGetPacketSize(NetSim_PACKET *pstruData)
bool fn_NetSim_GetBufferStatus(NetSim_BUFFER *pstruBuffer)
Definition: Scheduling.c:41
NetSim_PACKET * fn_NetSim_Packet_GetPacketFromBuffer(NetSim_BUFFER *pstruBuffer, int nFlag)
NETSIM_ID get_first_dest_from_packet(NetSim_PACKET *packet)
NETSIM_ID fn_NetSim_Stack_GetConnectedDevice(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NETSIM_ID *nConnectedDevId, NETSIM_ID *nConnectedInterfaceId)
#define DEVICE_MAC_NW_INTERFACE(DeviceId, InterfaceId)
Definition: Stack.h:793
#define DEVICE_MACLAYER(DeviceId, InterfaceId)
Definition: Stack.h:786
#define DEVICE_TYPE(DeviceId)
Definition: Stack.h:773
@ PHY_MEDIUM_WIRED
Definition: Stack.h:243
@ PHY_MEDIUM_WIRELESS
Definition: Stack.h:242
@ MSC
Definition: Stack.h:306
@ MOBILESTATION
Definition: Stack.h:275
@ BASESTATION
Definition: Stack.h:287
@ MAC_PROTOCOL_GSM
Definition: Stack.h:218
@ MAC_PROTOCOL_CDMA
Definition: Stack.h:217
EXPORTED struct stru_NetSim_Network * NETWORK
Definition: Stack.h:742
@ TIMER_EVENT
Definition: Stack.h:114
@ PHYSICAL_OUT_EVENT
Definition: Stack.h:104
@ MAC_OUT_EVENT
Definition: Stack.h:106
@ MAC_IN_EVENT
Definition: Stack.h:107
@ PHYSICAL_IN_EVENT
Definition: Stack.h:105
#define DEVICE_MACVAR(DeviceId, InterfaceId)
Definition: Stack.h:798
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
Definition: Stack.h:837
#define DEVICE_PHYLAYER(DeviceId, InterfaceId)
Definition: Stack.h:788
#define fn_NetSim_Metrics_Add(packet)
Definition: Stack.h:998
#define fn_NetSim_Packet_FreePacket(pstruPacket)
Definition: main.h:177
#define fn_NetSim_WritePacketTrace(pstruPacket)
Definition: main.h:188
#define fnpAddEvent(pstruEvent)
Definition: main.h:191
Structure for Erlang_call application.
Definition: Application.h:313
Structure to store application information.
Definition: Application.h:97
struct stru_Cellular_ChannelList * pstruChannelList
Definition: Cellular.h:175
struct stru_Cellular_ChannelList * pstru_NextChannel
Definition: Cellular.h:145
CELLULAR_CHANNEL_TYPE nChannelType
Definition: Cellular.h:137
unsigned int nAllocationFlag
Definition: Cellular.h:253
struct stru_Cellular_ChannelList * channel
Definition: Cellular.h:254
NETSIM_ID nApplicationId
Definition: Cellular.h:210
NetSim_PACKET **** pstruPacketList
Definition: Cellular.h:219
unsigned int nSourceFlag
Definition: Cellular.h:211
NETSIM_ID nBTSInterface
Definition: Cellular.h:215
NETSIM_ID nBTSId
Definition: Cellular.h:214
Cellular_CHANNEL * pstruAllocatedChannel
Definition: Cellular.h:216
NETSIM_ID nNewBTS
Definition: Cellular.h:223
Cellular_MS_Metrics MSMetrics
Definition: Cellular.h:228
MS_STATUS nMSStatusFlag
Definition: Cellular.h:209
NETSIM_ID nApplicationId
Definition: Cellular.h:263
unsigned int nTimeSlot
Definition: Cellular.h:261
unsigned int isLast
Definition: Cellular.h:265
NETSIM_ID nInterfaceId
Definition: Cellular.h:79
NETSIM_ID nBTSId
Definition: Cellular.h:78
unsigned int nChannelRequestSent
Definition: Cellular.h:193
unsigned int nCallAccepted
Definition: Cellular.h:196
unsigned int nCallRequestReceived
Definition: Cellular.h:195
unsigned int nCallBlocked
Definition: Cellular.h:191
unsigned int nCallRejected
Definition: Cellular.h:197
unsigned int nCallRequestSent
Definition: Cellular.h:194
void * deviceVar
Definition: Stack.h:716
struct stru_NetSim_Interface ** ppstruInterfaceList
Definition: Stack.h:717
NETSIM_ID nApplicationId
Definition: Stack.h:752
EVENT_TYPE nEventType
Definition: Stack.h:747
NETSIM_ID nProtocolId
Definition: Stack.h:748
struct stru_NetSim_Packet * pPacket
Definition: Stack.h:754
NETSIM_ID nSubEventType
Definition: Stack.h:757
NETSIM_ID nDeviceId
Definition: Stack.h:750
long long int nPacketId
Definition: Stack.h:755
netsimDEVICE_TYPE nDeviceType
Definition: Stack.h:749
NETSIM_ID nInterfaceId
Definition: Stack.h:751
struct stru_NetSim_PhysicalLayer * pstruPhysicalLayer
Definition: Stack.h:699
struct stru_NetSim_Links ** ppstruNetSimLinks
Definition: Stack.h:738
void ** appInfo
Definition: Stack.h:739
struct stru_NetSim_Device ** ppstruDeviceList
Definition: Stack.h:737
long long int nPacketId
Definition: Packet.h:256
struct stru_NetSim_Packet_AppLayer * pstruAppData
Definition: Packet.h:273
struct stru_NetSim_Packet_PhyLayer * pstruPhyData
Definition: Packet.h:277
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
NETSIM_ID nSourceId
Definition: Packet.h:263
struct stru_NetSim_Packet_MACLayer * pstruMacData
Definition: Packet.h:276
PHYSICAL_LAYER_MEDIUM nPhyMedium
Definition: Stack.h:547