NetSim Source Code Help
Loading...
Searching...
No Matches
AODV.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stru_NetSim_AODV_RREQ
 
struct  stru_NetSim_AODV_RREP
 
struct  stru_NetSim_AODV_RERR
 
struct  stru_NetSim_AODV_RREP_ACK
 
struct  stru_NetSim_AODV_PrecursorsList
 
struct  stru_NetSim_AODV_RouteTable
 
struct  stru_AODV_FIFO
 
struct  stru_AODV_RREQ_Seen_Table
 Structure of RREQ Seen Table in which entry is made of the RREQ received. More...
 
struct  stru_AODV_RREQ_Sent_Table
 Structure of RREQ sent Table in which entry of RREQ sent is made. More...
 
struct  stru_AODV_Metrics
 Stucture for AODV Metrics. More...
 
struct  stru_AODV_DeviceVariable
 

Macros

#define AODV_ACTIVE_ROUTE_TIMEOUT   3000* MILLISECOND
 
#define AODV_ALLOWED_HELLO_LOSS   2
 
#define AODV_BLACKLIST_TIMEOUT   AODV_RREQ_RETRIES * AODV_NET_TRAVERSAL_TIME
 
#define AODV_DELETE_PERIOD   K * max (AODV_ACTIVE_ROUTE_TIMEOUT, AODV_HELLO_INTERVAL)
 
#define K   5
 
#define AODV_HELLO_INTERVAL   1000* MILLISECOND
 
#define AODV_LOCAL_ADD_TTL   2
 
#define AODV_MAX_REPAIR_TTL   0.3 * AODV_NET_DIAMETER
 
#define AODV_MIN_REPAIR_TTL
 
#define AODV_MY_ROUTE_TIMEOUT   (2 * AODV_ACTIVE_ROUTE_TIMEOUT)
 
#define AODV_NET_DIAMETER   35
 
#define AODV_NET_TRAVERSAL_TIME   2 * AODV_NODE_TRAVERSAL_TIME * AODV_NET_DIAMETER
 
#define AODV_NEXT_HOP_WAIT   AODV_NODE_TRAVERSAL_TIME + 10
 
#define AODV_NODE_TRAVERSAL_TIME   40 * MILLISECOND
 
#define AODV_PATH_DISCOVERY_TIME   2 * AODV_NET_TRAVERSAL_TIME
 
#define AODV_RERR_RATELIMIT   10
 
#define AODV_RING_TRAVERSAL_TIME(ttl)   2 * AODV_NODE_TRAVERSAL_TIME *(ttl + AODV_TIMEOUT_BUFFER)
 
#define AODV_RREQ_RETRIES   2
 
#define AODV_RREQ_RATELIMIT   10
 
#define AODV_TIMEOUT_BUFFER   2
 
#define AODV_TTL_START   1
 
#define AODV_TTL_INCREMENT   2
 
#define AODV_TTL_THRESHOLD   7
 
#define AODV_RREQ_SIZE_IPV4   24
 AODV route request size in bytes. More...
 
#define AODV_RREQ_SIZE_IPV6   72
 
#define AODV_RREQ_SIZE(dev)   DEVICE_NWPROTOCOL(dev,1) == NW_PROTOCOL_IPV4 ? AODV_RREQ_SIZE_IPV4:AODV_RREQ_SIZE_IPV6
 
#define AODV_RREP_SIZE_IPV4   20
 AODV route reply size in bytes. More...
 
#define AODV_RREP_SIZE_IPV6   56
 
#define AODV_RREP_SIZE(dev)   DEVICE_NWPROTOCOL(dev,1) == NW_PROTOCOL_IPV4 ? AODV_RREP_SIZE_IPV4:AODV_RREP_SIZE_IPV6
 
#define AODV_RERR_SIZE_FIXED   4
 AODV route error size in bytes. More...
 
#define AODV_PACKET_PROCESSING()   fn_NetSim_AODV_GeneralPacketProcessing(pstruEventDetails)
 
#define AODV_CHECK_ROUTE_FOUND(destIP)   fn_NetSim_AODV_CheckRouteFound(destIP,pstruEventDetails)
 
#define AODV_ADD_TO_FIFO(packet, fifoBuffer, time)   fn_NetSim_AODV_AddToFIFOBuffer(packet,fifoBuffer,time)
 
#define AODV_GEN_RREQ()   fn_NetSim_AODV_GenerateRREQ(pstruEventDetails)
 
