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

ARPTable Class Reference

#include <arp.h>

Inheritance diagram for ARPTable:

Inheritance graph
[legend]
Collaboration diagram for ARPTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ARPTable (const char *tclnode, const char *tclmac)
int command (int argc, const char *const *argv)
int arpresolve (nsaddr_t dst, Packet *p, LL *ll)
void arpinput (Packet *p, LL *ll)
ARPEntryarplookup (nsaddr_t dst)
void arprequest (nsaddr_t src, nsaddr_t dst, LL *ll)
void Terminate (void)
 LIST_ENTRY (ARPTable) link_
void recv (Packet *p, Handler *)
virtual void recv (Packet *p, const char *s)
void send (Packet *p, Handler *)
void handle (Event *e)
double delay ()
double txtime (Packet *p)
double bandwidth () const
void pktintran (int src, int group)
NsObjecttarget ()
virtual void drop (Packet *p)
virtual void recvOnly (Packet *)
virtual void delay_bind_init_all ()
virtual int delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer)
int isdebug () const
virtual void debug (const char *fmt,...)

Static Public Attributes

ARPTable_List athead_ = { 0 }

Protected Member Functions

void reset ()
virtual void drop (Packet *p, const char *s)

Protected Attributes

double bandwidth_
double delay_
Event intr_
int dynamic_
PacketQueueitq_
int total_ [4]
NsObjecttarget_
NsObjectdrop_
int debug_

Private Member Functions

int initialized ()

Private Attributes

ARPEntry_List arphead_
MobileNodenode_
Macmac_

Constructor & Destructor Documentation

ARPTable::ARPTable const char *  tclnode,
const char *  tclmac
 

Definition at line 100 of file mac/arp.cc.

References arphead_, athead_, LIST_INIT, LIST_INSERT_HEAD, mac_, and node_.

00100                                                           : LinkDelay() {
00101         LIST_INIT(&arphead_);
00102 
00103         node_ = (MobileNode*) TclObject::lookup(tclnode);
00104         assert(node_);
00105 
00106         mac_ = (Mac*) TclObject::lookup(tclmac);
00107         assert(mac_);
00108         LIST_INSERT_HEAD(&athead_, this, link_);
00109 }


Member Function Documentation

void ARPTable::arpinput Packet p,
LL ll
 

Definition at line 253 of file mac/arp.cc.

References hdr_cmn::addr_type(), Node::address(), ARP_HDR_LEN, hdr_arp::arp_op, hdr_arp::arp_sha, hdr_arp::arp_spa, hdr_arp::arp_tha, hdr_arp::arp_tpa, arphead_, arplookup(), ARPOP_REPLY, ARPOP_REQUEST, hdr_ip::daddr(), LinkDelay::delay_, hdr_cmn::direction(), hdr_cmn::DOWN, hdr_cmn::error(), ETHERTYPE_ARP, Packet::free(), Address::get_nodeaddr(), HDR_ARP, HDR_CMN, Mac::hdr_dst(), HDR_IP, HDR_LL, HDR_MAC, Mac::hdr_src(), Mac::hdr_type(), ARPEntry::hold_, initialized(), Address::instance(), Scheduler::instance(), ll, LL_DATA, hdr_ll::lltype(), mac_, ARPEntry::macaddr_, hdr_cmn::next_hop(), node_, NS_AF_INET, NS_AF_NONE, nsaddr_t, Scheduler::schedule(), hdr_ll::seqno(), hdr_cmn::size(), and ARPEntry::up_.

Referenced by LL::recv().

