NetSim Source Code Help
Loading...
Searching...
No Matches
CSMACA.c
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#include "main.h"
25#include "IEEE802_11.h"
26#include "IEEE802_11_Phy.h"
28#include "NetSim_utility.h"
29
30//Function prototype
33
35{
36 if (!phy->dControlFrameDataRate)
37 fnNetSimError("Control frame data rate is 0 for device %d, interface %d in %s\n",
40 __FUNCTION__);
41 return phy->DIFS +
44 ((getAckSize(phy) * 8) / phy->dControlFrameDataRate);
45
46}
47
49{
52 phy;
53 NetSim_PACKET* packet;
54
55 if(!isCurrSTAIdle)
56 return -1; //Either mac is busy or radio is busy
57
59 return -1; // NAV blocked
60
61 //Check buffer has packets to send
63 packet = mac->currentProcessingPacket;
64 else
65 {
66 // Get packet from buffer
67 UINT n;
71 &n);
72 if(!packet)
73 return -2;
74 mac->currentProcessingPacket=packet;
75 mac->nCWcurrent = mac->currEdcaTable->CWmin;
76 }
77
78 mac->dPacketProcessingEndTime = pstruEventDetails->dEventTime; //Set current time
79
80 //Call RTS-CTS
82
83 //Update packet processing time
85
87 return -1;
88
89 packet = mac->currentProcessingPacket; //Processing packet may change due to RTS
90
91 // Add MAC_OUT_EVENT
93 memcpy(&pevent, pstruEventDetails, sizeof pevent);
94 pevent.nPacketId = packet->nPacketId;
95 if(packet->pstruAppData)
96 {
97 pevent.nSegmentId = packet->pstruAppData->nSegmentId;
99 }
100 else
101 {
102 pevent.nSegmentId = 0;
103 pevent.nApplicationId = 0;
104 }
105
106 if(packet->pstruNetworkData)
107 pevent.dPacketSize = packet->pstruNetworkData->dPacketSize;
108 else
109 pevent.dPacketSize = packet->pstruMacData->dPacketSize;
110 pevent.pPacket = packet;
112 pevent.nSubEventType = CS;
113 pevent.nEventType = MAC_OUT_EVENT;
114 fnpAddEvent(&pevent);
115 return 0;
116}
117
119{
121}
122
123/**
124~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125This function called when CHECK_NAV subevent triggered. It is called if the Medium
126is IDLE and a packet in the Access buffer to transmit.
127If NAV <=0 then change the state to Wait_DIFS and add DIFS_END subevent.
128If NAV > 0 then change the state to WF_NAV and add NAV_END subevent.
129~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130*/
132{
135
136 if(pstruEventDetails->dEventTime >= mac->dNAV-4)
137 {
138 if (isDCF(mac))
139 {
140 // Change the State
142 // Add DIFS_END subevent
144 pstruEventDetails->nSubEventType = IEEE802_11_EVENT_DIFS_END;
146 }
147 else if(isEDCAF(mac))
148 {
149 // Change the State
151 // Add DIFS_END subevent
153 pstruEventDetails->nSubEventType = IEEE802_11_EVENT_AIFS_END;
155 }
156 else
157 {
158 fnNetSimError("Unknown Medium access protocol\n");
159 }
160 }
161 return 0;
162}
163
165{
168}
169
171{
174}
175
176/**
177~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178When the buffer has packet to transmit, the MAC LAYER sense the Medium. If it is IDLE,
179then it will wait for DCF Inter Frame Space (DIFS) time before start transmission.
180At the end of DIFS time check the Medium. If Medium is IDLE, then change the State
181to BACKING_OFF, call the function to start back off. If Medium is BUSY, then change
182the state to IDLE.
183~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184*/
186{
188 // check the medium
190 {
191 // Change the state
193
194 // Start Back off
196 }
198 {
200 }
201}
202
204{
206 // check the medium
208 {
209 // Change the state
211
212 // Start Back off
214 }
216 {
218 }
219}
220
221/**
222This function start the Backoff process. If backoff counter != 0,it adds the backoff event at (event
223time + backoff time) else it generate the random backoff time and add the backoff event.
224*/
226{
230 if(mac->nBackOffCounter == 0)
232
233 print_ieee802_11_log("Time %lf, Device %d, Interface %d, Starting backoff. Counter is %d.",
235 mac->deviceId,
236 mac->interfaceId,
237 mac->nBackOffCounter);
238
239
240 print_ieee802_11_Backoff_log("%s,%lf,%lld,%d,%d,%d,",
241 DEVICE_NAME(mac->deviceId),
244 mac->nBackOffCounter,
245 mac->nCWcurrent, mac->nRetryCount);
246
247
248
253
255 mac->dBackOffStartTime; //Add backoff time
258 return;
259
261 pstruEventDetails->nSubEventType = IEEE802_11_EVENT_BACKOFF;
263}
264
265
266/**
267This function invokes the Back off time calculation.
268BackoffTime = RandomNumber(Between CW) * SlotTime.
269*/
271{
272 double dRandomNumber = 0.0;
275
276 dRandomNumber = fn_NetSim_Utilities_GenerateRandomNo(&NETWORK->ppstruDeviceList[nDeviceId-1]->ulSeed[0],&NETWORK->ppstruDeviceList[nDeviceId-1]->ulSeed[1]);
277 dRandomNumber /= NETSIM_RAND_MAX;
278 dRandomNumber *= mac->nCWcurrent;
279 mac->nBackOffCounter = (int)dRandomNumber;
280}
281
283{
286
287 assert(mac->nBackOffCounter>=0);
288
289 //Take care of back-off freeze
291
292 if(phy->radio.radioState != RX_ON_IDLE) // Back-off failed
293 {
297 //mac->dBackoffLeftTime=0;
298 //mac->nBackOffCounter=0;
299 print_ieee802_11_log("Time %lf micro sec, Backoff failed for %d-%d due to radio is not idle\n",
301 return false;
302 }
303
305 {
306 mac->nBackOffCounter--;
307 if(mac->nBackOffCounter>0) // Back-off in progress
308 {
310
313 return false; //Stop back-off process
314
315 pstruEventDetails->nSubEventType = IEEE802_11_EVENT_BACKOFF;
317 return false;
318 }
319 else // Back-off successful
320 {
321 mac->nBackOffCounter=0;
322 mac->dBackoffLeftTime=0;
324 print_ieee802_11_log("Time %lf micro sec, Backoff Suceesful for %d-%d\n",
326 return true;
327 }
328 }
329 else
330 {
331 if(mac->nBackOffCounter<=1) // Back-off failed
332 {
336 mac->dBackoffLeftTime=0;
337 mac->nBackOffCounter=0;
338 print_ieee802_11_log("Time %lf micro sec, Backoff failed for %d-%d due to medium is not idle\n",
340 return false;
341 }
342 else // Back-off Freeze
343 {
345
348 return false; //Stop back-off process
349
350 pstruEventDetails->nSubEventType = IEEE802_11_EVENT_BACKOFF;
352 print_ieee802_11_log("Time %lf micro sec, Backoff paused for %d-%d due to medium is not idle.\n",
354 return false;
355 }
356 }
357}
358
360{
363}
364
365/**
366This function is called to create and send an Ack after receiving the DATA
367from the destination or from the AP
368*/
370{
375
376 //Free the data packet
378
379 // Add SEND ACK sub-event
384 pstruEventDetails->pPacket = packet;
386 // Change the state
388 return 0;
389}
390
392{
394
396
397 //Call rate adaptation
406
407 while (p)
408 {
409 NetSim_PACKET* t=p;
410 p=p->pstruNextPacket;
414 }
415 mac->currentProcessingPacket=NULL;
418
420 {
421 // Get packet from buffer
422 UINT n;
426 &n);
427
428 if (!packet) ieee802_11_edcaf_unset_txop_time(mac);
429 else
430 {
431 mac->currentProcessingPacket = packet;
433
434 //Wait for SIFS and then transmit packet
437 }
438 }
439 else
440 {
444 }
446}
447
449{
450 UINT success=0,fail=0;
451 int i=0;
455 NetSim_PACKET* prev=NULL;
456 int flag = 1;
457 while (p)
458 {
459 if (flag == 0 && i == 1)
460 {
461 i = 0;
462 }
463 if(BIT_IS_SET_64(back->BitMap,i++))
464 {
465 NetSim_PACKET* t=p;
468 success++;
469 if(prev)
470 {
472 p=p->pstruNextPacket;
474 continue;
475 }
476 else
477 {
478 p=p->pstruNextPacket;
481 continue;
482 }
483 }
484 else
485 {
486 fail++;
487 flag = 0;
488 prev=p;
489 p=p->pstruNextPacket;
490 continue;
491 }
492 }
494 {
495 //Call rate adaptation
496 if(flag) //All packet received.
500 else //Some packet dropped
504 }
506 {
510 success,fail);
511 }
512
515
517 {
518 // Get packet from buffer
519 UINT n;
523 &n);
524 if (!packet)
526 else
527 {
528 mac->currentProcessingPacket = packet;
530
531 //Wait for SIFS and then transmit packet
534 }
535 }
536 else
537 {
541 }
542
544}
545
547{
549
550 NetSim_EVENTDETAILS pevent;
551 PIEEE802_11_PHY_VAR phy = IEEE802_11_PHY(devId,devIf);
553 double acktime;
554
555 acktime = ceil(packet->pstruPhyData->dStartTime
557 + get_preamble_time(phy)
558 + ((getAckSize(phy) * 8)/phy->dControlFrameDataRate));
559
560 pevent.dEventTime=acktime+2;
561 pevent.dPacketSize=0;
562 pevent.nDeviceId=devId;
563 pevent.nDeviceType=DEVICE_TYPE(devId);
564 pevent.nEventType=TIMER_EVENT;
565 pevent.nInterfaceId=hdr->sendInterfaceId;
566 pevent.nPacketId=packet->nPacketId;
568 if(packet->pstruAppData)
569 {
570 pevent.nSegmentId=packet->pstruAppData->nSegmentId;
572 }
573 else
574 {
575 pevent.nSegmentId=0;
576 pevent.nApplicationId=0;
577 }
579 pevent.pPacket=NULL;
580 pevent.szOtherDetails=NULL;
581 mac->EVENTID.ackTimeOut = fnpAddEvent(&pevent);
582}
583
585{
587 bool isRetry=false;
588
591 {
593 //Call rate adaptation
598
601
606 else
607 isRetry = fn_NetSim_IEEE802_11_CSMACA_CheckRetryLimit(mac, frameLength);
608
609 if(isRetry)
610 {
611 mac->nRetryCount++;
618 }
619 else
620 {
625
627 {
628 NetSim_PACKET* pstruPacket = mac->currentProcessingPacket;
629
630 if(pstruPacket->DropNotification)
631 pstruPacket->DropNotification(pstruPacket);
633 mac->currentProcessingPacket=NULL;
634 }
635 mac->nRetryCount = 0;
637 }
638 }
639}
640
641/**
642 This function invoke the retry limit checking. If active frame retry count is less than
643 active frame retry limit, then set move flag as one to allow the frame retransmission.
644 Otherwise, set move flag as zero to drop the active frame
645 */
647{
648 if (frameLength <= mac->dot11RTSThreshold)
649 {
650 if (mac->nRetryCount < mac->dot11ShortRetryLimit - 1)
651 return true;
652 else
653 return false;
654 }
655 else
656 {
657 if (mac->nRetryCount < mac->dot11LongRetryLimit - 1)
658 return true;
659 else
660 return false;
661 }
662}
663
664/**
665~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
666This function is used to expand the CW.
667else if CWcurrent >= CWmax, then CWcurrent is set to CWmax the Maximum CW.
668else CWcurrent = (nCWcurrent * 2) + 1.
669~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
670*/
672{
673 mac->nCWcurrent = min((mac->nCWcurrent * 2) + 1, mac->currEdcaTable->CWmax);
674}
675
676/**
677This function is called to create and send an Ack after receiving the DATA
678from the destination or from the AP
679*/
681{
682 NetSim_PACKET* packet;
684
685 if(IEEE802_11_CURR_MAC->blockAckPacket)
686 packet = IEEE802_11_CURR_MAC->blockAckPacket;
687 else
688 {
693 IEEE802_11_CURR_MAC->blockAckPacket=packet;
694 }
695
697
699 {
701 if (BIT_IS_SET_64(back->BitMap, 0))
702 {
703 // Add SEND ACK sub-event
708 pstruEventDetails->pPacket = packet;
710 }
711 // Change the state
713 IEEE802_11_CURR_MAC->blockAckPacket=NULL;
714 }
715
716 //Free the data packet
718 return 0;
719}
720
722{
724 if (d == packet->nReceiverId && mhdr->recvInterfaceId == in) { return; }
725
726 bool isUpdated = false;
728 UINT type;
729 void* hdr = ieee802_11_get_hdr(packet, &type);
730 switch (type)
731 {
732 case WLAN_RTS:
733 if (d == packet->nTransmitterId && mhdr->sendInterfaceId == in) { return; }
734 mac->dNAV = max(mac->dNAV, (ldEventTime + ((PIEEE802_11_RTS)hdr)->Duration));
735 isUpdated = true;
736 break;
737 case WLAN_CTS:
738 mac->dNAV = max(mac->dNAV, (ldEventTime + ((PIEEE802_11_CTS)hdr)->Duration));
739 isUpdated = true;
740 break;
741 }
742
743 if (isUpdated)
744 {
745 NetSim_EVENTDETAILS pevent;
746 memset(&pevent, 0, sizeof pevent);
747 pevent.dEventTime = mac->dNAV+1.05;
748 pevent.dPacketSize = 0;
749 pevent.nDeviceId = d;
750 pevent.nDeviceType = DEVICE_TYPE(d);
751 pevent.nEventType = MAC_OUT_EVENT;
752 pevent.nInterfaceId = in;
754 pevent.nSubEventType = 0;
755 fnpAddEvent(&pevent);
756 }
757}
unsigned int NETSIM_ID
Definition: Animation.h:45
bool fn_NetSim_IEEE802_11_CSMACA_CheckRetryLimit(PIEEE802_11_MAC_VAR mac, UINT frameLength)
Definition: CSMACA.c:646
int fn_NetSim_IEEE802_11_CSMACA_CheckNAV()
Definition: CSMACA.c:131
static void fn_NetSim_IEEE802_11_CSMACA_StartBackOff()
Definition: CSMACA.c:225
static double get_CSMACA_Time(PIEEE802_11_PHY_VAR phy)
Definition: CSMACA.c:34
int fn_NetSim_IEEE802_11_CSMACA_SendBlockACK()
Definition: CSMACA.c:680
int fn_NetSim_IEEE802_11_CSMACA_SendACK()
Definition: CSMACA.c:369
void fn_NetSim_IEEE802_11_CSMA_AckTimeOut()
Definition: CSMACA.c:584
void fn_NetSim_IEEE802_11_CSMA_UpdateNAV(NETSIM_ID d, NETSIM_ID in, NetSim_PACKET *packet)
Definition: CSMACA.c:721
void fn_NetSim_IEEE802_11_CSMACA_DIFSEnd()
Definition: CSMACA.c:185
void ieee802_11_csmaca_aifs_failed(PIEEE802_11_MAC_VAR mac)
Definition: CSMACA.c:170
void fn_NetSim_IEEE802_11_CSMACA_AddAckTimeOut(NetSim_PACKET *packet, NETSIM_ID devId, NETSIM_ID devIf)
Definition: CSMACA.c:546
static void fn_NetSim_IEEE802_11_CSMACA_RandomBackOffTimeCalculation()
Definition: CSMACA.c:270
void fn_NetSim_IEEE802_11_CSMACA_ProcessAck()
Definition: CSMACA.c:391
void ieee802_11_csmaca_pause_backoff(PIEEE802_11_MAC_VAR mac)
Definition: CSMACA.c:359
void ieee802_11_csmaca_difs_failed(PIEEE802_11_MAC_VAR mac)
Definition: CSMACA.c:164
bool fn_NetSim_IEEE802_11_CSMACA_CS()
Definition: CSMACA.c:118
bool fn_NetSim_IEEE802_11_CSMACA_Backoff()
Definition: CSMACA.c:282
void fn_NetSim_IEEE802_11_CSMACA_AIFSEnd()
Definition: CSMACA.c:203
int fn_NetSim_IEEE802_11_CSMACA_Init()
Definition: CSMACA.c:48
void fn_NetSim_IEEE802_11_CSMACA_ProcessBlockAck()
Definition: CSMACA.c:448
void fn_NetSim_IEEE802_11_CSMACA_IncreaseCW(PIEEE802_11_MAC_VAR mac)
Definition: CSMACA.c:671
void packet_recv_notify(NETSIM_ID devid, NETSIM_ID ifid, NETSIM_ID rcvid)
void packet_drop_notify(NETSIM_ID devid, NETSIM_ID ifid, NETSIM_ID rcvid)
PIEEE802_11_MAC_VAR IEEE802_11_MAC(NETSIM_ID ndeviceId, NETSIM_ID nInterfaceId)
PIEEE802_11_PHY_VAR IEEE802_11_PHY(NETSIM_ID ndeviceId, NETSIM_ID nInterfaceId)
bool validate_processing_time(double time, NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
NetSim_PACKET * get_from_queue(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, UINT nPacketRequire, UINT *nPacketCount)
@ RATEADAPTATION_GENERIC
Definition: IEEE802_11.h:195
@ RATEADAPTATION_MINSTREL
Definition: IEEE802_11.h:194
bool is_more_fragment_coming(NetSim_PACKET *packet)
BOOL Minstrel_DoNeedDataSend(NETSIM_ID nDevId, NETSIM_ID nifid, NETSIM_ID recvid)
Definition: Minstrel.c:99
double getAckSize(void *phy)
@ IEEE802_11_MACSTATE_BACKING_OFF
Definition: IEEE802_11.h:158
@ IEEE802_11_MACSTATE_Wait_AIFS
Definition: IEEE802_11.h:157
@ IEEE802_11_MACSTATE_Wait_ACK
Definition: IEEE802_11.h:166
@ IEEE802_11_MACSTATE_MAC_IDLE
Definition: IEEE802_11.h:154
@ IEEE802_11_MACSTATE_TXing_MPDU
Definition: IEEE802_11.h:159
@ IEEE802_11_MACSTATE_Wait_DIFS
Definition: IEEE802_11.h:156
@ IEEE802_11_MACSTATE_TXing_ACK
Definition: IEEE802_11.h:161
void fn_NetSim_IEEE802_11_RTS_CTS_Init()
Definition: RTS_CTS.c:98
void fn_NetSim_IEE802_11_MacReInit(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
NetSim_PACKET * fn_NetSim_IEEE802_11_CreateAckPacket(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NetSim_PACKET *data, double time)
void DoReportAmpduStatus(NETSIM_ID devid, NETSIM_ID ifid, NETSIM_ID recvid, UINT success, UINT failed)
Definition: Minstrel_ht.c:210
void DoReportDataOk(NETSIM_ID dev, NETSIM_ID ifid, NETSIM_ID recv)
Definition: Minstrel.c:310
void IEEE802_11_Change_Mac_State(PIEEE802_11_MAC_VAR mac, IEEE802_11_MAC_STATE state)
NetSim_PACKET * fn_NetSim_IEEE802_11_CreateBlockAckPacket(NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId, NetSim_PACKET *data, double time)
#define isCurrSTAIdle
Definition: IEEE802_11.h:310
#define isEDCAF(mac)
Definition: IEEE802_11.h:287
void fn_NetSim_IEEE802_11_SendToPhy()
bool ieee802_11_edcaf_is_txop_timer_set(PIEEE802_11_MAC_VAR mac, double currTime)
#define isCurrSTAMediumIdle()
Definition: IEEE802_11.h:312
#define isDCF(mac)
Definition: IEEE802_11.h:286
void print_ieee802_11_Backoff_log(char *format,...)
void ieee802_11_edcaf_unset_txop_time(PIEEE802_11_MAC_VAR mac)
void Minstrel_ReportDataFailed(NETSIM_ID nDevId, NETSIM_ID nifid, NETSIM_ID recvid)
Definition: Minstrel.c:119
void print_ieee802_11_log(char *format,...)
#define IEEE802_11_CURR_MAC
Definition: IEEE802_11.h:285
void Minstrel_ReportFinalDataFailed(NETSIM_ID nDevId, NETSIM_ID nifid, NETSIM_ID recvid)
Definition: Minstrel.c:147
void set_blockack_bitmap(NetSim_PACKET *ackPacket, NetSim_PACKET *packet)
void * ieee802_11_get_hdr(NetSim_PACKET *packet, UINT *type)
@ WLAN_RTS
@ WLAN_CTS
struct stru_ieee802_11_hdr * ptrIEEE802_11_HDR
double get_preamble_time(PIEEE802_11_PHY_VAR phy)
#define IEEE802_11_CURR_PHY
#define getSlotTime(phy)
#define getSIFSTime(phy)
#define UINT
Definition: Linux.h:38
#define fnNetSimError(x,...)
Definition: Linux.h:56
#define min(a, b)
Definition: Linux.h:106
#define max(a, b)
Definition: Linux.h:107
#define BIT_IS_SET_64(val, bitIndex)
#define PACKET_MACPROTOCOLDATA(pPacket)
Definition: Packet.h:300
EXPORTED double ldEventTime
Definition: Stack.h:838
#define DEVICE_NAME(DeviceId)
Definition: Stack.h:774
#define DEVICE_TYPE(DeviceId)
Definition: Stack.h:773
double fn_NetSim_Utilities_GenerateRandomNo(unsigned long *uSeed, unsigned long *uSeed1)
@ MAC_PROTOCOL_IEEE802_11
Definition: Stack.h:208
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
#define NETSIM_RAND_MAX
Definition: Stack.h:849
int fnDeleteEvent(unsigned long long int nEventId)
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
Definition: Stack.h:837
@ RX_ON_IDLE
Definition: Wireless.h:75
#define fn_NetSim_Packet_FreePacket(pstruPacket)
Definition: main.h:177
#define fnpAddEvent(pstruEvent)
Definition: main.h:191
Data structure for cumulative acknowledgment.
Page-405 of IEEE Std 802.11-2012 Figure 8-14—CTS frame.
NETSIM_ID interfaceId
Definition: IEEE802_11.h:222
double dPacketProcessingEndTime
Definition: IEEE802_11.h:268
double dBackOffStartTime
Definition: IEEE802_11.h:248
UINT nNumberOfAggregatedPackets
Definition: IEEE802_11.h:235
NETSIM_ID parentInterfaceId
Definition: IEEE802_11.h:223
IEEE802_11_RATE_ADAPTATION rate_adaptationAlgo
Definition: IEEE802_11.h:227
long long int backoff
Definition: IEEE802_11.h:273
long long int aifsEnd
Definition: IEEE802_11.h:275
IEEE802_11_MAC_STATE currMacState
Definition: IEEE802_11.h:245
ptrDOT11EDCATABLE currEdcaTable
Definition: IEEE802_11.h:241
long long int ackTimeOut
Definition: IEEE802_11.h:276
NetSim_PACKET * currentProcessingPacket
Definition: IEEE802_11.h:256
IEEE802_11_METRICS metrics
Definition: IEEE802_11.h:281
struct stru_802_11_Mac_Var::@0 EVENTID
long long int difsEnd
Definition: IEEE802_11.h:274
NETSIM_ID deviceId
Definition: IEEE802_11.h:221
IEEE802_11_RADIO radio
PLME_CHARACTERISTICS plmeCharacteristics
Page-404 of IEEE Std 802.11-2012 Figure 8-13—RTS frame.
PHY_TX_STATUS radioState
unsigned long ulSeed[SEED_COUNT]
Definition: Stack.h:715
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_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
struct stru_NetSim_Packet_NetworkLayer * pstruNetworkData
Definition: Packet.h:275
int(* ReceiveAckNotification)(struct stru_NetSim_Packet *ack)
Definition: Packet.h:282
NETSIM_ID nReceiverId
Definition: Packet.h:266
struct stru_NetSim_Packet * pstruNextPacket
Definition: Packet.h:278
NETSIM_ID nTransmitterId
Definition: Packet.h:265
int(* DropNotification)(struct stru_NetSim_Packet *packet)
Definition: Packet.h:281
struct stru_NetSim_Packet_MACLayer * pstruMacData
Definition: Packet.h:276