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

SatLinkHead Class Reference

#include <satlink.h>

Inheritance diagram for SatLinkHead:

Inheritance graph
[legend]
Collaboration diagram for SatLinkHead:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SatLinkHead ()
SatPhyphy_tx ()
SatPhyphy_rx ()
SatMacmac ()
SatLLsatll ()
Queuequeue ()
ErrorModelerrmodel ()
SatNodenode ()
int type ()
int32_t label ()
void insertlink (struct linklist_head *head)
LinkHeadnextlinkhead (void) const
NsObjecttarget ()
virtual void drop (Packet *p)
virtual void recv (Packet *p, const char *s)
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,...)

Public Attributes

int linkup_

Protected Member Functions

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

Protected Attributes

SatPhyphy_tx_
SatPhyphy_rx_
SatMacmac_
SatLLsatll_
Queuequeue_
ErrorModelerrmodel_
NetworkInterfacenet_if_
Nodenode_
int type_
NsObjecttarget_
NsObjectdrop_
int debug_

Constructor & Destructor Documentation

SatLinkHead::SatLinkHead  ) 
 

Definition at line 72 of file satlink.cc.

00072                          : linkup_(1), phy_tx_(0), phy_rx_(0), mac_(0), satll_(0), queue_(0), errmodel_(0)
00073 {
00074 }


Member Function Documentation

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

Reimplemented from LinkHead.

Definition at line 76 of file satlink.cc.

References LinkHead::command(), errmodel_, LINK_GSL, LINK_GSL_GEO, LINK_GSL_POLAR, LINK_GSL_REPEATER, LINK_ISL_CROSSSEAM, LINK_ISL_INTERPLANE, LINK_ISL_INTRAPLANE, mac_, phy_rx_, phy_tx_, queue_, satll_, and LinkHead::type_.

00077 {
00078         if (argc == 2) {
00079         } else if (argc == 3) {
00080                 if (strcmp(argv[1], "set_type") == 0) {
00081                         if (strcmp(argv[2], "geo") == 0) {
00082                                 type_ = LINK_GSL_GEO;
00083                                 return TCL_OK;
00084                         } else if (strcmp(argv[2], "polar") == 0) {
00085                                 type_ = LINK_GSL_POLAR;
00086                                 return TCL_OK;
00087                         } else if (strcmp(argv[2], "gsl") == 0) {
00088                                 type_ = LINK_GSL;
00089                                 return TCL_OK;
00090                         } else if (strcmp(argv[2], "gsl-repeater") == 0) {
00091                                 type_ = LINK_GSL_REPEATER;
00092                                 return TCL_OK;
00093                         } else if (strcmp(argv[2], "interplane") == 0) {
00094                                 type_ = LINK_ISL_INTERPLANE;
00095                                 return TCL_OK;
00096                         } else if (strcmp(argv[2], "intraplane") == 0) {
00097                                 type_ = LINK_ISL_INTRAPLANE;
00098                                 return TCL_OK;
00099                         } else if (strcmp(argv[2], "crossseam") == 0) {
00100                                 type_ = LINK_ISL_CROSSSEAM;
00101                                 return TCL_OK;
00102                         } else {
00103                                 printf("Unknown link type: %s\n", argv[2]);
00104                                 exit(1);
00105                         } 
00106                 }
00107                 if (strcmp(argv[1], "setll") == 0) {
00108                         satll_ = (SatLL*) TclObject::lookup(argv[2]);
00109                         if (satll_ == 0)
00110                                 return TCL_ERROR;
00111                         return TCL_OK;
00112                 } else if(strcmp(argv[1], "setphytx") == 0) {
00113                         phy_tx_ = (SatPhy*) TclObject::lookup(argv[2]);
00114                         if (phy_tx_ == 0)
00115                                 return TCL_ERROR;
00116                         return TCL_OK;
00117                 } else if(strcmp(argv[1], "setphyrx") == 0) {
00118                         phy_rx_ = (SatPhy*) TclObject::lookup(argv[2]);
00119                         if (phy_rx_ == 0)
00120                                 return TCL_ERROR;
00121                         return TCL_OK;
00122                 } else if(strcmp(argv[1], "setmac") == 0) {
00123                         mac_ = (SatMac*) TclObject::lookup(argv[2]);
00124                         if (mac_ == 0)
00125                                 return TCL_ERROR;
00126                         return TCL_OK;
00127                 } else if(strcmp(argv[1], "setqueue") == 0) {
00128                         queue_ = (Queue*) TclObject::lookup(argv[2]);
00129                         if (queue_ == 0)
00130                                 return TCL_ERROR;
00131                         return TCL_OK;
00132                 } else if(strcmp(argv[1], "seterrmodel") == 0) {
00133                         errmodel_ = (ErrorModel*) TclObject::lookup(argv[2]);
00134                         if (errmodel_ == 0)
00135                                 return TCL_ERROR;
00136                         return TCL_OK;
00137                 }
00138         }
00139         return (LinkHead::command(argc, argv));
00140 }

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, 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(), ARPTable::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(), 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:

ErrorModel* SatLinkHead::errmodel  )  [inline]
 

Definition at line 208 of file satlink.h.

References errmodel_.

00208 { return errmodel_; }

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, inherited]
 

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  )  [inherited]
 

Definition at line 60 of file node.cc.

References int32_t, NetworkInterface::intf_label(), and LinkHead::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, inherited]
 

SatMac* SatLinkHead::mac  )  [inline]
 

Definition at line 205 of file satlink.h.

References mac_.

00205 { return mac_; }

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

Definition at line 94 of file node.h.

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

00094 { return link_entry_.le_next; }

SatNode* SatLinkHead::node void   )  [inline]
 

Reimplemented from LinkHead.

Definition at line 210 of file satlink.h.

References LinkHead::node_.

Referenced by LinkHandoffMgr::get_peer_linkhead(), and SatLinkHandoffMgr::handoff().

00210 { return ((SatNode*) node_); }

SatPhy* SatLinkHead::phy_rx  )  [inline]
 

Definition at line 204 of file satlink.h.

References phy_rx_.

Referenced by LinkHandoffMgr::get_peer_next_linkhead(), SatLinkHandoffMgr::handoff(), and TermLinkHandoffMgr::handoff().

00204 { return phy_rx_; }

SatPhy* SatLinkHead::phy_tx  )  [inline]
 

Definition at line 203 of file satlink.h.

References phy_tx_.

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

00203 { return phy_tx_; }

Queue* SatLinkHead::queue  )  [inline]
 

Definition at line 207 of file satlink.h.

References queue_.

Referenced by SatRouteObject::insert_link().

00207 { return queue_; }

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, MFTPRcvAgent, MFTPSndAgent, PingAgent, RTPAgent, UdpAgent, BayFullTcpAgent, Filter, Agent, Decapsulator, Encapsulator, IvsSource, IvsReceiver, MessageAgent, NetworkInterface, PktCounter, SessionHelper, 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, DelayModel, CMUPriQueue, ErrorModel, ErrorModule, FQ, PriQueue, Queue< T >, rtqueue, RapAgent, rtProtoDV, SatLL, SatRouteAgent, SatDequeTrace, 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, and SimpleTcpAgent.

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, and Queue< T >.

Definition at line 70 of file object.cc.

Referenced by NsObject::command().

00071 {
00072 }

SatLL* SatLinkHead::satll  )  [inline]
 

Definition at line 206 of file satlink.h.

References satll_.

00206 { return satll_; }

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

Reimplemented in Agent, and LinkDelay.

Definition at line 54 of file connector.h.

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

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

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

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_; }

int LinkHead::type  )  [inline, inherited]
 

Definition at line 86 of file node.h.

References LinkHead::type_.

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

00086 { return type_; }


Member Data 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(), RedPDQueue::enque(), PushbackQueue::enque(), NsObject::isdebug(), NsObject::NsObject(), TfrcAgent::recv(), PushbackQueue::reportDrop(), and REDQueue::reset().

NsObject* Connector::drop_ [protected, inherited]
 

Definition at line 57 of file connector.h.

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

ErrorModel* SatLinkHead::errmodel_ [protected]
 

Definition at line 219 of file satlink.h.

Referenced by command(), and errmodel().

int SatLinkHead::linkup_
 

Definition at line 209 of file satlink.h.

Referenced by SatRouteObject::compute_topology(), SatNode::dumpSats(), SatLinkHandoffMgr::handoff(), and TermLinkHandoffMgr::handoff().

SatMac* SatLinkHead::mac_ [protected]
 

Definition at line 216 of file satlink.h.

Referenced by command(), and mac().

NetworkInterface* LinkHead::net_if_ [protected, inherited]
 

Definition at line 98 of file node.h.

Referenced by LinkHead::command(), and LinkHead::label().

Node* LinkHead::node_ [protected, inherited]
 

Definition at line 99 of file node.h.

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

SatPhy* SatLinkHead::phy_rx_ [protected]
 

Definition at line 215 of file satlink.h.

Referenced by command(), and phy_rx().

SatPhy* SatLinkHead::phy_tx_ [protected]
 

Definition at line 214 of file satlink.h.

Referenced by command(), and phy_tx().

Queue* SatLinkHead::queue_ [protected]
 

Definition at line 218 of file satlink.h.

Referenced by command(), and queue().

SatLL* SatLinkHead::satll_ [protected]
 

Definition at line 217 of file satlink.h.

Referenced by command(), and satll().

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 LinkHead::type_ [protected, inherited]
 

Definition at line 100 of file node.h.

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


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