00254 {
00255         Scheduler& s = Scheduler::instance();
00256         hdr_arp *ah = HDR_ARP(p);
00257         ARPEntry *llinfo;
00258 
00259         assert(initialized());
00260 
00261 #ifdef DEBUG
00262         fprintf(stderr,
00263                 "%d - %s\n\top: %x, sha: %x, tha: %x, spa: %x, tpa: %x\n",
00264                 node_->address(), __FUNCTION__, ah->arp_op,
00265                 ah->arp_sha, ah->arp_tha, ah->arp_spa, ah->arp_tpa);
00266 #endif
00267 
00268         if((llinfo = arplookup(ah->arp_spa)) == 0) {
00269 
00270                 /*
00271                  *  Create a new ARP entry
00272                  */
00273                 llinfo = new ARPEntry(&arphead_, ah->arp_spa);
00274         }
00275         assert(llinfo);
00276 
00277         llinfo->macaddr_ = ah->arp_sha;
00278         llinfo->up_ = 1;
00279 
00280         /*
00281          *  Can we send whatever's being held?
00282          */
00283         if(llinfo->hold_) {
00284                 hdr_cmn *ch = HDR_CMN(llinfo->hold_);
00285                 char *mh = (char*) HDR_MAC(llinfo->hold_);
00286                 hdr_ip *ih = HDR_IP(llinfo->hold_);
00287                 
00288                 // XXXHACK for now: 
00289                 // Future work: separate port-id from IP address ??
00290                 int dst = Address::instance().get_nodeaddr(ih->daddr());
00291                 
00292                 if((ch->addr_type() == NS_AF_NONE &&
00293                     dst == ah->arp_spa) ||
00294                    (NS_AF_INET == ch->addr_type() &&
00295                     ch->next_hop() == ah->arp_spa)) {
00296 #ifdef DEBUG
00297                         fprintf(stderr, "\tsending HELD packet.\n");
00298 #endif
00299                         mac_->hdr_dst(mh, ah->arp_sha);
00300                         s.schedule(ll->downtarget_, llinfo->hold_, delay_);
00301                         llinfo->hold_ = 0;
00302                 }
00303                 else {
00304                         fprintf(stderr, "\tfatal ARP error...\n");
00305                         exit(1);
00306                 }
00307         }
00308 
00309         if(ah->arp_op == ARPOP_REQUEST &&
00310                 ah->arp_tpa == node_->address()) {
00311                 
00312                 hdr_cmn *ch = HDR_CMN(p);
00313                 char    *mh = (char*)HDR_MAC(p);
00314                 hdr_ll  *lh = HDR_LL(p);
00315 
00316                 ch->size() = ARP_HDR_LEN;
00317                 ch->error() = 0;
00318                 ch->direction() = hdr_cmn::DOWN; // send this pkt down
00319 
00320                 mac_->hdr_dst(mh, ah->arp_sha);
00321                 mac_->hdr_src(mh, ll->mac_->addr());
00322                 mac_->hdr_type(mh, ETHERTYPE_ARP);
00323 
00324                 lh->seqno() = 0;
00325                 lh->lltype() = LL_DATA;
00326 
00327                 // ah->arp_hrd = 
00328                 // ah->arp_pro =
00329                 // ah->arp_hln =
00330                 // ah->arp_pln =
00331 
00332                 ah->arp_op  = ARPOP_REPLY;
00333                 ah->arp_tha = ah->arp_sha;
00334                 ah->arp_sha = ll->mac_->addr();
00335 
00336                 nsaddr_t t = ah->arp_spa;
00337                 ah->arp_spa = ah->arp_tpa;
00338                 ah->arp_tpa = t;
00339 
00340                 s.schedule(ll->downtarget_, p, delay_);
00341                 return;
00342         }
00343         Packet::free(p);
00344 }

Here is the call graph for this function:

ARPEntry * ARPTable::arplookup nsaddr_t  dst  ) 
 

Definition at line 202 of file mac/arp.cc.

References arphead_, ARPEntry::ipaddr_, and ARPEntry::nextarp().

Referenced by OmniMcastAgent::ArpBufferCheck(), DiffusionAgent::ArpBufferCheck(), arpinput(), arpresolve(), OmniMcastAgent::StickPacketInArpBuffer(), and DiffusionAgent::StickPacketInArpBuffer().

00203 {
00204         ARPEntry *a;
00205 
00206         for(a = arphead_.lh_first; a; a = a->nextarp()) {
00207                 if(a->ipaddr_ == dst)
00208                         return a;
00209         }
00210         return 0;
00211 }

Here is the call graph for this function:

void ARPTable::arprequest nsaddr_t  src,
nsaddr_t  dst,
LL ll
 

Definition at line 215 of file mac/arp.cc.

References Packet::alloc(), ARP_HDR_LEN, hdr_arp::arp_hln, hdr_arp::arp_hrd, hdr_arp::arp_op, hdr_arp::arp_pln, hdr_arp::arp_pro, hdr_arp::arp_sha, hdr_arp::arp_spa, hdr_arp::arp_tha, hdr_arp::arp_tpa, ARPHRD_ETHER, ARPOP_REQUEST, LinkDelay::delay_, hdr_cmn::direction(), hdr_cmn::DOWN, hdr_cmn::error(), ETHER_ADDR_LEN, ETHERTYPE_ARP, ETHERTYPE_IP, HDR_ARP, HDR_CMN, Mac::hdr_dst(), HDR_LL, HDR_MAC, Mac::hdr_src(), Mac::hdr_type(), hdr_cmn::iface(), Scheduler::instance(), ll, LL_DATA, hdr_ll::lltype(), mac_, MAC_BROADCAST, nsaddr_t, PT_ARP, hdr_cmn::ptype(), Scheduler::schedule(), hdr_ll::seqno(), hdr_cmn::size(), and hdr_cmn::uid().

Referenced by OmniMcastAgent::ArpBufferCheck(), DiffusionAgent::ArpBufferCheck(), and arpresolve().

00216 {
00217         Scheduler& s = Scheduler::instance();
00218         Packet *p = Packet::alloc();
00219 
00220         hdr_cmn *ch = HDR_CMN(p);
00221         char    *mh = (char*) HDR_MAC(p);
00222         hdr_ll  *lh = HDR_LL(p);
00223         hdr_arp *ah = HDR_ARP(p);
00224 
00225         ch->uid() = 0;
00226         ch->ptype() = PT_ARP;
00227         ch->size() = ARP_HDR_LEN;
00228         ch->iface() = -2;
00229         ch->error() = 0;
00230 
00231         mac_->hdr_dst(mh, MAC_BROADCAST);
00232         mac_->hdr_src(mh, ll->mac_->addr());
00233         mac_->hdr_type(mh, ETHERTYPE_ARP);
00234 
00235         lh->seqno() = 0;
00236         lh->lltype() = LL_DATA;
00237 
00238         ch->direction() = hdr_cmn::DOWN; // send this pkt down
00239         ah->arp_hrd = ARPHRD_ETHER;
00240         ah->arp_pro = ETHERTYPE_IP;
00241         ah->arp_hln = ETHER_ADDR_LEN;
00242         ah->arp_pln = sizeof(nsaddr_t);
00243         ah->arp_op  = ARPOP_REQUEST;
00244         ah->arp_sha = ll->mac_->addr();
00245         ah->arp_spa = src;
00246         ah->arp_tha = 0;                // what were're looking for
00247         ah->arp_tpa = dst;
00248 
00249         s.schedule(ll->downtarget_, p, delay_);
00250 }

Here is the call graph for this function:

int ARPTable::arpresolve nsaddr_t  dst,
Packet p,
LL ll
 

Definition at line 122 of file mac/arp.cc.

References Node::address(), ARP_MAX_REQUEST_COUNT, arphead_, arplookup(), arprequest(), ARPEntry::count_, Connector::drop(), DROP_IFQ_ARP_FULL, EADDRNOTAVAIL, HDR_CMN, Mac::hdr_dst(), HDR_MAC, ARPEntry::hold_, initialized(), ll, mac_, ARPEntry::macaddr_, node_, ARPEntry::up_, hdr_cmn::xmit_failure_, hdr_cmn::xmit_failure_data_, and hdr_cmn::xmit_reason_.

Referenced by LL::sendDown().

00123 {
00124         ARPEntry *llinfo ;
00125         
00126         assert(initialized());
00127         llinfo = arplookup(dst);
00128 
00129 #ifdef DEBUG
00130         fprintf(stderr, "%d - %s\n", node_->address(), __FUNCTION__);
00131 #endif
00132         
00133         if(llinfo && llinfo->up_) {
00134                 mac_->hdr_dst((char*) HDR_MAC(p), llinfo->macaddr_);
00135                 return 0;
00136         }
00137 
00138         if(llinfo == 0) {
00139                 /*
00140                  *  Create a new ARP entry
00141                  */
00142                 llinfo = new ARPEntry(&arphead_, dst);
00143         }
00144 
00145         if(llinfo->count_ >= ARP_MAX_REQUEST_COUNT) {
00146                 /*
00147                  * Because there is not necessarily a scheduled event between
00148                  * this callback and the point where the callback can return
00149                  * to this point in the code, the order of operations is very
00150                  * important here so that we don't get into an infinite loop.
00151                  *                                      - josh
00152                  */
00153                 Packet *t = llinfo->hold_;
00154 
00155                 llinfo->count_ = 0;
00156                 llinfo->hold_ = 0;
00157                 hdr_cmn* ch;
00158                 
00159                 if(t) {
00160                         ch = HDR_CMN(t);
00161 
00162                         if (ch->xmit_failure_) {
00163                                 ch->xmit_reason_ = 0;
00164                                 ch->xmit_failure_(t, ch->xmit_failure_data_);
00165                         }
00166                         else {
00167                                 drop(t, DROP_IFQ_ARP_FULL);
00168                         }
00169                 }
00170 
00171                 ch = HDR_CMN(p);
00172 
00173                 if (ch->xmit_failure_) {
00174                         ch->xmit_reason_ = 0;
00175                         ch->xmit_failure_(p, ch->xmit_failure_data_);
00176                 }
00177                 else {
00178                         drop(p, DROP_IFQ_ARP_FULL);
00179                 }
00180 
00181                 return EADDRNOTAVAIL;
00182         }
00183 
00184         llinfo->count_++;
00185         if(llinfo->hold_)
00186                 drop(llinfo->hold_, DROP_IFQ_ARP_FULL);
00187         llinfo->hold_ = p;
00188 
00189         /*
00190          *  We don't have a MAC address for this node.  Send an ARP Request.
00191          *
00192          *  XXX: Do I need to worry about the case where I keep ARPing
00193          *       for the SAME destination.
00194          */
00195         int src = node_->address(); // this host's IP addr
00196         arprequest(src, dst, ll);
00197         return EADDRNOTAVAIL;
00198 }

Here is the call graph for this function:

double LinkDelay::bandwidth  )  const [inline, inherited]
 

Definition at line 57 of file delay.h.

References LinkDelay::bandwidth_.

Referenced by REMQueue::command(), REDQueue::command(), JoBS::deque(), JoBS::enforceWC(), PushbackQueue::getBW(), CBQueue::insert_class(), CBQClass::newallot(), QSAgent::recv(), REMQueue::reset(), REDQueue::reset(), dsREDQueue::reset(), PushbackQueue::timeout(), and JoBS::updateStats().

00057 { return bandwidth_; }

int ARPTable::command int  argc,
const char *const *  argv
[virtual]
 

Reimplemented from LinkDelay.

Definition at line 112 of file mac/arp.cc.

References LinkDelay::command(), and Terminate().

00113 {
00114         if (argc == 2 && strcasecmp(argv[1], "reset") == 0) {
00115                 Terminate();
00116                 //FALL-THROUGH to give parents a chance to reset
00117         }
00118         return LinkDelay::command(argc, argv);
00119 }

Here is the call graph for this function:

void NsObject::debug const char *  fmt,
... 
[virtual, inherited]
 

Definition at line 102 of file object.cc.

References NsObject::debug_.

00103 {
00104         if (!debug_)
00105                 return;
00106         va_list ap;
00107         va_start(ap, fmt);
00108         vprintf(fmt, ap);
00109 }

double LinkDelay::delay  )  [inline, inherited]
 

Definition at line 53 of file delay.h.

References LinkDelay::delay_.

Referenced by REDQueue::command(), and Snoop::handle().

00053 { return delay_; }

int NsObject::delay_bind_dispatch const char *  varName,
const char *  localName,
TclObject tracer
[virtual, inherited]
 

Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent.

Definition at line 63 of file object.cc.

References NsObject::debug_.

