dsragent.cc File Reference

#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <signal.h>
#include <float.h>
#include <object.h>
#include <agent.h>
#include <trace.h>
#include <packet.h>
#include <scheduler.h>
#include <random.h>
#include <mac.h>
#include <ll.h>
#include <cmu-trace.h>
#include "path.h"
#include "srpacket.h"
#include "routecache.h"
#include "requesttable.h"
#include "dsragent.h"

Include dependency graph for dsragent.cc:

Go to the source code of this file.

Data Structures

class  DSRAgentClass

Defines

#define NEW_SALVAGE_LOGIC

Functions

static bool BackOffTest (Entry *e, Time time)
static GratReplyHoldDownFindGratHoldDown (GratReplyHoldDown *hd, int sz, Path &query)
void XmitFailureCallback (Packet *pkt, void *data)
void XmitFlowFailureCallback (Packet *pkt, void *data)

Variables

Time arp_timeout = 30.0e-3
DSRAgentClass class_DSRAgent
static const int default_flow_timeout = 60
static bool dsr_salvage_allow_propagating = 0
static int dsr_salvage_max_attempts = 15
static int dsr_salvage_max_requests = 1
int64_t dsr_tap = 0
int64_t dsr_tap_skip = 0
static const bool dsragent_always_reestablish = true
bool dsragent_dont_salvage_bad_replies = true
static const bool dsragent_enable_flowstate = true
static const bool dsragent_prefer_default_flow = true
static const bool dsragent_prefer_shorter_over_default = true
bool dsragent_propagate_last_error = true
bool dsragent_reply_from_cache_on_propagating = true
bool dsragent_reply_only_to_first_rtreq = false
bool dsragent_require_bi_routes = true
bool dsragent_ring_zero_search = true
bool dsragent_salvage_with_cache = true
bool dsragent_send_grat_replies = true
bool dsragent_snoop_forwarded_errors = true
bool dsragent_snoop_source_routes = true
bool dsragent_use_tap = true
Time grat_hold_down_time = 1.0
Time max_err_hold = 1.0
static const int min_adv_interval = 5
Time rt_rq_max_period = 10.0
Time rt_rq_period = 0.5
Time send_timeout = SEND_TIMEOUT
static const int verbose = 0
static const int verbose_srr = 0
static const int verbose_ssalv = 1


Define Documentation

#define NEW_SALVAGE_LOGIC
 

Definition at line 90 of file dsragent.cc.

Referenced by DSRAgent::getRouteForPacket().


Function Documentation

static bool BackOffTest Entry e,
Time  time
[static]
 

Definition at line 306 of file dsragent.cc.

References Entry::last_rt_req, Entry::rt_reqs_outstanding, rt_rq_max_period, and rt_rq_period.

Referenced by DSRAgent::getRouteForPacket().

00309 {
00310   Time next = ((Time) (0x1 << (e->rt_reqs_outstanding * 2))) * rt_rq_period;
00311 
00312   if (next > rt_rq_max_period)
00313       next = rt_rq_max_period;
00314 
00315   if (next + e->last_rt_req > time)
00316       return false;
00317 
00318   // don't let rt_reqs_outstanding overflow next on the LogicalShiftsLeft's
00319   if (e->rt_reqs_outstanding < 15)
00320       e->rt_reqs_outstanding++;
00321 
00322   e->last_rt_req = time;
00323 
00324   return true;
00325 }

static GratReplyHoldDown* FindGratHoldDown GratReplyHoldDown hd,
int  sz,
Path query
[static]
 

Definition at line 2148 of file dsragent.cc.

Referenced by DSRAgent::sendRouteShortening().

02149 {
02150   int c;
02151   for (c = 0; c < sz; c++)
02152     if (query == hd[c].p) return &hd[c];
02153   return NULL;
02154 }

void XmitFailureCallback Packet pkt,
void *  data
 

Definition at line 2789 of file dsragent.cc.

References agent.

02790 {
02791   DSRAgent *agent = (DSRAgent *)data; // cast of trust
02792   agent->xmitFailed(pkt);
02793 }

void XmitFlowFailureCallback Packet pkt,
void *  data
 

Definition at line 2796 of file dsragent.cc.

References agent.

02797 {
02798   DSRAgent *agent = (DSRAgent *)data;
02799   agent->xmitFlowFailed(pkt);
02800 }


Variable Documentation

Time arp_timeout = 30.0e-3
 

Definition at line 125 of file dsragent.cc.

Referenced by DSRAgent::getRouteForPacket().

DSRAgentClass class_DSRAgent [static]
 

const int default_flow_timeout = 60 [static]
 

Definition at line 116 of file dsragent.cc.

bool dsr_salvage_allow_propagating = 0 [static]
 

Definition at line 106 of file dsragent.cc.

Referenced by DSRAgent::getRouteForPacket().

int dsr_salvage_max_attempts = 15 [static]
 

Definition at line 96 of file dsragent.cc.

Referenced by DSRAgent::undeliverablePkt().

int dsr_salvage_max_requests = 1 [static]
 

Definition at line 101 of file dsragent.cc.

Referenced by DSRAgent::getRouteForPacket().

int64_t dsr_tap = 0
 

Definition at line 1949 of file dsragent.cc.

int64_t dsr_tap_skip = 0
 

Definition at line 1950 of file dsragent.cc.

const bool dsragent_always_reestablish = true [static]
 

Definition at line 114 of file dsragent.cc.

bool dsragent_dont_salvage_bad_replies = true
 

Definition at line 175 of file dsragent.cc.

Referenced by DSRAgent::command().

const bool dsragent_enable_flowstate = true [static]
 

Definition at line 111 of file dsragent.cc.

const bool dsragent_prefer_default_flow = true [static]
 

Definition at line 112 of file dsragent.cc.

const bool dsragent_prefer_shorter_over_default = true [static]
 

Definition at line 113 of file dsragent.cc.

bool dsragent_propagate_last_error = true
 

Definition at line 153 of file dsragent.cc.

Referenced by DSRAgent::command(), and DSRAgent::sendOutRtReq().

bool dsragent_reply_from_cache_on_propagating = true
 

Definition at line 164 of file dsragent.cc.

Referenced by DSRAgent::command().

bool dsragent_reply_only_to_first_rtreq = false
 

Definition at line 151 of file dsragent.cc.

bool dsragent_require_bi_routes = true
 

Definition at line 180 of file dsragent.cc.

bool dsragent_ring_zero_search = true
 

Definition at line 167 of file dsragent.cc.

Referenced by DSRAgent::command(), and DSRAgent::getRouteForPacket().

bool dsragent_salvage_with_cache = true
 

Definition at line 159 of file dsragent.cc.

Referenced by DSRAgent::command(), and DSRAgent::undeliverablePkt().

bool dsragent_send_grat_replies = true
 

Definition at line 157 of file dsragent.cc.

Referenced by DSRAgent::command(), and DSRAgent::sendRouteShortening().

bool dsragent_snoop_forwarded_errors = true
 

Definition at line 147 of file dsragent.cc.

Referenced by DSRAgent::command().

bool dsragent_snoop_source_routes = true
 

Definition at line 149 of file dsragent.cc.

Referenced by DSRAgent::command().

bool dsragent_use_tap = true
 

Definition at line 162 of file dsragent.cc.

Referenced by DSRAgent::command(), and DSRAgent::tap().

Time grat_hold_down_time = 1.0
 

Definition at line 137 of file dsragent.cc.

Referenced by DSRAgent::sendRouteShortening().

Time max_err_hold = 1.0
 

Definition at line 140 of file dsragent.cc.

Referenced by DSRAgent::sendOutRtReq().

const int min_adv_interval = 5 [static]
 

Definition at line 115 of file dsragent.cc.

Time rt_rq_max_period = 10.0
 

Definition at line 127 of file dsragent.cc.

Referenced by BackOffTest(), and DSRAgent::command().

Time rt_rq_period = 0.5
 

Definition at line 126 of file dsragent.cc.

Referenced by BackOffTest(), DSRAgent::command(), RequestTable::getEntry(), and RequestTable::insert().

Time send_timeout = SEND_TIMEOUT
 

Definition at line 128 of file dsragent.cc.

Referenced by DSRAgent::command(), and DSRAgent::sendBufferCheck().

const int verbose = 0 [static]
 

Definition at line 119 of file dsragent.cc.

const int verbose_srr = 0 [static]
 

Definition at line 120 of file dsragent.cc.

const int verbose_ssalv = 1 [static]
 

Definition at line 121 of file dsragent.cc.


Generated on Tue Mar 6 16:52:22 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6