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

📄 node134.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>12.2.3 The hdr_cmn Class</TITLE><META NAME="description" CONTENT="12.2.3 The hdr_cmn Class"><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="node135.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node135.html"><LINK REL="previous" HREF="node133.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node133.html"><LINK REL="up" HREF="node131.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node131.html"><LINK REL="next" HREF="node135.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node135.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html3348"  HREF="node135.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node135.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3342"  HREF="node131.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node131.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3336"  HREF="node133.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node133.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3344"  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="tex2html3346"  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="tex2html3349"  HREF="node135.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node135.html">12.2.4 The PacketHeaderManager Class</A><B> Up:</B> <A NAME="tex2html3343"  HREF="node131.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node131.html">12.2 Packet Classes</A><B> Previous:</B> <A NAME="tex2html3337"  HREF="node133.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node133.html">12.2.2 p_info Class</A> &nbsp <B>  <A NAME="tex2html3345"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html3347"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H2><A NAME="SECTION03923000000000000000"></A><A NAME="sec:commonhdr"></A><BR>12.2.3 The hdr_cmn Class</H2><P>Every packet in the simulator has a ``common''header which is defined in packet.h as follows:<PRE>        struct hdr_cmn {                double    ts_;            /* timestamp: for q-delay measurement /                packet_t  ptype_;         /* packet type (see above) /                int       uid_;           /* unique id /                int       size_;          /* simulated packet size /                int       iface_;         /* receiving interface (label) /                         /* Packet header access functions */                static int offset_;                inline static int&amp; offset() { return offset_; }                inline static hdr_cmn* access(Packet* p) {                        return (hdr_cmn*) p-\&gt;access(offset_);                }                /* per-field member functions */                int&amp; ptype() { return (ptype_); }                int&amp; uid() { return (uid_); }                int&amp; size() { return (size_); }                int&amp; iface() { return (iface_); }                double&amp; timestamp() { return (ts_); }        };</PRE>This structure primarily defines fields used for tracingthe flow of packets or measuring other quantities.The time stamp field is used to measure queuing delayat switch nodes.The <TT>ptype_</TT> field is used to identify thetype of packets, which makes reading traces simpler.The <TT>uid_</TT> field is used by the scheduler in schedulingpacket arrivals.The <TT>size_</TT> field is of general use and gives thesimulated packet's size in bytes.Note that the actual number of bytes consumed in the simulationmay not relate to the value of this field  (i.e., <TT>size_</TT> has <I>no</I> relationship  to <TT>sizeof(struct hdr_cmn)</TT> or other ns structures).Rather, it is used most often in computing the time required for a packetto be delivered along a network link.As such it should be set to the sum of the  application data size  and IP-, transport-, and application-level headers  for the simulated packet.The <TT>iface_</TT> field is used by the simulator when performingmulticast distribution tree computations.It is a label indicating (typically) on which link a packet was received.<P><HR><!--Navigation Panel--><A NAME="tex2html3348"  HREF="node135.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node135.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html3342"  HREF="node131.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node131.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html3336"  HREF="node133.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node133.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html3344"  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="tex2html3346"  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="tex2html3349"  HREF="node135.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node135.html">12.2.4 The PacketHeaderManager Class</A><B> Up:</B> <A NAME="tex2html3343"  HREF="node131.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node131.html">12.2 Packet Classes</A><B> Previous:</B> <A NAME="tex2html3337"  HREF="node133.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node133.html">12.2.2 p_info Class</A> &nbsp <B>  <A NAME="tex2html3345"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html3347"  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 + -