Referenced by MPLSAddressClassifier::delay_bind_dispatch(), and Agent::delay_bind_dispatch().

00064 {
00065         if (delay_bind_bool(varName, localName, "debug_", &debug_, tracer)) 
00066                 return TCL_OK;
00067         return TclObject::delay_bind_dispatch(varName, localName, tracer);
00068 }

void NsObject::delay_bind_init_all  )  [virtual, inherited]
 

Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, and VegasTcpAgent.

Definition at line 57 of file object.cc.

Referenced by MPLSAddressClassifier::delay_bind_init_all(), and Agent::delay_bind_init_all().

00058 {
00059         delay_bind_init_one("debug_");
00060 }

void Connector::drop Packet p,
const char *  s
[protected, virtual, inherited]
 

Definition at line 114 of file connector.cc.

References Connector::drop_, Packet::free(), and NsObject::recv().

00115 {
00116         if (drop_ != 0)
00117                 drop_->recv(p, s);
00118         else
00119                 Packet::free(p);
00120 }

Here is the call graph for this function:

void Connector::drop Packet p  )  [virtual, inherited]
 

Definition at line 106 of file connector.cc.

References Connector::drop_, Packet::free(), and NsObject::recv().

Referenced by DSRAgent::acceptRouteReply(), arpresolve(), JoBS::dropFront(), Vq::dropPacketForECN(), DSRAgent::dropSendBuff(), JoBS::dropTail(), dsREDQueue::edrop(), Vq::enque(), SRR::enque(), SimpleIntServ::enque(), SFQ::enque(), rtqueue::enque(), RIOQueue::enque(), REMQueue::enque(), REDQueue::enque(), RedPDQueue::enque(), PIQueue::enque(), Marker::enque(), GK::enque(), dsREDQueue::enque(), DRR::enque(), DropTail::enque(), Demarker::enque(), aodv_rqueue::enque(), toraAgent::forward(), AODV::forward(), LandmarkAgent::ForwardPacket(), DSDV_Agent::forwardPacket(), DSRAgent::getRouteForPacket(), Snoop::handle(), DSRAgent::handleFlowForwarding(), DSRAgent::handleForwarding(), DSDV_Agent::lost_link(), TCPTapAgent::processpkt(), CMUPriQueue::prq_enqueue(), rtqueue::purge(), imepAgent::purgeReXmitQ(), SessionTTLChecker::recv(), TTLChecker::recv(), toraAgent::recv(), FullTcpAgent::recv(), BayFullTcpAgent::recv(), TBF::recv(), SatLL::recv(), LL::recv(), GAFPartner::recv(), FloodAgent::recv(), Filter::recv(), DynamicLink::recv(), DSDV_Agent::recv(), AODV::recv(), AODV::recvError(), PriQueue::recvHighPriority(), AODV::recvReply(), toraAgent::reset(), Queue< T >::reset(), LinkDelay::reset(), AODV::rt_ll_failed(), AODV::rt_purge(), AODV::rt_resolve(), toraAgent::rtRoutePacket(), TCPTapAgent::sendpkt(), TapAgent::sendpkt(), IPTapAgent::sendpkt(), AODV::sendRequest(), SatLL::sendUp(), LL::sendUp(), PriQueue::Terminate(), DSRAgent::Terminate(), CMUPriQueue::Terminate(), Terminate(), and DSRAgent::undeliverablePkt().

00107 {
00108         if (drop_ != 0)
00109                 drop_->recv(p);
00110         else
00111                 Packet::free(p);
00112 }

Here is the call graph for this function:

void LinkDelay::handle Event e  )  [virtual, inherited]
 

Reimplemented from NsObject.

Reimplemented in LL.

Definition at line 115 of file delay.cc.

References PacketQueue::deque(), LinkDelay::itq_, LinkDelay::send(), and Event::time_.

00116 {
00117         Packet *p = itq_->deque();
00118         assert(p->time_ == e->time_);
00119         send(p, (Handler*) NULL);
00120 }

Here is the call graph for this function:

int ARPTable::initialized  )  [inline, private]
 

Definition at line 129 of file arp.h.

