什么是IP数据包 .

 
“包”(Packet)是TCP/IP协议通信传输中的数据单位,一般也称“数据包”。有人说,局域网中传输的不是“帧”(Frame)吗?没错,但是TCP/IP协议是工作在OSI模型第三层(网络层)、第四层(传输层)上的,而帧是工作在第二层(数据链路层)。上一层的内容由下一层的内容来传输,所以在局域网中,“包”是包含在“帧”里的。 名词解释:OSI(Open System Interconnection,开放系统互联)模型是由国际标准化组织(ISO)定义的标准,它定义了一种分层体系结构,在其中的每一层定义了针对不同通信级别的协议。OSI模型有7层,17层分别是:物理层、数据链路层、网络层、传输层、会话层、表示层、应用层。OSI模型在逻辑上可分为两个部分:低层的14层关注的是原始数据的传输;高层的57层关注的是网络下的应用程序。 我们可以用一个形象一些的例子对数据包的概念加以说明:我们在邮局邮寄产品时,虽然产品本身带有自己的包装盒,但是在邮寄的时候只用产品原包装盒来包装显然是不行的。必须把内装产品的包装盒放到一个邮局指定的专用纸箱里,这样才能够邮寄。这里,产品包装盒相当于数据包,里面放着的产品相当于可用的数据,而专用纸箱就相当于帧,且一个帧中只有一个数据包。 “包”听起来非常抽象,那么是不是不可见的呢?通过一定技术手段,是可以感知到数据包的存在的。比如在Windows 2000 Server中,把鼠标移动到任务栏右下角的网卡图标上(网卡需要接好双绞线、连入网络),就可以看到“发送:××包,收到:××包”的提示。通过数据包捕获软件,也可以将数据包捕获并加以分析。 就是用数据包捕获软件Iris捕获到的数据包的界面图,在此,大家可以很清楚地看到捕获到的数据包的MAC地址、IP地址、协议类型端口号等细节。通过分析这些数据,网管员就可以知道网络中到底有什么样的数据包在活动了。 附: 数据包的结构 数据包的结构非常复杂,不是三言两语能够说清的,在这里主要了解一下它的关键构成就可以了,这对于理解TCP/IP协议的通信原理是非常重要的。数据包主要由“目的IP地址”、“源IP地址”、“净载数据”等部分构成。 数据包的结构与我们平常写信非常类似,目的IP地址是说明这个数据包是要发给谁的,相当于收信人地址;源IP地址是说明这个数据包是发自哪里的,相当于发信人地址;而净载数据相当于信件的内容。 正是因为数据包具有这样的结构,安装了TCP/IP协议的计算机之间才能相互通信。我们在使用基于TCP/IP协议的网络时,网络中其实传递的就是数据包。理解数据包,对于网络管理的网络安全具有至关重要的意义。  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MICROSOFT FOUNDATION CLASS LIBRARY : ReadIP0802 AppWizard has created this ReadIP0802 application for you. This application not only demonstrates the basics of using the Microsoft Foundation classes but is also a starting point for writing your application. This file contains a summary of what you will find in each of the files that make up your ReadIP0802 application. ReadIP0802.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. ReadIP0802.h This is the main header file for the application. It includes other project specific headers (including Resource.h) and declares the CReadIP0802App application class. ReadIP0802.cpp This is the main application source file that contains the application class CReadIP0802App. ReadIP0802.rc This is a listing of all of the Microsoft Windows resources that the program uses. It includes the icons, bitmaps, and cursors that are stored in the RES subdirectory. This file can be directly edited in Microsoft Visual C++. ReadIP0802.clw This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to create and edit message maps and dialog data maps and to create prototype member functions. resReadIP0802.ico This is an icon file, which is used as the application s icon. This icon is included by the main resource file ReadIP0802.rc. resReadIP0802.rc2 This file contains resources that are not edited by Microsoft Visual C++. You should place all resources not editable by the resource editor in this file. AppWizard creates one dialog class: ReadIP0802Dlg.h, ReadIP0802Dlg.cpp - the dialog These files contain your CReadIP0802Dlg class. This class defines the behavior of your application s main dialog. The dialog s template is in ReadIP0802.rc, which can be edited in Microsoft Visual C++. Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named ReadIP0802.pch and a precompiled types file named StdAfx.obj. Resource.h This is the standard header file, which defines new resource IDs. Microsoft Visual C++ reads and updates this file. Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. If your application uses MFC in a shared DLL, and your application is in a language other than the operating system s current language, you will need to copy the corresponding localized resources MFC42XXX.DLL from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. For example, MFC42DEU.DLL contains resources translated to German.) If you don t do this, some of the UI elements of your application will remain in the language of the operating system.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值