#define AODV_RETRY_RREQ()   fn_NetSim_AODV_RetryRREQ(pstruEventDetails)
 
#define AODV_PROCESS_RREQ()   fn_NetSim_AODV_ProcessRREQ(pstruEventDetails)
 
#define AODV_INSERT_ROUTE_TABLE(ip, seq, hopcount, nexthop, lifeTime)   fn_NetSim_AODV_InsertInRouteTable(ip,seq,hopcount,nexthop,lifeTime,pstruEventDetails)
 
#define AODV_INSERT_PRECURSOR(ip)   fn_NetSim_AODV_InsertInPrecursorsList(ip,pstruEventDetails)
 
#define AODV_FORWARD_RREQ()   fn_NetSim_AODV_ForwardRREQ(pstruEventDetails)
 
#define AODV_GENERATE_RREP()   fn_NetSim_AODV_GenerateRREP(pstruEventDetails)
 
#define AODV_TRANSMIT_FIFO(devVar)   fn_NetSim_AODV_TransmitFIFOBuffer(devVar,pstruEventDetails)
 
#define AODV_PROCESS_RREP()   fn_NetSim_AODV_ProcessRREP(pstruEventDetails)
 
#define AODV_FORWARD_RREP()   fn_NetSim_AODV_ForwardRREP(pstruEventDetails)
 
#define AODV_FIND_NEXT_HOP(devVar, dest)   fn_NetSim_AODV_FindNextHop(devVar,dest,pstruEventDetails)
 
#define AODV_GENERATE_RREP_BY_IN()   fn_NetSim_AODV_GenerateRREPByIntermediate(pstruEventDetails)
 
#define AODV_TRANSMIT_HELLO()   fn_NetSim_AODV_TransmitHelloMessage(pstruEventDetails)
 
#define AODV_UPDATE_ROUTE_TABLE(ip, lifetime)   fn_NetSim_AODV_UpdateRouteTable(ip,lifetime,pstruEventDetails)
 
#define AODV_ACTIVE_ROUTE_TIMEOUT_EVENT()   fn_NetSim_AODV_ActiveRouteTimeout(pstruEventDetails)
 
#define AODV_GENERATE_RERR(DevId, UnreachableIP)   fn_NetSim_AODV_GenerateRERR(DevId,UnreachableIP,pstruEventDetails)
 
#define AODV_PROCESS_RERR()   fn_NetSim_AODV_ProcessRERR(pstruEventDetails)
 
#define AODV_DEV_VAR(devId)   ((AODV_DEVICE_VAR*)NETWORK->ppstruDeviceList[devId-1]->pstruNetworkLayer->RoutingVar)
 
#define AODV_METRICS_VAR(devId)   (AODV_DEV_VAR(devId)->aodvMetrics)
 
#define FIFO_ALLOC()   (AODV_FIFO*)list_alloc(sizeof(AODV_FIFO),offsetof(AODV_FIFO,ele))
 
#define RREQSEENTABLE_ALLOC()   (AODV_RREQ_SEEN_TABLE*)list_alloc(sizeof(AODV_RREQ_SEEN_TABLE),offsetof(AODV_RREQ_SEEN_TABLE,ele))
 
#define RREQSENTTABLE_ALLOC()   (AODV_RREQ_SENT_TABLE*)list_alloc(sizeof(AODV_RREQ_SENT_TABLE),offsetof(AODV_RREQ_SENT_TABLE,ele))
 
#define ROUTETABLE_ALLOC()   (AODV_ROUTETABLE*)list_alloc(sizeof(AODV_ROUTETABLE),offsetof(AODV_ROUTETABLE,ele))
 

Typedefs

typedef enum enum_AODV_Ctrl_Packet AODV_CONTROL_PACKET
 
typedef struct stru_AODV_Primitives AODV_PRIMITIVES
 
typedef struct stru_NetSim_AODV_RouteTable AODV_ROUTETABLE
 
typedef struct stru_AODV_FIFO AODV_FIFO
 
typedef struct stru_AODV_DeviceVariable AODV_DEVICE_VAR
 
typedef struct stru_AODV_RREQ_Seen_Table AODV_RREQ_SEEN_TABLE
 
typedef struct stru_AODV_RREQ_Sent_Table AODV_RREQ_SENT_TABLE
 
typedef struct stru_NetSim_AODV_PrecursorsList AODV_PRECURSORS_LIST
 
typedef struct stru_AODV_Metrics AODV_METRICS
 
typedef struct stru_NetSim_AODV_RREQ AODV_RREQ
 
typedef struct stru_NetSim_AODV_RREP AODV_RREP
 
typedef struct stru_NetSim_AODV_RERR AODV_RERR
 

Enumerations

enum  enum_AODV_Ctrl_Packet { AODVctrlPacket_RREQ =NW_PROTOCOL_AODV*100+1 , AODVctrlPacket_RREP , AODVctrlPacket_RERR }
 
enum  AODV_SUB_EVENT { AODVsubevent_RREQ_TIMEOUT =NW_PROTOCOL_AODV*100+1 , AODVsubevent_TRANSMIT_HELLO , AODVsubevent_ACTIVE_ROUTE_TIMEOUT }
 
enum  AODV_RoutingFlag { AODV_RoutingFlag_Valid , AODV_RoutingFlag_InValid , AODV_RoutingFlag_Repairable , AODV_RoutingFlag_beingRepaired }
 

Functions

void set_aodv_curr ()
 
NETSIM_IPAddress aodv_get_curr_ip ()
 
NETSIM_ID aodv_get_curr_if ()
 
NETSIM_IPAddress aodv_get_dev_ip (NETSIM_ID d)
 
bool isAodvConfigured (NETSIM_ID d, NETSIM_ID in)
 
unsigned int fnFindSequenceNumber (AODV_DEVICE_VAR *devVar, NETSIM_IPAddress ip)
 
int fnEmptyFIFOBuffer (AODV_DEVICE_VAR *devVar, NETSIM_IPAddress dest)
 
AODV_ROUTETABLEfnFindRouteTable (AODV_ROUTETABLE *table, NETSIM_IPAddress dest)
 
NetSim_PACKETfn_NetSim_AODV_GenerateCtrlPacket (NETSIM_ID src, NETSIM_ID dest, NETSIM_ID recv, double dTime, AODV_CONTROL_PACKET type)
 
