LinkHead Class Reference

#include <node.h>

Inheritance diagram for LinkHead:

Connector NsObject TclObject Handler SatLinkHead Collaboration diagram for LinkHead:

Collaboration graph
[legend]

Detailed Description

Definition at line 80 of file node.h.

Public Member Functions

virtual void debug (const char *fmt,...)
virtual int delay_bind_dispatch (const char *varName, const char *localName, TclObject *tracer)
virtual void delay_bind_init_all ()
virtual void drop (Packet *p)
void insertlink (struct linklist_head *head)
int isdebug () const
int32_t label ()
 LinkHead ()
LinkHeadnextlinkhead (void) const
Nodenode ()
virtual void recv (Packet *p, const char *s)
virtual void recvOnly (Packet *)
void setDropTarget (NsObject *dt)
void target (NsObject *target)
NsObjecttarget ()
int type ()

Protected Member Functions

virtual int command (int argc, const char *const *argv)
virtual void drop (Packet *p, const char *s)
void handle (Event *)
 LIST_ENTRY (LinkHead) link_entry_
void recv (Packet *, Handler *callback=0)
virtual void reset ()
void send (Packet *p, Handler *h)

Protected Attributes

int debug_
NsObjectdrop_
NetworkInterfacenet_if_
Nodenode_
NsObjecttarget_
int type_


Constructor & Destructor Documentation

LinkHead::LinkHead  ) 
 

Definition at line 58 of file node.cc.

00058 : net_if_(0), node_(0), type_(0) { }


Member Function Documentation

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

Reimplemented from Connector.

Reimplemented in SatLinkHead.

Definition at line 70 of file node.cc.

References Connector::command(), net_if_, and node_.

Referenced by SatLinkHead::command().

00071 {
00072         if (argc == 3) {
00073         if(strcmp(argv[1], "setnetinf") == 0) {
00074             net_if_ =
00075                 (NetworkInterface*) TclObject::lookup(argv[2]);
00076             if (net_if_ == 0)
00077                 return TCL_ERROR;
00078             return TCL_OK;
00079         } else if(strcmp(argv[1], "setnode") == 0) {
00080             node_ = (Node*) TclObject::lookup(argv[2]); 
00081             if (node_ == 0)
00082                 return TCL_ERROR;
00083             return TCL_OK;
00084         }
00085     }
00086     return (Connector::command(argc, argv));
00087 }

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 }

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

Reimplemented in BayFullTcpAgent, Agent, MPLSAddressClassifier, LDPAgent, HbAfterRtoSctpAgent, MfrHbAfterRtoSctpAgent, MfrTimestampSctpAgent, MultipleFastRtxSctpAgent, NewRenoSctpAgent, TimestampSctpAgent, SctpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, VegasTcpAgent, XcpAgent, and XcpSink.

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, HbAfterRtoSctpAgent, MfrHbAfterRtoSctpAgent, MfrTimestampSctpAgent, MultipleFastRtxSctpAgent, NewRenoSctpAgent, TimestampSctpAgent, SctpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, TcpSink, TcpAgent, VegasTcpAgent, XcpAgent, and XcpSink.

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]
 

Reimplemented in XCPQueue.

Definition at line 106 of file connector.cc.

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

Referenced by ARPTable::arpresolve(), XCPQueue::drop(), 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(), DSDV_Agent::forwardPacket(), DSRAgent::getRouteForPacket(), HDLC::goBackNMode(), Snoop::handle(), DSRAgent::handleFlowForwarding(), DSRAgent::handleForwarding(), HDLC::handleRR(), DSDV_Agent::lost_link(), TCPTapAgent::processpkt(), CMUPriQueue::prq_enqueue(), rtqueue::purge(), SessionTTLChecker::recv(), TTLChecker::recv(), FullTcpAgent::recv(), BayFullTcpAgent::recv(), SatLL::recv(), LL::recv(), GAFPartner::recv(), Filter::recv(), DynamicLink::recv(), AODV::recvError(), PriQueue::recvHighPriority(), HDLC::recvIncoming(), toraAgent::reset(), HDLC::reset(), Queue< T >::reset(), LinkDelay::reset(), AODV::rt_ll_failed(), AODV::rt_purge(), toraAgent::rtRoutePacket(), HDLC::selectiveRepeatMode(), AODV::sendRequest(), SatLL::sendUp(), LL::sendUp(), DropTail::shrink_queue(), PriQueue::Terminate(), DSRAgent::Terminate(), CMUPriQueue::Terminate(), ARPTable::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 NsObject::handle Event  )  [protected, virtual, inherited]
 

Implements Handler.

Reimplemented in LinkDelay, LL, AckRecons, and Snoop.

Definition at line 91 of file object.cc.

References NsObject::recv().

00092 {
00093     recv((Packet*)e);
00094 }

Here is the call graph for this function:

void LinkHead::insertlink struct linklist_head *  head  )  [inline]
 