References mac_, and node_.

Referenced by arpinput(), and arpresolve().

00129 { return node_ && mac_; }

int NsObject::isdebug  )  const [inline, inherited]
 

Definition at line 61 of file object.h.

References NsObject::debug_.

00061 { return debug_; }

ARPTable::LIST_ENTRY ARPTable   ) 
 

void LinkDelay::pktintran int  src,
int  group
[inherited]
 

Definition at line 122 of file delay.cc.

References hdr_CtrMcast::access(), hdr_ip::access(), hdr_ip::daddr(), LinkDelay::dynamic_, hdr_ip::flowid(), hdr_CtrMcast::group(), LinkDelay::itq_, len, PacketQueue::length(), PacketQueue::lookup(), hdr_ip::saddr(), hdr_CtrMcast::src(), and LinkDelay::total_.

Referenced by LinkDelay::command().

00123 {
00124         int reg = 1;
00125         int prune = 30;
00126         int graft = 31;
00127         int data = 0;
00128         for (int i=0; i<4; i++) {
00129                 total_[i] = 0;
00130         }
00131 
00132         if (! dynamic_)
00133                 return;
00134 
00135         int len = itq_->length();
00136         while (len) {
00137                 len--;
00138                 Packet* p = itq_->lookup(len);
00139                 hdr_ip* iph = hdr_ip::access(p);
00140                 if (iph->flowid() == prune) {
00141                         if (iph->saddr() == src && iph->daddr() == group) {
00142                                 total_[0]++;
00143                         }
00144                 } else if (iph->flowid() == graft) {
00145                         if (iph->saddr() == src && iph->daddr() == group) {
00146                                 total_[1]++;
00147                         }
00148                 } else if (iph->flowid() == reg) {
00149                         hdr_CtrMcast* ch = hdr_CtrMcast::access(p);
00150                         if (ch->src() == src+1 && ch->group() == group) {
00151                                 total_[2]++;
00152                         }
00153                 } else if (iph->flowid() == data) {
00154                         if (iph->saddr() == src+1 && iph->daddr() == group) {
00155                                 total_[3]++;
00156                         }
00157                 }
00158         }
00159         //printf ("%f %d %d %d %d\n", Scheduler::instance().clock(), total_[0], total_[1], total_[2],total_[3]);
00160 }

Here is the call graph for this function:

void NsObject::recv Packet p,
const char *  s
[virtual, inherited]
 

Reimplemented in CMUTrace.

Definition at line 96 of file object.cc.

References Packet::free().

00097 {
00098         Packet::free(p);
00099 }

Here is the call graph for this function:

void LinkDelay::recv Packet p,
Handler
[virtual, inherited]
 

Reimplemented from Connector.

Reimplemented in LL, SatLL, and LLSnoop.

Definition at line 81 of file delay.cc.

References LinkDelay::delay_, LinkDelay::dynamic_, PacketQueue::enque(), Scheduler::instance(), LinkDelay::intr_, LinkDelay::itq_, Scheduler::schedule(), Connector::target_, Event::time_, and LinkDelay::txtime().

00082 {
00083         double txt = txtime(p);
00084         Scheduler& s = Scheduler::instance();
00085         if (dynamic_) {
00086                 Event* e = (Event*)p;
00087                 e->time_= txt + delay_;
00088                 itq_->enque(p); // for convinience, use a queue to store packets in transit
00089                 s.schedule(this, p, txt + delay_);
00090         } else {
00091                 s.schedule(target_, p, txt + delay_);
00092         }
00093         s.schedule(h, &intr_, txt);
00094 }

Here is the call graph for this function:

virtual void NsObject::recvOnly Packet  )  [inline, virtual, inherited]
 

Reimplemented in Agent, and Trace.

Definition at line 56 of file object.h.

Referenced by Trace::recvOnly().

00056 {};

void LinkDelay::reset  )  [protected, virtual, inherited]
 

Reimplemented from NsObject.

Definition at line 101 of file delay.cc.

References Scheduler::cancel(), PacketQueue::deque(), Connector::drop(), Scheduler::instance(), LinkDelay::itq_, and PacketQueue::length().

