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

📄 c-tcpip2.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    TCP/IP Under VxWorks     </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-tcpip.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-tcpip.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-tcpip1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-tcpip3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="86181">4.2  &nbsp;&nbsp;IP, Internet Protocol </a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86183"> </a>A network protocol handles network communications at the level just above the MUX interface to the drivers that provide raw Ethernet and backplane transmission mechanisms. In VxWorks, the most commonly used network protocol is the Internet Protocol (IP)--the network protocol of the Internet protocol suite often referred to as <i class="term">TCP/IP</i>. </p><dd><p class="Body"><a name="86184"> </a>With IP, each <i class="term">host</i> (computer) in the network has a unique 4-byte Internet address (described in <a href="c-tcpip2.html#86192"><i class="title">4.2.1&nbsp;Internet Addresses</i></a>).  IP accepts packets addressed to a particular host and tries to deliver them.  If multiple networks are connected by routers, IP forwards a packet from router to router until the packet reaches a network where it can be delivered directly.  IP also breaks up and reassembles packets to fit the packet size of the physical network.  However, IP makes no guarantees that packets are delivered to the destination correctly.  Although it is possible to access IP directly, most applications use one of the higher-level protocols such as UDP or TCP.</p><dd><p class="Body"><a name="86189"> </a>The VxWorks network also fully supports the associated Internet Control Message Protocol (ICMP) and the Ethernet Address Resolution Protocol (ARP), as required by the relevant RFCs. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="86192">4.2.1  &nbsp;&nbsp;Internet Addresses</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86195"> </a>Each Internet host has a unique Internet address and an associated address mask.  An Internet address is four bytes long and contains information that identifies a network as well as a specific host on that network. The number of bits used for network identification versus host identification can differ according to the class of the address. </p><dd><p class="Body"><a name="86196"> </a>Depending on the address class, the networking software uses different masks to separate the bits that carry the network address from those that carry the host address. The address mask is set to a default value according to class if subnets are not used.  For more information, see <a href="c-tcpip3.html#86771"><i class="title">4.3.3&nbsp;Subnet Configuration</i></a> and <a href="c-tcpip7.html#87798"><i class="title">4.7.8&nbsp;Proxy ARP and Its Consequences for Subnet Configuration</i></a>. </p><dd><p class="Body"><a name="86203"> </a>The following list describes the Internet addresses used to accommodate different network configurations. </p></dl><dl class="margin"><dd><div class="Item"><a name="86204"> </a>Class A:</div><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent3"><a name="86205"> </a>These addresses support a small number of networks, each with a large number of hosts. </><br></dl></dl></dl><dd><div class="Item"><a name="86206"> </a>Class B:</div><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent3"><a name="86207"> </a>These addresses support a moderate number of networks, each with a moderate number of hosts. </><br></dl></dl></dl><dd><div class="Item"><a name="86208"> </a>Class C:</div><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent3"><a name="86209"> </a>These addresses support a large number of networks, each with a small number of hosts.  </><br></dl></dl></dl><dd><div class="Item"><a name="86210"> </a>Class D:</div><dl class="margin"><dl class="margin"><dl class="margin"><dd><div class="Indent3"><a name="86211"> </a>These addresses support IP multicasting. </><br></dl></dl></dl></dl><dl class="margin"><dd><p class="Body"><a name="86212"> </a>These classes are distinguished by the high-order bits of an Internet address as shown in <a href="c-tcpip2.html#86219">Figure&nbsp;4-1</a>.<div class="frame"><h4 class="EntityTitle"><a name="86219"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 4-1:&nbsp;&nbsp;Internet Address Classes</font></a></h4><dl class="margin"><div class="Anchor"><a name="86272"> </a><img class="figure" border="0" src="images/c-tcpip0.gif"></div></dl></div></p><dd><p class="Body"><a name="86273"> </a>By convention, Internet addresses are usually represented in dotted-decimal notation, which lists the 32-bit number as a string of four 8-bit values separated by dots.  Internally, the Internet address is often kept as a simple 32-bit value (of type <b class="symbol_lc">struct in_addr</b><b class="keyword"><sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></b>).  For example, the Internet address <b class="symbol_UC">0x5A010203</b> is 90.1.2.3 in standard dotted-decimal notation.  Each Internet address class has a unique address range determined by the high-order bits and the default address mask (used for separating the bits used for the network portion of the address) as shown in <a href="c-tcpip2.html#86284">Table&nbsp;4-1</a>.</p><dd><p class="Body"><a name="86280"> </a>VxWorks includes utilities for manipulating Internet addresses.  For example, there are routines for converting between dot notation and integer notation, routines for extracting network and host portions of an address, and routines for creating a new address from a network and host number.  </p><dd><p class="Body"><a name="86340"> </a>See the reference entry for <b class="library">inetLib</b>.<p class="table"><h4 class="EntityTitle"><a name="86284"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 4-1:&nbsp;&nbsp;Internet Address Ranges</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeadingC" align="center"><a name="86292"> </a><b><font face="Helvetica, sans-serif" size="-1" class="sans">Class</font></b></div></th><td width="10">&nbsp;</td><th rowspan="1" colspan="1"><div class="CellHeadingC" align="center"><a name="86294"> </a><b><font face="Helvetica, sans-serif" size="-1" class="sans">High Order Bits</font></b></div></th><td width="10">&nbsp;</td><th rowspan="1" colspan="1"><div class="CellHeadingC" align="center"><a name="86296"> </a><b><font face="Helvetica, sans-serif" size="-1" class="sans">Default Address Mask</font></b></div></th><td width="10">&nbsp;</td><th rowspan="1" colspan="1"><div class="CellHeadingC" align="center"><a name="86298"> </a><b><font face="Helvetica, sans-serif" size="-1" class="sans">Address Range</font></b></div></th><td width="10">&nbsp;</td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86300"> </a>A </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86302"> </a>0</div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86304"> </a><tt class="output">0xff000000</tt> </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86306"> </a>0.0.0.0 - 126.255.255.255</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86308"> </a>Reserved</div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86310"> </a></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86312"> </a></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86314"> </a>127.0.0.0 - 127.255.255.255</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86316"> </a>B </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86318"> </a>10</div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86320"> </a><tt class="output">0xffff0000</tt> </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86322"> </a>128.0.0.0 - 191.255.255.255</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86324"> </a>C </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86326"> </a>110</div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86328"> </a><tt class="output">0xffffff00</tt> </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86330"> </a>192.0.0.0 - 223.255.255.255</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBodyC" align="center"><a name="86332"> </a>D </div></td>

⌨️ 快捷键说明

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