Definition at line 91 of file node.h.

References LIST_INSERT_HEAD.

Referenced by Node::command().

00091                                                        {
00092                 LIST_INSERT_HEAD(head, this, link_entry_);
00093         }

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

Definition at line 61 of file object.h.

References NsObject::debug_.

00061 { return debug_; }

int32_t LinkHead::label  ) 
 

Definition at line 60 of file node.cc.

References NetworkInterface::intf_label(), and net_if_.

Referenced by Node::intf_to_target().

00061 {
00062     if (net_if_)
00063         return net_if_->intf_label();
00064     printf("Configuration error:  Network Interface missing\n");
00065     exit(1);
00066     // Make msvc happy
00067     return 0;
00068 }

Here is the call graph for this function:

LinkHead::LIST_ENTRY LinkHead   )  [protected]
 

LinkHead* LinkHead::nextlinkhead void   )  const [inline]
 

Definition at line 94 of file node.h.

Referenced by SatRouteObject::compute_topology(), LinkHandoffMgr::get_peer_next_linkhead(), SatLinkHandoffMgr::handoff(), TermLinkHandoffMgr::handoff(), and Node::intf_to_target().

00094 { return link_entry_.le_next; }

Node* LinkHead::node  )  [inline]
 

Reimplemented in SatLinkHead.

Definition at line 85 of file node.h.

References node_.

Referenced by LinkHandoffMgr::get_peer_linkhead(), and SatPhy::sendDown().

00085 { return node_; }

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 Connector::recv Packet ,
Handler callback = 0
[protected, virtual, inherited]
 

Implements NsObject.

Reimplemented in AdaptiveRcvr, SA_Agent, SALink, TBF, AODV, aodv_rqueue, PingAgent, RTPAgent, UdpAgent, BayFullTcpAgent, Filter, Agent, Decapsulator, Encapsulator, IvsSource, IvsReceiver, MessageAgent, MessagePassingAgent, NetworkInterface, PktCounter, SessionHelper, TPAgent, TTLChecker, SessionTTLChecker, DiffusionProb, DiffusionRate, SinkAgent, DiffusionAgent, FloodingAgent, OmniMcastAgent, DSDV_Agent, AddSR, DSRProto, DSRAgent, IcmpAgent, NatAgent, PingResponder, TapAgent, GAFAgent, GAFPartner, imepAgent, LinkDelay, DynamicLink, HackLossyLink, rtProtoLS, LL, CtrMcastEncap, CtrMcastDecap, LmsAgent, LmsReceiver, LmsSender, mcastControlAgent, SSMSRMAgent, SRMAgent, DumbAgent, MIPEncapsulator, MIPBSAgent, MIPMHAgent, LDPAgent, PingAgent, PLMLossMonitor, PushbackAgent, QSAgent, CBQClass, CBQueue, Delayer, DelayModel, CMUPriQueue, ErrorModel, ErrorModule, FQ, PriQueue, Queue< T >, rtqueue, RapAgent, rtProtoDV, HDLC, SatLL, SatRouteAgent, SatDequeTrace, SctpAgent, FloodAgent, LandmarkAgent, SensorQueryAgent, SRAgent, RTCPAgent, SAack_Agent, LLSnoop, AbsTcpAgent, AbsTcpSink, AbsDelAckSink, DropTargetAgent, TcpAsymSink, FackTcpAgent, FullTcpAgent, IntTcpAgent, QSNewRenoTcpAgent, QSTcpSink, RBPVegasTcpAgent, RBPRenoTcpAgent, RFC793eduTcpAgent, SackRHTcpAgent, Sack1TcpAgent, TcpSink, DelAckSink, TcpAgent, RenoTcpAgent, NewRenoTcpAgent, VegasTcpAgent, TfrcSinkAgent, TfrcAgent, LossMonitor, MeasureMod, SnoopQueueIn, SnoopQueueOut, SnoopQueueDrop, SnoopQueueTagger, SnoopQueueEDrop, toraAgent, CMUTrace, TraceIp, TraceIpMac, Trace, DequeTrace, HttpInvalAgent, SimpleTcpAgent, XcpSink, and XCPWrapQ.

Definition at line 101 of file connector.cc.

References Connector::send().

00102 {
00103     send(p, h);
00104 }

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 NsObject::reset  )  [protected, virtual, inherited]
 

Reimplemented in BayFullTcpAgent, HashClassifier, IvsSource, dsREDQueue, DiffusionRate, SinkAgent, DiffusionAgent, FloodingAgent, OmniMcastAgent, LinkDelay, CBQueue, DropTail, ErrorModel, PIQueue, Queue< T >, RedPDQueue, REDQueue, REMQueue, RIOQueue, Snoop, FackTcpAgent, FullTcpAgent, SackFullTcpAgent, RFC793eduTcpAgent, Sack1TcpAgent, TcpSink, DelAckSink, TcpAgent, VegasTcpAgent, toraAgent, Queue< T >, and XcpSink.