00102 {
00103         Scheduler& s= Scheduler::instance();
00104 
00105         if (itq_ && itq_->length()) {
00106                 Packet *np;
00107                 // walk through packets currently in transit and kill 'em
00108                 while ((np = itq_->deque()) != 0) {
00109                         s.cancel(np);
00110                         drop(np);
00111                 }
00112         }
00113 }

Here is the call graph for this function:

void LinkDelay::send Packet p,
Handler
[inherited]
 

Reimplemented from Connector.

Definition at line 96 of file delay.cc.

References NsObject::recv(), and Connector::target_.

Referenced by LinkDelay::handle().

00097 {
00098         target_->recv(p, (Handler*) NULL);
00099 }

Here is the call graph for this function:

NsObject* Connector::target  )  [inline, inherited]
 

Definition at line 48 of file connector.h.

References Connector::target_.

Referenced by JoBS::assignRateDropsADC(), FQ::deque(), QSAgent::recv(), and MIPMHAgent::reg().

00048 { return target_; }

void ARPTable::Terminate void   ) 
 

Definition at line 88 of file mac/arp.cc.

References arphead_, Connector::drop(), DROP_END_OF_SIMULATION, and ll.

Referenced by command().

00089 {
00090         ARPEntry *ll;
00091         for(ll = arphead_.lh_first; ll; ll = ll->arp_link_.le_next) {
00092                 if(ll->hold_) {
00093                         drop(ll->hold_, DROP_END_OF_SIMULATION);
00094                         ll->hold_ = 0;
00095                 }
00096         }
00097 }

Here is the call graph for this function:

double LinkDelay::txtime Packet p  )  [inline, inherited]
 

Definition at line 54 of file delay.h.

References hdr_cmn::access(), LinkDelay::bandwidth_, and hdr_cmn::size().

Referenced by LinkDelay::recv(), and CBQClass::update().

00054                                         {
00055                 return (8. * hdr_cmn::access(p)->size() / bandwidth_);
00056         }

Here is the call graph for this function:


Member Data Documentation

ARPEntry_List ARPTable::arphead_ [private]
 

Definition at line 131 of file arp.h.

Referenced by arpinput(), arplookup(), arpresolve(), ARPTable(), and Terminate().

ARPTable_List ARPTable::athead_ = { 0 } [static]
 

Definition at line 85 of file mac/arp.cc.

Referenced by ARPTable().

double LinkDelay::bandwidth_ [protected, inherited]
 

Definition at line 62 of file delay.h.

Referenced by LinkDelay::bandwidth(), LinkDelay::LinkDelay(), and LinkDelay::txtime().

int NsObject::debug_ [protected, inherited]
 

Reimplemented in FECModel, FloodAgent, and LandmarkAgent.

Definition at line 66 of file object.h.

Referenced by REDQueue::command(), RedPDQueue::command(), PushbackQueue::command(), NsObject::debug(), NsObject::delay_bind_dispatch(), RedPDQueue::enque(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), and REDQueue::reset().

double LinkDelay::delay_ [protected, inherited]
 

Definition at line 63 of file delay.h.

Referenced by arpinput(), arprequest(), LinkDelay::delay(), LinkDelay::LinkDelay(), LinkDelay::recv(), SatLL::sendDown(), LL::sendDown(), SatLL::sendUp(), and LL::sendUp().

NsObject* Connector::drop_ [protected, inherited]
 

Definition at line 57 of file connector.h.

Referenced by Connector::command(), Connector::drop(), and ErrorModel::recv().

int LinkDelay::dynamic_ [protected, inherited]
 

Definition at line 65 of file delay.h.

Referenced by LinkDelay::command(), LinkDelay::pktintran(), and LinkDelay::recv().

Event LinkDelay::intr_ [protected, inherited]
 

Definition at line 64 of file delay.h.

Referenced by LLSnoop::recv(), and LinkDelay::recv().

PacketQueue* LinkDelay::itq_ [protected, inherited]
 

Definition at line 67 of file delay.h.

Referenced by LinkDelay::command(), LinkDelay::handle(), LinkDelay::pktintran(), LinkDelay::recv(), and LinkDelay::reset().

