📄 node162.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>15. The (Revised) Addressing Structure in NS</TITLE><META NAME="description" CONTENT="15. The (Revised) Addressing Structure in NS"><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="next" HREF="node171.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node171.html"><LINK REL="previous" HREF="node142.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node142.html"><LINK REL="up" HREF="node29.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node29.html"><LINK REL="next" HREF="node163.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node163.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html3758" HREF="node163.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node163.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3752" HREF="node29.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node29.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3746" HREF="node161.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node161.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3754" 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="tex2html3756" 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="tex2html3759" HREF="node163.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node163.html">15.1 The Default Address</A><B> Up:</B> <A NAME="tex2html3753" HREF="node29.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node29.html">2 Simulator Basics</A><B> Previous:</B> <A NAME="tex2html3747" HREF="node161.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node161.html">14.10 Commands at a</A>   <B> <A NAME="tex2html3755" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3757" HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION031200000000000000000"></A><A NAME="chap:Address"></A><BR>15. The (Revised) Addressing Structure in NS</H1><P>This chapter describes the internals of the revised addressing formatimplemented in . The chapter consists of five sections. Wedescribe the APIs that can be used for allocating bits to the ns addressingstructure. The address space as described in chapter 3, can be thoughtof a contiguous field of <EM>n</EM> bits, where n may vary as per theaddress requirement of the simulation. The default value of <EM>n</EM> is16 (as defined by <EM>MAXADDRSIZE_</EM>). The maximum value of <EM>n</EM> isset to 32 (defined as <EM>MAXADDRSIZE_</EM>). These default and maximum address sizes are defined in /tcl/lib/ns-default.tcl.<P>The address space consists of 2 parts, the node-id and the port-id.The higher bits are assigned as the node'saddress or id_ and remaining lower bits are assigned to form port-id orthe identification of the agent attached to the node. Of the higherbits, 1 bit is assigned for multicast. The address space consists of 32 bits and port id space consists of 32 bits as well.The higher 32 bits for node-id, the MSB for multicast and the lower 32bits for port-id. Additionally, the address space mayalso be set in hierarchical format, consisting of multiple levels ofaddressing hierarchy. We shall be describing the APIs for setting address structure indifferent formats as described above as well as expanding the addressspace. The procedures and functions described in this chapter can be found intcl/lib/ns-address.tcl, address.cc and address.h.<P><BR><HR><!--Table of Child-Links--><A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A><UL><LI><A NAME="tex2html3760" HREF="node163.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node163.html">15.1 The Default Address Format</A><LI><A NAME="tex2html3761" HREF="node164.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node164.html">15.2 The Hierarchical Address Format</A><UL><LI><A NAME="tex2html3762" HREF="node165.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node165.html">15.2.1 Default Hierarchical Setting</A><LI><A NAME="tex2html3763" HREF="node166.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node166.html">15.2.2 Specific Hierarchical Setting</A></UL><BR><LI><A NAME="tex2html3764" HREF="node167.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node167.html">15.3 The Expanded Node-Address Format</A><LI><A NAME="tex2html3765" HREF="node168.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node168.html">15.4 Expanding port-id field</A><LI><A NAME="tex2html3766" HREF="node169.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node169.html">15.5 Errors in setting address format</A><LI><A NAME="tex2html3767" HREF="node170.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node170.html">15.6 Commands at a glance</A></UL><!--End of Table of Child-Links--><HR><!--Navigation Panel--><A NAME="tex2html3758" HREF="node163.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node163.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3752" HREF="node29.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node29.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3746" HREF="node161.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node161.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3754" 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="tex2html3756" 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="tex2html3759" HREF="node163.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node163.html">15.1 The Default Address</A><B> Up:</B> <A NAME="tex2html3753" HREF="node29.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node29.html">2 Simulator Basics</A><B> Previous:</B> <A NAME="tex2html3747" HREF="node161.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node161.html">14.10 Commands at a</A>   <B> <A NAME="tex2html3755" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html3757" 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 + -