Definition at line 70 of file object.cc.

Referenced by NsObject::command().

00071 {
00072 }

void Connector::send Packet p,
Handler h
[inline, protected, inherited]
 

Reimplemented in Agent, and LinkDelay.

Definition at line 56 of file connector.h.

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

Referenced by SessionTTLChecker::recv(), TTLChecker::recv(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), SnoopQueueEDrop::recv(), SnoopQueueTagger::recv(), SnoopQueueDrop::recv(), SnoopQueueOut::recv(), SnoopQueueIn::recv(), PktCounter::recv(), NetworkInterface::recv(), MeasureMod::recv(), Filter::recv(), Connector::recv(), CMUTrace::recv(), and AddSR::recv().

00056 { target_->recv(p, h); }

Here is the call graph for this function:

void Connector::setDropTarget NsObject dt  )  [inline, inherited]
 

Definition at line 51 of file connector.h.

References Connector::drop_.

Referenced by XCPWrapQ::command().

00051 {drop_ = dt; } 

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

Definition at line 49 of file connector.h.

References Connector::target(), and Connector::target_.

00049 { target_ = target; }

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(), MIPMHAgent::reg(), MIPBSAgent::send_ads(), and Connector::target().

00048 { return target_; }

int LinkHead::type  )  [inline]
 

Definition at line 86 of file node.h.

References type_.

Referenced by SatRouteObject::compute_topology(), SatChannel::find_peer_mac_addr(), LinkHandoffMgr::get_peer_next_linkhead(), SatLinkHandoffMgr::handoff(), and TermLinkHandoffMgr::handoff().

00086 { return type_; }


Field Documentation

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(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), SctpAgent::Reset(), REDQueue::reset(), DropTail::shrink_queue(), and Delayer::try_send().

NsObject* Connector::drop_ [protected, inherited]
 

Definition at line 59 of file connector.h.

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

NetworkInterface* LinkHead::net_if_ [protected]
 

Definition at line 98 of file node.h.

Referenced by command(), and label().

Node* LinkHead::node_ [protected]
 

Definition at line 99 of file node.h.

Referenced by command(), SatLinkHead::node(), and node().

NsObject* Connector::target_ [protected, inherited]
 

Definition at line 58 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(), SctpAgent::ForceSource(), toraAgent::forward(), AODV::forward(), DSDV_Agent::forwardPacket(), SensorQueryAgent::generate_query(), DSDVTriggerHandler::handle(), AckRecons::handle(), DSDV_Agent::helper_callback(), DSDV_Agent::lost_link(), OmniMcastAgent::OmniMcastAgent(), LandmarkAgent::periodic_callback(), TCPTapAgent::processpkt(), IPTapAgent::processpkt(), CMUPriQueue::prq_enqueue(), CMUPriQueue::prq_resume(), Trace::recv(), TraceIpMac::recv(), TraceIp::recv(), SRMAgent::recv(), SSMSRMAgent::recv(), SAack_Agent::recv(), Queue< T >::recv(), PingResponder::recv(), MIPEncapsulator::recv(), LmsAgent::recv(), HackLossyLink::recv(), FQ::recv(), ErrorModel::recv(), DynamicLink::recv(), DSRAgent::recv(), DelayModel::recv(), LinkDelay::recv(), CtrMcastDecap::recv(), CtrMcastEncap::recv(), CMUTrace::recv(), Trace::recvOnly(), Queue< T >::resume(), LinkDelay::send(), Connector::send(), Agent::send(), MIPBSAgent::send_ads(), SRMAgent::send_ctrl(), SSMSRMAgent::send_ctrl(), LmsSender::send_dmcast(), LmsReceiver::send_dmcast(), LmsAgent::send_downstream(), LmsSender::send_lms_pkt(), LmsReceiver::send_nak(), LmsReceiver::send_refresh(), MIPMHAgent::send_sols(), LmsSender::send_spm(), LmsAgent::send_upstream(), LandmarkAgent::SendChangedTagListUpdate(), AODV::sendError(), AODV::sendHello(), UdpAgent::sendmsg(), SRMAgent::sendmsg(), SA_Agent::sendmsg(), RTPAgent::sendmsg(), MessagePassingAgent::sendmsg(), LmsSender::sendmsg(), DSDV_Agent::sendOutBCastPkt(), SA_Agent::sendpkt(), rtProtoDV::sendpkt(), RTPAgent::sendpkt(), RTCPAgent::sendpkt(), IvsSource::sendpkt(), AODV::sendReply(), AODV::sendRequest(), TPAgent::sendto(), MessagePassingAgent::sendto(), SctpAgent::SetSource(), LmsSender::solicit_naks(), Connector::target(), toraAgent::tora_output(), and Delayer::try_send().

int LinkHead::type_ [protected]
 

Definition at line 100 of file node.h.

Referenced by SatLinkHead::command(), and type().


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:12:14 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6