int fn_NetSim_AODV_InsertInRouteTable (NETSIM_IPAddress ip, unsigned int seqNumber, unsigned int hopCount, NETSIM_IPAddress nextHop, double lifeTime, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_TransmitFIFOBuffer (AODV_DEVICE_VAR *devVar, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_InsertInPrecursorsList (NETSIM_IPAddress ip, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_UpdateRouteTable (NETSIM_IPAddress ip, double lifetime, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ForwardRREP (NetSim_EVENTDETAILS *pstruEventDetails)
 
bool fn_NetSim_AODV_CheckRouteFound (NETSIM_IPAddress ip, NetSim_EVENTDETAILS *pstruEventDetails)
 
NETSIM_IPAddress fn_NetSim_AODV_FindNextHop (AODV_DEVICE_VAR *devVar, NETSIM_IPAddress dest, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ForwardRREQ (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_GeneralPacketProcessing (NetSim_EVENTDETAILS *pstruEventDetails)
 
bool fn_NetSim_AODV_AddToFIFOBuffer (NetSim_PACKET *packet, AODV_FIFO **fifoBuffer, double time)
 
NetSim_PACKETfn_NetSim_AODV_GenerateRREQ (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_RetryRREQ (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ProcessRREQ (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_GenerateRREP (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ProcessRREP (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_GenerateRREPByIntermediate (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_TransmitHelloMessage (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ReceiveHelloMessage (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ActiveRouteTimeout (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_GenerateRERR (NETSIM_ID nDeviceId, NETSIM_IPAddress UnreachableIP, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ProcessRERR (NetSim_EVENTDETAILS *pstruEventDetails)
 

Macro Definition Documentation

◆ AODV_ACTIVE_ROUTE_TIMEOUT

#define AODV_ACTIVE_ROUTE_TIMEOUT   3000* MILLISECOND

Definition at line 26 of file AODV.h.

◆ AODV_ACTIVE_ROUTE_TIMEOUT_EVENT

#define AODV_ACTIVE_ROUTE_TIMEOUT_EVENT ( )    fn_NetSim_AODV_ActiveRouteTimeout(pstruEventDetails)

Definition at line 408 of file AODV.h.

◆ AODV_ADD_TO_FIFO

#define AODV_ADD_TO_FIFO (   packet,
  fifoBuffer,
  time 
)    fn_NetSim_AODV_AddToFIFOBuffer(packet,fifoBuffer,time)

Definition at line 393 of file AODV.h.

◆ AODV_ALLOWED_HELLO_LOSS

#define AODV_ALLOWED_HELLO_LOSS   2

Definition at line 27 of file AODV.h.

◆ AODV_BLACKLIST_TIMEOUT

#define AODV_BLACKLIST_TIMEOUT   AODV_RREQ_RETRIES * AODV_NET_TRAVERSAL_TIME

Definition at line 28 of file AODV.h.

◆ AODV_CHECK_ROUTE_FOUND

#define AODV_CHECK_ROUTE_FOUND (   destIP)    fn_NetSim_AODV_CheckRouteFound(destIP,pstruEventDetails)

Definition at line 392 of file AODV.h.

◆ AODV_DELETE_PERIOD

#define AODV_DELETE_PERIOD   K * max (AODV_ACTIVE_ROUTE_TIMEOUT, AODV_HELLO_INTERVAL)

Definition at line 29 of file AODV.h.

◆ AODV_DEV_VAR

#define AODV_DEV_VAR (   devId)    ((AODV_DEVICE_VAR*)NETWORK->ppstruDeviceList[devId-1]->pstruNetworkLayer->RoutingVar)

Definition at line 413 of file AODV.h.

◆ AODV_FIND_NEXT_HOP

#define AODV_FIND_NEXT_HOP (   devVar,
  dest 
)    fn_NetSim_AODV_FindNextHop(devVar,dest,pstruEventDetails)

Definition at line 404 of file AODV.h.

◆ AODV_FORWARD_RREP

#define AODV_FORWARD_RREP ( )    fn_NetSim_AODV_ForwardRREP(pstruEventDetails)

Definition at line 403 of file AODV.h.

◆ AODV_FORWARD_RREQ

#define AODV_FORWARD_RREQ ( )    fn_NetSim_AODV_ForwardRREQ(pstruEventDetails)

Definition at line 399 of file AODV.h.

◆ AODV_GEN_RREQ

#define AODV_GEN_RREQ ( )    fn_NetSim_AODV_GenerateRREQ(pstruEventDetails)

Definition at line 394 of file AODV.h.

◆ AODV_GENERATE_RERR

#define AODV_GENERATE_RERR (   DevId,
  UnreachableIP 
)    fn_NetSim_AODV_GenerateRERR(DevId,UnreachableIP,pstruEventDetails)

Definition at line 409 of file AODV.h.

◆ AODV_GENERATE_RREP

#define AODV_GENERATE_RREP ( )    fn_NetSim_AODV_GenerateRREP(pstruEventDetails)

Definition at line 400 of file AODV.h.

◆ AODV_GENERATE_RREP_BY_IN

#define AODV_GENERATE_RREP_BY_IN ( )    fn_NetSim_AODV_GenerateRREPByIntermediate(pstruEventDetails)

Definition at line 405 of file AODV.h.

◆ AODV_HELLO_INTERVAL

#define AODV_HELLO_INTERVAL   1000* MILLISECOND

Definition at line 31 of file AODV.h.

◆ AODV_INSERT_PRECURSOR

#define AODV_INSERT_PRECURSOR (   ip)    fn_NetSim_AODV_InsertInPrecursorsList(ip,pstruEventDetails)

Definition at line 398 of file AODV.h.

◆ AODV_INSERT_ROUTE_TABLE

#define AODV_INSERT_ROUTE_TABLE (   ip,
  seq,
  hopcount,
  nexthop,
  lifeTime 
)    fn_NetSim_AODV_InsertInRouteTable(ip,seq,hopcount,nexthop,lifeTime,pstruEventDetails)

Definition at line 397 of file AODV.h.

◆ AODV_LOCAL_ADD_TTL

#define AODV_LOCAL_ADD_TTL   2

Definition at line 32 of file AODV.h.

◆ AODV_MAX_REPAIR_TTL

#define AODV_MAX_REPAIR_TTL   0.3 * AODV_NET_DIAMETER

Definition at line 33 of file AODV.h.

◆ AODV_METRICS_VAR

#define AODV_METRICS_VAR (   devId)    (AODV_DEV_VAR(devId)->aodvMetrics)

Definition at line 414 of file AODV.h.

◆ AODV_MIN_REPAIR_TTL

#define AODV_MIN_REPAIR_TTL

Definition at line 34 of file AODV.h.

◆ AODV_MY_ROUTE_TIMEOUT

#define AODV_MY_ROUTE_TIMEOUT   (2 * AODV_ACTIVE_ROUTE_TIMEOUT)

Definition at line 35 of file AODV.h.

◆ AODV_NET_DIAMETER

#define AODV_NET_DIAMETER   35

Definition at line 36 of file AODV.h.

◆ AODV_NET_TRAVERSAL_TIME

#define AODV_NET_TRAVERSAL_TIME   2 * AODV_NODE_TRAVERSAL_TIME * AODV_NET_DIAMETER

Definition at line 37 of file AODV.h.

◆ AODV_NEXT_HOP_WAIT

#define AODV_NEXT_HOP_WAIT   AODV_NODE_TRAVERSAL_TIME + 10

Definition at line 38 of file AODV.h.

◆ AODV_NODE_TRAVERSAL_TIME

#define AODV_NODE_TRAVERSAL_TIME   40 * MILLISECOND

Definition at line 39 of file AODV.h.

◆ AODV_PACKET_PROCESSING

#define AODV_PACKET_PROCESSING ( )    fn_NetSim_AODV_GeneralPacketProcessing(pstruEventDetails)

Definition at line 391 of file AODV.h.

◆ AODV_PATH_DISCOVERY_TIME

#define AODV_PATH_DISCOVERY_TIME   2 * AODV_NET_TRAVERSAL_TIME

Definition at line 40 of file AODV.h.

◆ AODV_PROCESS_RERR

#define AODV_PROCESS_RERR ( )    fn_NetSim_AODV_ProcessRERR(pstruEventDetails)

Definition at line 410 of file AODV.h.

◆ AODV_PROCESS_RREP

#define AODV_PROCESS_RREP ( )    fn_NetSim_AODV_ProcessRREP(pstruEventDetails)

Definition at line 402 of file AODV.h.

◆ AODV_PROCESS_RREQ

#define AODV_PROCESS_RREQ ( )    fn_NetSim_AODV_ProcessRREQ(pstruEventDetails)

Definition at line 396 of file AODV.h.

◆ AODV_RERR_RATELIMIT

#define AODV_RERR_RATELIMIT   10

Definition at line 41 of file AODV.h.

◆ AODV_RERR_SIZE_FIXED

#define AODV_RERR_SIZE_FIXED   4

AODV route error size in bytes.

Definition at line 57 of file AODV.h.

◆ AODV_RETRY_RREQ

#define AODV_RETRY_RREQ ( )    fn_NetSim_AODV_RetryRREQ(pstruEventDetails)

Definition at line 395 of file AODV.h.

◆ AODV_RING_TRAVERSAL_TIME

#define AODV_RING_TRAVERSAL_TIME (   ttl)    2 * AODV_NODE_TRAVERSAL_TIME *(ttl + AODV_TIMEOUT_BUFFER)

Definition at line 42 of file AODV.h.

◆ AODV_RREP_SIZE

#define AODV_RREP_SIZE (   dev)    DEVICE_NWPROTOCOL(dev,1) == NW_PROTOCOL_IPV4 ? AODV_RREP_SIZE_IPV4:AODV_RREP_SIZE_IPV6

Definition at line 56 of file AODV.h.

◆ AODV_RREP_SIZE_IPV4

#define AODV_RREP_SIZE_IPV4   20

AODV route reply size in bytes.

Definition at line 54 of file AODV.h.

◆ AODV_RREP_SIZE_IPV6

#define AODV_RREP_SIZE_IPV6   56

Definition at line 55 of file AODV.h.

◆ AODV_RREQ_RATELIMIT

#define AODV_RREQ_RATELIMIT   10

Definition at line 44 of file AODV.h.

◆ AODV_RREQ_RETRIES

#define AODV_RREQ_RETRIES   2

Definition at line 43 of file AODV.h.

◆ AODV_RREQ_SIZE

#define AODV_RREQ_SIZE (   dev)    DEVICE_NWPROTOCOL(dev,1) == NW_PROTOCOL_IPV4 ? AODV_RREQ_SIZE_IPV4:AODV_RREQ_SIZE_IPV6

Definition at line 53 of file AODV.h.

◆ AODV_RREQ_SIZE_IPV4

#define AODV_RREQ_SIZE_IPV4   24

AODV route request size in bytes.

Definition at line 51 of file AODV.h.

◆ AODV_RREQ_SIZE_IPV6

#define AODV_RREQ_SIZE_IPV6   72

Definition at line 52 of file AODV.h.

◆ AODV_TIMEOUT_BUFFER

#define AODV_TIMEOUT_BUFFER   2

Definition at line 45 of file AODV.h.

◆ AODV_TRANSMIT_FIFO

#define AODV_TRANSMIT_FIFO (   devVar)    fn_NetSim_AODV_TransmitFIFOBuffer(devVar,pstruEventDetails)

Definition at line 401 of file AODV.h.

◆ AODV_TRANSMIT_HELLO

#define AODV_TRANSMIT_HELLO ( )    fn_NetSim_AODV_TransmitHelloMessage(pstruEventDetails)

Definition at line 406 of file AODV.h.

◆ AODV_TTL_INCREMENT

#define AODV_TTL_INCREMENT   2

Definition at line 47 of file AODV.h.

◆ AODV_TTL_START

#define AODV_TTL_START   1

Definition at line 46 of file AODV.h.

◆ AODV_TTL_THRESHOLD

#define AODV_TTL_THRESHOLD   7

Definition at line 48 of file AODV.h.

◆ AODV_UPDATE_ROUTE_TABLE

#define AODV_UPDATE_ROUTE_TABLE (   ip,
  lifetime 
)    fn_NetSim_AODV_UpdateRouteTable(ip,lifetime,pstruEventDetails)

Definition at line 407 of file AODV.h.

◆ FIFO_ALLOC

#define FIFO_ALLOC ( )    (AODV_FIFO*)list_alloc(sizeof(AODV_FIFO),offsetof(AODV_FIFO,ele))

Definition at line 415 of file AODV.h.

◆ K

#define K   5

Definition at line 30 of file AODV.h.

◆ ROUTETABLE_ALLOC

#define ROUTETABLE_ALLOC ( )    (AODV_ROUTETABLE*)list_alloc(sizeof(AODV_ROUTETABLE),offsetof(AODV_ROUTETABLE,ele))

Definition at line 418 of file AODV.h.

◆ RREQSEENTABLE_ALLOC

#define RREQSEENTABLE_ALLOC ( )    (AODV_RREQ_SEEN_TABLE*)list_alloc(sizeof(AODV_RREQ_SEEN_TABLE),offsetof(AODV_RREQ_SEEN_TABLE,ele))

Definition at line 416 of file AODV.h.

◆ RREQSENTTABLE_ALLOC

#define RREQSENTTABLE_ALLOC ( )    (AODV_RREQ_SENT_TABLE*)list_alloc(sizeof(AODV_RREQ_SENT_TABLE),offsetof(AODV_RREQ_SENT_TABLE,ele))

Definition at line 417 of file AODV.h.

Typedef Documentation

◆ AODV_CONTROL_PACKET

Definition at line 61 of file AODV.h.

◆ AODV_DEVICE_VAR

Definition at line 65 of file AODV.h.

◆ AODV_FIFO

typedef struct stru_AODV_FIFO AODV_FIFO

Definition at line 64 of file AODV.h.

◆ AODV_METRICS

Definition at line 69 of file AODV.h.

◆ AODV_PRECURSORS_LIST

Definition at line 68 of file AODV.h.

◆ AODV_PRIMITIVES

typedef struct stru_AODV_Primitives AODV_PRIMITIVES

Definition at line 62 of file AODV.h.

◆ AODV_RERR

Definition at line 74 of file AODV.h.

◆ AODV_ROUTETABLE

Definition at line 63 of file AODV.h.

◆ AODV_RREP

Definition at line 73 of file AODV.h.

◆ AODV_RREQ

Definition at line 72 of file AODV.h.

◆ AODV_RREQ_SEEN_TABLE

Definition at line 66 of file AODV.h.

◆ AODV_RREQ_SENT_TABLE

Definition at line 67 of file AODV.h.

Enumeration Type Documentation

◆ AODV_RoutingFlag

Enumerator
AODV_RoutingFlag_Valid 
AODV_RoutingFlag_InValid 
AODV_RoutingFlag_Repairable 
AODV_RoutingFlag_beingRepaired 

Definition at line 284 of file AODV.h.

◆ AODV_SUB_EVENT

Enumeration for AODV sub events

Enumerator
AODVsubevent_RREQ_TIMEOUT 
AODVsubevent_TRANSMIT_HELLO 
AODVsubevent_ACTIVE_ROUTE_TIMEOUT 

Definition at line 83 of file AODV.h.

◆ enum_AODV_Ctrl_Packet

Enumeration for AODV control packets

Enumerator
AODVctrlPacket_RREQ 
AODVctrlPacket_RREP 
AODVctrlPacket_RERR 

Definition at line 76 of file AODV.h.

Function Documentation

◆ aodv_get_curr_if()

NETSIM_ID aodv_get_curr_if ( )
Here is the caller graph for this function:

◆ aodv_get_curr_ip()

NETSIM_IPAddress aodv_get_curr_ip ( )
Here is the caller graph for this function:

◆ aodv_get_dev_ip()

NETSIM_IPAddress aodv_get_dev_ip ( NETSIM_ID  d)
Here is the caller graph for this function:

◆ fn_NetSim_AODV_ActiveRouteTimeout()

int fn_NetSim_AODV_ActiveRouteTimeout ( NetSim_EVENTDETAILS pstruEventDetails)

This function adds the timeout event of a Route Table which is equal to the table_LifeTime

Definition at line 165 of file RouteTable.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_AddToFIFOBuffer()

bool fn_NetSim_AODV_AddToFIFOBuffer ( NetSim_PACKET packet,
AODV_FIFO **  fifoBuffer,
double  time 
)

This function adds a packet to the FIFO Buffer

Definition at line 21 of file FIFOBuffer.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_CheckRouteFound()

bool fn_NetSim_AODV_CheckRouteFound ( NETSIM_IPAddress  ip,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function checks if the route to target is present in Route Table

Definition at line 21 of file AODV_CheckRouteFound.c.

◆ fn_NetSim_AODV_FindNextHop()

NETSIM_IPAddress fn_NetSim_AODV_FindNextHop ( AODV_DEVICE_VAR devVar,
NETSIM_IPAddress  dest,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function returns the next hop IP to the destination from the Route Table

Definition at line 115 of file RouteTable.c.

◆ fn_NetSim_AODV_ForwardRREP()

int fn_NetSim_AODV_ForwardRREP ( NetSim_EVENTDETAILS pstruEventDetails)

This functiopn is used to forward the RREP packet to the previous hop, else the packet is freed.

Definition at line 109 of file RREP.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_ForwardRREQ()

int fn_NetSim_AODV_ForwardRREQ ( NetSim_EVENTDETAILS pstruEventDetails)

This function forwards the RREQ. It creates, a control packet, adds the necessary header and adds the Network Out Event.

Definition at line 358 of file RREQ.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_GeneralPacketProcessing()

int fn_NetSim_AODV_GeneralPacketProcessing ( NetSim_EVENTDETAILS pstruEventDetails)

This function is called in the Network Out Event for routing of the packet.

If the Device route table has a route to the target, then the packet is added to sent to the next hop ip

Whenever a packet is to be routed to a destination and the device route cache doesnt have a route to the target, the Packet is added to the FIFO and a Route Discovery is iitiated if not already.

Update the life time

Update the metrics

No route found but RREQ is already sent

No route found. generate RREQ

Definition at line 30 of file GeneralPacketProcessing.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_GenerateCtrlPacket()

NetSim_PACKET * fn_NetSim_AODV_GenerateCtrlPacket ( NETSIM_ID  src,
NETSIM_ID  dest,
NETSIM_ID  recv,
double  dTime,
AODV_CONTROL_PACKET  type 
)
Here is the caller graph for this function:

◆ fn_NetSim_AODV_GenerateRERR()

int fn_NetSim_AODV_GenerateRERR ( NETSIM_ID  nDeviceId,
NETSIM_IPAddress  UnreachableIP,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function Generates a route error and sends it to the previous HOP.

Definition at line 20 of file AODV_RouteError.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_GenerateRREP()

int fn_NetSim_AODV_GenerateRREP ( NetSim_EVENTDETAILS pstruEventDetails)

This function generates a route reply

Definition at line 22 of file RREP.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_GenerateRREPByIntermediate()

int fn_NetSim_AODV_GenerateRREPByIntermediate ( NetSim_EVENTDETAILS pstruEventDetails)

This function generates a RREP by an intermediate node if the intermediate node has a route to the target entered in the route table.

Definition at line 140 of file RREP.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_GenerateRREQ()

NetSim_PACKET * fn_NetSim_AODV_GenerateRREQ ( NetSim_EVENTDETAILS pstruEventDetails)

This function is used to genereate an AODV Route Request Packet. It Adds the RREQ entry in the RREQ sent table.

Definition at line 36 of file RREQ.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_InsertInPrecursorsList()

int fn_NetSim_AODV_InsertInPrecursorsList ( NETSIM_IPAddress  ip,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function adds the given IP in the ADOV precursor list if not already present.

Definition at line 90 of file RouteTable.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_InsertInRouteTable()

int fn_NetSim_AODV_InsertInRouteTable ( NETSIM_IPAddress  ip,
unsigned int  seqNumber,
unsigned int  hopCount,
NETSIM_IPAddress  nextHop,
double  lifeTime,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function adds the route in the Route table of the node. If the table is not there, it creates one with a certain timeout after which the entries are deleted.

Definition at line 22 of file RouteTable.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_ProcessRERR()

int fn_NetSim_AODV_ProcessRERR ( NetSim_EVENTDETAILS pstruEventDetails)

This function Processess a route error. It deletes the entry to the target in the Route Table and forwards the REER packet to previous HOP if any.

Definition at line 109 of file AODV_RouteError.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_ProcessRREP()

int fn_NetSim_AODV_ProcessRREP ( NetSim_EVENTDETAILS pstruEventDetails)

This function processes a route reply. It adds the entry of the next hop in Route Table, transmits the packets in FIFO Buffer and inserts precursor. Deletes the RREQ entry from sent table and forwards the rrep if the device is not the source node.

Definition at line 64 of file RREP.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_ProcessRREQ()

int fn_NetSim_AODV_ProcessRREQ ( NetSim_EVENTDETAILS pstruEventDetails)

This function process the AODV RREQ. It checks for duplicate entry of the received RREQ packet. If the RREQ packet was received previously, it frees the packet. Else, it adds the RREQ in the AODV seen table, Inserts the reverse route in the Route table. If the device has the Route to the target, it generates a RREP. else it forwards the RREQ.

Definition at line 285 of file RREQ.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_ReceiveHelloMessage()

int fn_NetSim_AODV_ReceiveHelloMessage ( NetSim_EVENTDETAILS pstruEventDetails)

◆ fn_NetSim_AODV_RetryRREQ()

int fn_NetSim_AODV_RetryRREQ ( NetSim_EVENTDETAILS pstruEventDetails)

This function is used to retry an AODV route request. If the table is NULL or if the table timeout is greater than present time or if the number of RREQ exceeds the RREQ_RETRY_LIMIT, then RREQ is not sent again.

Else, a RREQ packet is generated and a NETWORK_OUT_EVENT is added.

Definition at line 179 of file RREQ.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_TransmitFIFOBuffer()

int fn_NetSim_AODV_TransmitFIFOBuffer ( AODV_DEVICE_VAR devVar,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function Transmits the FIFO Buffer

Definition at line 81 of file FIFOBuffer.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_TransmitHelloMessage()

int fn_NetSim_AODV_TransmitHelloMessage ( NetSim_EVENTDETAILS pstruEventDetails)

This function generate the Hello Message Packets and transmit them.

Definition at line 21 of file HelloMessage.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_UpdateRouteTable()

int fn_NetSim_AODV_UpdateRouteTable ( NETSIM_IPAddress  ip,
double  lifetime,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function updates the lifetime of the Route Table

Definition at line 147 of file RouteTable.c.

◆ fnEmptyFIFOBuffer()

int fnEmptyFIFOBuffer ( AODV_DEVICE_VAR devVar,
NETSIM_IPAddress  dest 
)

This function empties the FIFO buffer

Definition at line 54 of file FIFOBuffer.c.

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

◆ fnFindRouteTable()

AODV_ROUTETABLE * fnFindRouteTable ( AODV_ROUTETABLE table,
NETSIM_IPAddress  dest 
)

This function returns the Route table with the mentioned destination IP

Definition at line 132 of file RouteTable.c.

Here is the caller graph for this function:

◆ fnFindSequenceNumber()

unsigned int fnFindSequenceNumber ( AODV_DEVICE_VAR devVar,
NETSIM_IPAddress  ip 
)
Here is the caller graph for this function:

◆ isAodvConfigured()

bool isAodvConfigured ( NETSIM_ID  d,
NETSIM_ID  in 
)
Here is the caller graph for this function:

◆ set_aodv_curr()

void set_aodv_curr ( )
Here is the caller graph for this function: