⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node304.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 HTML
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by:  Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by:  Nikos Drakos, CBLU, University of Leeds* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from:  Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>26.4.1.0.5 Other Extensions to the Simulator, Node, Link, and Classifier</TITLE><META NAME="description" CONTENT="26.4.1.0.5 Other Extensions to the Simulator, Node, Link, and Classifier"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="previous" HREF="node303.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node303.html"><LINK REL="up" HREF="node299.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node299.html"><LINK REL="next" HREF="node305.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node305.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html5996"  HREF="node305.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node305.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5990"  HREF="node299.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node299.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5986"  HREF="node303.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node303.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5992"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html5994"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html5997"  HREF="node305.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node305.html">26.4.2 Interface to Network</A><B> Up:</B> <A NAME="tex2html5991"  HREF="node299.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node299.html">26.4.1 The classes</A><B> Previous:</B> <A NAME="tex2html5987"  HREF="node303.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node303.html">26.4.1.0.4 Agent/rtProto../ns-2/route-proto.tcl</A> &nbsp <B>  <A NAME="tex2html5993"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html5995"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H4><A NAME="SECTION05141050000000000000">26.4.1.0.5 Other Extensions to the Simulator, Node, Link, and Classifier</A></H4><DL COMPACT><DT>--<DD>We have discussed the methods []rtproto and []cost  in the class Simulator earlierSectionsec:API.  The one other method used internally is  []get-routelogic../ns-2/route-proto.tclSimulator::get-routelogic;  this procedure returns the instance of routelogic in the simulation.<P>The method is used by the class Simulator, and unicast and multicast routing.<P><DT>--<DD>The class Node contains these additional instance procedures   to support dynamic unicast routing:[]init-routing../ns-2/route-proto.tclNode::init-routing,[]add-routes../ns-2/route-proto.tclNode::add-routes,[]delete-routes../ns-2/route-proto.tclNode::delete-routes,and[]rtObject?../ns-2/route-proto.tclNode::rtObject?.<P>The instance procedure []init-routingis invoked by the <TT>rtObject</TT> at the node.It stores a pointer to the rtObject, in its instance variable<TT>rtObject_</TT>, for later manipulation or retrieval.It also checks its class variable to see if it should use multiPath routing,and sets up an instance variable to that effect.If multiPath routing could be used,the instance variable array <TT>routes_</TT> stores a count of the number ofpaths installed for each destination.This is the only array in unicast routing that is indexed by the node id,rather than the node handle.<P>The instance procedure []rtObject?returns the rtObject handle for that node.<P>The instance procedure []add-routestakes a node id, and a list of links.It will add the list of links as the routes to reach the destinationidentified by the node id.The realization of multiPath routing is done by using a separateClassifier/multiPath.For any given destination id , if this node has multiple paths to ,then the main classifier points to this multipath classifier instead of the link to reach the destination.Each of the multiple paths identified by the interfaces being used isinstalled in the multipath classifier.The multipath classifier will use each of the links installed in it forsucceeding packets forwarded to it.<P>The instance procedure []delete-routestakes a node id, a list of interfaces, and a nullAgent.It removes each of the interfaces in the list from the installed list ofinterfaces.If the entry did not previously use a multipath classifier,then it must have had only one route, and the route entry is set to pointto the nullAgent specified.<P>Q:  WHY DOES IT NOT POINT TO NULLAGENT IF THE ENTRIES IN THE MPATHCLASSIFIERGOES TO ZERO?<P><DT>--<DD>The main extension to the class Link for unicast routing is  to support the notion of link costs.  The instance variable <TT>cost_</TT>  contains the cost of the unidirectional link.  The instance procedures  []cost../ns-2/route-proto.tclLink::cost  and  []cost?../ns-2/route-proto.tclLink::cost?  set and get the cost on the link.<P>Note that []cost takes the cost as argument.  It is preferable to use the simulator method to set the cost variable,  similar to the simulator instance procedures to set the queue or delay  on a link.<P><DT>--<DD>The Classifier../ns-2/ns-lib.tclcontains three new procedures, two of which overloads an existinginstproc-like, and the other two provide new functionality.<P>The instance procedure []install../ns-2/route-proto.tclClassifier::installoverloads the existing instproc-like of the same name.The procedure stores the entry being installed in the instancevariable array, <TT>elements_</TT>, and then invokes the instproc-like.<P>The instance procedure []installNext../ns-2/route-proto.tclClassifier::installNextalso overloads the existing instproc-like of the same name.This instproc-like simply installs the entry into the next available slot.<P>The instance procedure []adjacents../ns-2/route-proto.tclClassifier::adjacentsreturns a list of key, value pairs of all elements installed in theclassifier.</DD></DL><P><HR><!--Navigation Panel--><A NAME="tex2html5996"  HREF="node305.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node305.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html5990"  HREF="node299.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node299.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html5986"  HREF="node303.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node303.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html5992"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html5994"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html5997"  HREF="node305.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node305.html">26.4.2 Interface to Network</A><B> Up:</B> <A NAME="tex2html5991"  HREF="node299.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node299.html">26.4.1 The classes</A><B> Previous:</B> <A NAME="tex2html5987"  HREF="node303.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node303.html">26.4.1.0.4 Agent/rtProto../ns-2/route-proto.tcl</A> &nbsp <B>  <A NAME="tex2html5993"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html5995"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -