NetSim Source Code Help
Loading...
Searching...
No Matches
CSMACA.c File Reference
#include "main.h"
#include "IEEE802_11.h"
#include "IEEE802_11_Phy.h"
#include "IEEE802_11_MAC_Frame.h"
#include "NetSim_utility.h"
Include dependency graph for CSMACA.c:

Go to the source code of this file.

Functions

static void fn_NetSim_IEEE802_11_CSMACA_RandomBackOffTimeCalculation ()
 
static void fn_NetSim_IEEE802_11_CSMACA_StartBackOff ()
 
static double get_CSMACA_Time (PIEEE802_11_PHY_VAR phy)
 
int fn_NetSim_IEEE802_11_CSMACA_Init ()
 
bool fn_NetSim_IEEE802_11_CSMACA_CS ()
 
int fn_NetSim_IEEE802_11_CSMACA_CheckNAV ()
 
void ieee802_11_csmaca_difs_failed (PIEEE802_11_MAC_VAR mac)
 
void ieee802_11_csmaca_aifs_failed (PIEEE802_11_MAC_VAR mac)
 
void fn_NetSim_IEEE802_11_CSMACA_DIFSEnd ()
 
void fn_NetSim_IEEE802_11_CSMACA_AIFSEnd ()
 
bool fn_NetSim_IEEE802_11_CSMACA_Backoff ()
 
void ieee802_11_csmaca_pause_backoff (PIEEE802_11_MAC_VAR mac)
 
int fn_NetSim_IEEE802_11_CSMACA_SendACK ()
 
void fn_NetSim_IEEE802_11_CSMACA_ProcessAck ()
 
void fn_NetSim_IEEE802_11_CSMACA_ProcessBlockAck ()
 
void fn_NetSim_IEEE802_11_CSMACA_AddAckTimeOut (NetSim_PACKET *packet, NETSIM_ID devId, NETSIM_ID devIf)
 
void fn_NetSim_IEEE802_11_CSMA_AckTimeOut ()
 
bool fn_NetSim_IEEE802_11_CSMACA_CheckRetryLimit (PIEEE802_11_MAC_VAR mac, UINT frameLength)
 
void fn_NetSim_IEEE802_11_CSMACA_IncreaseCW (PIEEE802_11_MAC_VAR mac)
 
int fn_NetSim_IEEE802_11_CSMACA_SendBlockACK ()
 
void fn_NetSim_IEEE802_11_CSMA_UpdateNAV (NETSIM_ID d, NETSIM_ID in, NetSim_PACKET *packet)
 

Function Documentation

◆ fn_NetSim_IEEE802_11_CSMA_AckTimeOut()

void fn_NetSim_IEEE802_11_CSMA_AckTimeOut ( )

Definition at line 584 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMA_UpdateNAV()

void fn_NetSim_IEEE802_11_CSMA_UpdateNAV ( NETSIM_ID  d,
NETSIM_ID  in,
NetSim_PACKET packet 
)

Definition at line 721 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_AddAckTimeOut()

void fn_NetSim_IEEE802_11_CSMACA_AddAckTimeOut ( NetSim_PACKET packet,
NETSIM_ID  devId,
NETSIM_ID  devIf 
)

Definition at line 546 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_AIFSEnd()

void fn_NetSim_IEEE802_11_CSMACA_AIFSEnd ( )

Definition at line 203 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_Backoff()

bool fn_NetSim_IEEE802_11_CSMACA_Backoff ( )

Definition at line 282 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_CheckNAV()

int fn_NetSim_IEEE802_11_CSMACA_CheckNAV ( )
This function called when CHECK_NAV subevent triggered. It is called if the Medium
is IDLE and a packet in the Access buffer to transmit.
If NAV <=0 then change the state to Wait_DIFS and add DIFS_END subevent.
If NAV > 0 then change the state to WF_NAV and add NAV_END subevent.
static struct stru_802_11_Phy_Parameters_HT a

Definition at line 131 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_CheckRetryLimit()

bool fn_NetSim_IEEE802_11_CSMACA_CheckRetryLimit ( PIEEE802_11_MAC_VAR  mac,
UINT  frameLength 
)

This function invoke the retry limit checking. If active frame retry count is less than active frame retry limit, then set move flag as one to allow the frame retransmission. Otherwise, set move flag as zero to drop the active frame

Definition at line 646 of file CSMACA.c.

Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_CS()

bool fn_NetSim_IEEE802_11_CSMACA_CS ( )

Definition at line 118 of file CSMACA.c.

Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_DIFSEnd()

void fn_NetSim_IEEE802_11_CSMACA_DIFSEnd ( )
When the buffer has packet to transmit, the MAC LAYER sense the Medium. If it is IDLE,
then it will wait for DCF Inter Frame Space (DIFS) time before start transmission.
At the end of DIFS time check the Medium. If Medium is IDLE, then change the State
to BACKING_OFF, call the function to start back off. If Medium is BUSY, then change
the state to IDLE.
static bool before(UINT32 seq1, UINT32 seq2)
Definition: CUBIC.c:215
@ DCF
Definition: IEEE802_11.h:201

Definition at line 185 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_IncreaseCW()

void fn_NetSim_IEEE802_11_CSMACA_IncreaseCW ( PIEEE802_11_MAC_VAR  mac)
This function is used to expand the CW.
else if CWcurrent >= CWmax, then CWcurrent is set to CWmax the Maximum CW.
else CWcurrent = (nCWcurrent * 2) + 1.

Definition at line 671 of file CSMACA.c.

Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_Init()

int fn_NetSim_IEEE802_11_CSMACA_Init ( )

Definition at line 48 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_ProcessAck()

void fn_NetSim_IEEE802_11_CSMACA_ProcessAck ( )

Definition at line 391 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_ProcessBlockAck()

void fn_NetSim_IEEE802_11_CSMACA_ProcessBlockAck ( )

Definition at line 448 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_RandomBackOffTimeCalculation()

static void fn_NetSim_IEEE802_11_CSMACA_RandomBackOffTimeCalculation ( )
static

This function invokes the Back off time calculation. BackoffTime = RandomNumber(Between CW) * SlotTime.

Definition at line 270 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_SendACK()

int fn_NetSim_IEEE802_11_CSMACA_SendACK ( )

This function is called to create and send an Ack after receiving the DATA from the destination or from the AP

Definition at line 369 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_SendBlockACK()

int fn_NetSim_IEEE802_11_CSMACA_SendBlockACK ( )

This function is called to create and send an Ack after receiving the DATA from the destination or from the AP

Definition at line 680 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_IEEE802_11_CSMACA_StartBackOff()

static void fn_NetSim_IEEE802_11_CSMACA_StartBackOff ( )
static

This function start the Backoff process. If backoff counter != 0,it adds the backoff event at (event time + backoff time) else it generate the random backoff time and add the backoff event.

Definition at line 225 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_CSMACA_Time()

static double get_CSMACA_Time ( PIEEE802_11_PHY_VAR  phy)
static

Definition at line 34 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee802_11_csmaca_aifs_failed()

void ieee802_11_csmaca_aifs_failed ( PIEEE802_11_MAC_VAR  mac)

Definition at line 170 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee802_11_csmaca_difs_failed()

void ieee802_11_csmaca_difs_failed ( PIEEE802_11_MAC_VAR  mac)

Definition at line 164 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ieee802_11_csmaca_pause_backoff()

void ieee802_11_csmaca_pause_backoff ( PIEEE802_11_MAC_VAR  mac)

Definition at line 359 of file CSMACA.c.

Here is the call graph for this function:
Here is the caller graph for this function: