Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

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:

Include dependency graph

Go to the source code of this file.

Compounds

class  DSRAgentClass

Defines

#define NEW_SALVAGE_LOGIC

Functions

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

Variables

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


Define Documentation

#define NEW_SALVAGE_LOGIC
 

Definition at line 65 of file dsragent.cc.


Function Documentation

bool BackOffTest Entry e,
Time  time
[static]
 

Definition at line 280 of file dsragent.cc.

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

Referenced by DSRAgent::getRouteForPacket().

00283 {
00284   Time next = ((Time) (0x1 << (e->rt_reqs_outstanding * 2))) * rt_rq_period;
00285 
00286   if (next > rt_rq_max_period)
00287           next = rt_rq_max_period;
00288 
00289   if (next + e->last_rt_req > time)
00290           return false;
00291 
00292   // don't let rt_reqs_outstanding overflow next on the LogicalShiftsLeft's
00293   if (e->rt_reqs_outstanding < 15)
00294           e->rt_reqs_outstanding++;
00295 
00296   e->last_rt_req = time;
00297 
00298   return true;
00299 }

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

Definition at line 2107 of file dsragent.cc.

References GratReplyHoldDown::p.

Referenced by DSRAgent::sendRouteShortening().

02108 {
02109   int c;
02110   for (c = 0; c < sz; c++)
02111     if (query == hd[c].p) return &hd[c];
02112   return NULL;
02113 }

void XmitFailureCallback Packet pkt,
void *  data
 

Definition at line 2748 of file dsragent.cc.

References agent.

02749 {
02750   DSRAgent *agent = (DSRAgent *)data; // cast of trust
02751   agent->xmitFailed(pkt);
02752 }

void XmitFlowFailureCallback Packet pkt,
void *  data
 

Definition at line 2755 of file dsragent.cc.

References agent.

02756 {
02757   DSRAgent *agent = (DSRAgent *)data;
02758   agent->xmitFlowFailed(pkt);
02759 }


Variable Documentation

Time arp_timeout = 30.0e-3
 

Definition at line 100 of file dsragent.cc.

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

DSRAgentClass class_DSRAgent [static]
 

const int default_flow_timeout = 60 [static]
 

Definition at line 91 of file dsragent.cc.

Referenced by DSRAgent::handleFlowForwarding(), and DSRAgent::sendOutPacketWithRoute().

bool dsr_salvage_allow_propagating = 0 [static]
 

Definition at line 81 of file dsragent.cc.

Referenced by DSRAgent::getRouteForPacket().

int dsr_salvage_max_attempts = 15 [static]
 

Definition at line 71 of file dsragent.cc.

Referenced by DSRAgent::undeliverablePkt().

int dsr_salvage_max_requests = 1 [static]
 

Definition at line 76 of file dsragent.cc.

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

int64_t dsr_tap = 0
 

Definition at line 1908 of file dsragent.cc.

Referenced by DSRAgent::tap().

int64_t dsr_tap_skip = 0
 

Definition at line 1909 of file dsragent.cc.

Referenced by DSRAgent::tap().

const bool dsragent_always_reestablish = true [static]
 

Definition at line 89 of file dsragent.cc.

Referenced by DSRAgent::handleFlowForwarding(), and DSRAgent::sendOutPacketWithRoute().

bool dsragent_dont_salvage_bad_replies = true
 

Definition at line 149 of file dsragent.cc.

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

const bool dsragent_enable_flowstate = true [static]
 

Definition at line 86 of file dsragent.cc.

Referenced by DSRAgent::sendOutPacketWithRoute().

const bool dsragent_prefer_default_flow = true [static]
 

Definition at line 87 of file dsragent.cc.

Referenced by DSRAgent::sendOutPacketWithRoute().

const bool dsragent_prefer_shorter_over_default = true [static]
 

Definition at line 88 of file dsragent.cc.

Referenced by DSRAgent::sendOutPacketWithRoute().

bool dsragent_propagate_last_error = true
 

Definition at line 127 of file dsragent.cc.

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

bool dsragent_reply_from_cache_on_propagating = true
 

Definition at line 138 of file dsragent.cc.

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

bool dsragent_reply_only_to_first_rtreq = false
 

Definition at line 125 of file dsragent.cc.

Referenced by DSRAgent::handlePacketReceipt().

bool dsragent_require_bi_routes = true
 

Definition at line 154 of file dsragent.cc.

Referenced by DSRAgent::undeliverablePkt().

bool dsragent_ring_zero_search = true
 

Definition at line 141 of file dsragent.cc.

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

bool dsragent_salvage_with_cache = true
 

Definition at line 133 of file dsragent.cc.

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

bool dsragent_send_grat_replies = true
 

Definition at line 131 of file dsragent.cc.

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

bool dsragent_snoop_forwarded_errors = true
 

Definition at line 121 of file dsragent.cc.

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

bool dsragent_snoop_source_routes = true
 

Definition at line 123 of file dsragent.cc.

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

bool dsragent_use_tap = true
 

Definition at line 136 of file dsragent.cc.

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

Time grat_hold_down_time = 1.0
 

Definition at line 111 of file dsragent.cc.

Referenced by DSRAgent::sendRouteShortening().

Time max_err_hold = 1.0
 

Definition at line 114 of file dsragent.cc.

Referenced by DSRAgent::sendOutRtReq().

const int min_adv_interval = 5 [static]
 

Definition at line 90 of file dsragent.cc.

Referenced by DSRAgent::sendOutPacketWithRoute().

Time rt_rq_max_period = 10.0
 

Definition at line 102 of file dsragent.cc.

Referenced by BackOffTest().

Time rt_rq_period = 0.5
 

Definition at line 101 of file dsragent.cc.

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

const int verbose = 0 [static]
 

Definition at line 94 of file dsragent.cc.

Referenced by DSRAgent::acceptRouteReply(), DSRAgent::handlePktWithoutSR(), DSRAgent::processBrokenRouteError(), DSRAgent::recv(), DSRAgent::replyFromRouteCache(), DSRAgent::sendOutPacketWithRoute(), DSRAgent::sendRouteShortening(), DSRAgent::stickPacketInSendBuffer(), DSRAgent::tap(), and DSRAgent::xmitFailed().

const int verbose_srr = 0 [static]
 

Definition at line 95 of file dsragent.cc.

Referenced by DSRAgent::acceptRouteReply(), DSRAgent::getRouteForPacket(), DSRAgent::handleRouteRequest(), DSRAgent::processBrokenRouteError(), DSRAgent::replyFromRouteCache(), DSRAgent::returnSrcRouteToRequestor(), DSRAgent::sendOutRtReq(), DSRAgent::sendRouteShortening(), and DSRAgent::undeliverablePkt().

const int verbose_ssalv = 1 [static]
 

Definition at line 96 of file dsragent.cc.

Referenced by DSRAgent::undeliverablePkt().


Generated on Tue Apr 20 12:19:46 2004 for NS2.26SourcesOriginal by doxygen 1.3.3