Mac* ARPTable::mac_ [private]
 

Definition at line 133 of file arp.h.

Referenced by arpinput(), arprequest(), arpresolve(), ARPTable(), and initialized().

MobileNode* ARPTable::node_ [private]
 

Definition at line 132 of file arp.h.

Referenced by arpinput(), arpresolve(), ARPTable(), and initialized().

NsObject* Connector::target_ [protected, inherited]
 

Definition at line 56 of file connector.h.

Referenced by SRAgent::command(), SA_Agent::command(), IvsReceiver::command(), MultiFieldFilter::command(), Filter::command(), Connector::command(), DiffusionAgent::DiffusionAgent(), DSRAgent::DSRAgent(), PromotionTimer::expire(), FloodingAgent::FloodingAgent(), toraAgent::forward(), AODV::forward(), LandmarkAgent::ForwardPacket(), DSDV_Agent::forwardPacket(), SensorQueryAgent::generate_query(), DSDVTriggerHandler::handle(), AckRecons::handle(), DSRAgent::handlePacketReceipt(), DSDV_Agent::helper_callback(), AODV::initialized(), DSDV_Agent::lost_link(), OmniMcastAgent::OmniMcastAgent(), LandmarkAgent::periodic_callback(), LandmarkAgent::ProcessHierUpdate(), TCPTapAgent::processpkt(), IPTapAgent::processpkt(), CMUPriQueue::prq_enqueue(), CMUPriQueue::prq_resume(), DequeTrace::recv(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), TBF::recv(), SRMAgent::recv(), SSMSRMAgent::recv(), SatDequeTrace::recv(), SAack_Agent::recv(), Queue< T >::recv(), PingResponder::recv(), MIPEncapsulator::recv(), LmsAgent::recv(), HackLossyLink::recv(), GAFPartner::recv(), FQ::recv(), FloodAgent::recv(), ErrorModel::recv(), DynamicLink::recv(), DumbAgent::recv(), DSRAgent::recv(), DelayModel::recv(), LinkDelay::recv(), CtrMcastDecap::recv(), CtrMcastEncap::recv(), CMUTrace::recv(), PriQueue::recvHighPriority(), Trace::recvOnly(), TapAgent::recvpkt(), Queue< T >::resume(), LinkDelay::send(), Connector::send(), Agent::send(), MIPBSAgent::send_ads(), SRMAgent::send_ctrl(), SSMSRMAgent::send_ctrl(), MFTPSndAgent::send_data(), LmsSender::send_dmcast(), LmsReceiver::send_dmcast(), LmsAgent::send_downstream(), SSMSRMAgent::send_glb_sess(), LmsSender::send_lms_pkt(), SSMSRMAgent::send_loc_sess(), MFTPRcvAgent::send_nak(), LmsReceiver::send_nak(), LmsReceiver::send_refresh(), SSMSRMAgent::send_rep_sess(), SRMAgent::send_sess(), MIPMHAgent::send_sols(), LmsSender::send_spm(), MFTPSndAgent::send_status_request(), LmsAgent::send_upstream(), LandmarkAgent::SendChangedTagListUpdate(), AODV::sendError(), AODV::sendHello(), UdpAgent::sendmsg(), SRMAgent::sendmsg(), SA_Agent::sendmsg(), RTPAgent::sendmsg(), LmsSender::sendmsg(), DSDV_Agent::sendOutBCastPkt(), SA_Agent::sendpkt(), rtProtoDV::sendpkt(), RTPAgent::sendpkt(), RTCPAgent::sendpkt(), IvsSource::sendpkt(), AODV::sendReply(), AODV::sendRequest(), LmsSender::solicit_naks(), Connector::target(), TBF::timeout(), and toraAgent::tora_output().

int LinkDelay::total_[4] [protected, inherited]
 

Definition at line 68 of file delay.h.

Referenced by LinkDelay::command(), and LinkDelay::pktintran().


The documentation for this class was generated from the following files:
Generated on Tue Apr 20 12:33:12 2004 for NS2.26SourcesOriginal by doxygen 1.3.3