![]() |
NetSim Source Code Help
|

Go to the source code of this file.
Functions | |
| int | fn_NetSim_DSR_DeleteRREQTable (NETSIM_IPAddress targetAddress, NETSIM_ID nDeviceId) |
| double | getRREQBackoff (DSR_RREQ_TABLE *table) |
| bool | fn_NetSim_DSR_CheckIPinIPList (NETSIM_IPAddress *ipList, int length, NETSIM_IPAddress ip) |
| bool | fn_NetSim_DSR_CheckEntryInRREQTable (DSR_RREQ_OPTION *rreq, DSR_RREQ_TABLE *table) |
| NetSim_PACKET * | fn_NetSim_DSR_InitRouteRequest (NETSIM_IPAddress target, DSR_RREQ_TABLE **rreqTable, NETSIM_ID nDeviceId, double dTime, NetSim_EVENTDETAILS *pstruEventDetails) |
| int | fn_NetSim_DSR_RREQTimeout (NetSim_EVENTDETAILS *pstruEventDetails) |
| NetSim_PACKET * | fn_NetSim_DSR_RetryRREQ (NETSIM_IPAddress targetAddress, NETSIM_ID nDeviceId, double dTime, NetSim_EVENTDETAILS *pstruEventDetails) |
| DSR_RREQ_TABLE * | getRREQTable (NETSIM_IPAddress target, DSR_RREQ_TABLE *table) |
| int | fn_NetSim_DSR_ProcessRREQ (NetSim_EVENTDETAILS *pstruEventDetails) |
| bool fn_NetSim_DSR_CheckEntryInRREQTable | ( | DSR_RREQ_OPTION * | rreq, |
| DSR_RREQ_TABLE * | table | ||
| ) |
This function checks if the RREQ table has an entry of the target IP address. This indicates that the particular device has already initiated a RREQ to the target.
Definition at line 339 of file RouteRequest.c.

| bool fn_NetSim_DSR_CheckIPinIPList | ( | NETSIM_IPAddress * | ipList, |
| int | length, | ||
| NETSIM_IPAddress | ip | ||
| ) |
This functions checks if the IP is in the IP_List. It returns true if IP is there or else it returns false.
Definition at line 325 of file RouteRequest.c.

| int fn_NetSim_DSR_DeleteRREQTable | ( | NETSIM_IPAddress | targetAddress, |
| NETSIM_ID | nDeviceId | ||
| ) |
This function deletes the entry from the Route Request table
Definition at line 214 of file RouteRequest.c.

| NetSim_PACKET * fn_NetSim_DSR_InitRouteRequest | ( | NETSIM_IPAddress | target, |
| DSR_RREQ_TABLE ** | rreqTable, | ||
| NETSIM_ID | nDeviceId, | ||
| double | dTime, | ||
| NetSim_EVENTDETAILS * | pstruEventDetails | ||
| ) |
This function initiates a route request to the target.
Definition at line 24 of file RouteRequest.c.

| int fn_NetSim_DSR_ProcessRREQ | ( | NetSim_EVENTDETAILS * | pstruEventDetails | ) |
This function process the RREQ that a device gets. If the target address is the device, it generates a RREP. If the RREQ packet contains the device IP in its address list, it drops the packet. If the Device cache contains the route to the target, then the device replies via the route cache. If no route is present, then the device forwards the RREQ.
Definition at line 237 of file RouteRequest.c.

| NetSim_PACKET * fn_NetSim_DSR_RetryRREQ | ( | NETSIM_IPAddress | targetAddress, |
| NETSIM_ID | nDeviceId, | ||
| double | dTime, | ||
| NetSim_EVENTDETAILS * | pstruEventDetails | ||
| ) |
This function retransmits the RREQ packet.
Definition at line 126 of file RouteRequest.c.

| int fn_NetSim_DSR_RREQTimeout | ( | NetSim_EVENTDETAILS * | pstruEventDetails | ) |
This function checks if a route is present in the route cache. If not, then it retransmits the route request packet if the route request count is less than the DSR Max Retransmit limit. If the RREQ count is > Max Retransmit Limit, it Empties the Send Buffer and deletes the RREQ entry from the RREQ table.
Definition at line 87 of file RouteRequest.c.

| double getRREQBackoff | ( | DSR_RREQ_TABLE * | table | ) |
This gets the Backoff time of the RREQ table. The backoff time is time until when if the RREQ is not received, it retransmits the RREQ.
Definition at line 199 of file RouteRequest.c.

| DSR_RREQ_TABLE * getRREQTable | ( | NETSIM_IPAddress | target, |
| DSR_RREQ_TABLE * | table | ||
| ) |
If a RREQ to a target is before hand generated, this entry is made in the RREQ Table. This function gets the RREQ table of the target IP if the RREQ was beforehand sent.
Definition at line 184 of file RouteRequest.c.
