网络数据包的协议分析程序的设计开发论文

  • 格式:doc
  • 大小:344.00 KB
  • 文档页数:27

下载文档原格式

  / 27
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

网络数据包的协议分析程序的设计开发

摘要

本文设计与实现了一个基于Linux下Libpcap库函数的网络数据包协议分析程序。程序的主要功能包括网络数据包捕获和常用网络协议分析。程序由输入/输出模块、规则匹配模块、数据捕获模块、协议分析模块组成。其中数据捕获模块和协议分析模块是本程序最关键、最主要的模块。

本文的主要内容如下:首先介绍了网络数据包协议分析程序的背景和概念。其次进行了程序的总体设计:确定了程序的功能,给出了程序的结构图和层次图,描述了程序的工作流程,对实现程序的关键技术做出了分析。接着,介绍完数据包捕获的相关背景和Libpcap函数库后,阐述了如何利用Libpcap函数库实现网络数据包捕获模块。然后对协议分析流程进行了详细的讲解,分析了常用网络协议。最后进行了程序的测试与运行:测试了程序能否按照预期的效果正确执行,印证了预期结果。

关键词:Libpcap;Linux;数据包捕获;应用层;协议识别

The Design and Development of Network Packet Protocol

Analyzing Program

Abstract

The thesis is an attempt to introduce an implementation of network protocol analyzing program which is based on Libpcap, a famous network packet capture library on Linux. It has a rich feature set which includes capturing network packets and analyzing popular network protocols on Internet. The program is made up of an input/output module, a rules matching module, a packet capturing module and a protocol analyzing module. And the last two modules are key modules.

The research work was described as followed. firstly, we introduce the background and concepts about network protocol analyzing programs; and we make an integrated design on the program, define functions of it, figure out its structure and hierarchical graphs, describe the workflow of it, and analyze the key techniques used in it; Secondly, after elaborating on the background of packet capture and the Libpcap library, we state a approach to implement a packet capture module with Libpcap; Thirdly, we explain the workflow about protocol analysis, and analyze common network protocols; Finally, we test our program to see whether it works as expected, fortunately, it does.

Key words: Libpcap; Linux; Network packet capturing; Application layer; Protocol identification

目录

论文总页数:23页

1 引言 (1)

1.1课题背景 (1)

1.2网络数据包协议分析程序简介 (2)

1.3国内外研究现状 (2)

2 网络数据包协议分析程序的总体设计 (3)

2.1网络数据包协议分析程序的功能分析 (3)

2.2系统的组成结构和工作流程 (3)

2.2.1系统的结构框图 (3)

2.2.2系统的结构和功能 (4)

2.2.3程序的工作流程 (5)

2.3系统实现的关键技术分析 (6)

3 网络数据包捕获模块的实现 (7)

3.1网络数据包捕获简介 (7)

3.2基于L IBPCAP的网络数据包捕获的实现 (8)

3.2.1Libpcap安装 (8)

3.2.2Libpcap中基本的数据结构和函数 (8)

3.3数据捕获模块的实现 (11)

4 协议分析模块的实现 (11)

4.1网络协议分析的总体流程 (12)

4.2对TCP/IP模型中各层协议的分析 (14)

4.2.1以太网首部的分析与提取 (14)

4.2.2IP首部的分析与提取 (15)

4.2.3TCP/UDP首部的分析与提取 (16)

4.2.4应用层协议的识别与分析 (18)

5 程序运行与测试 (20)

5.1测试环境 (20)

5.1.1硬件环境 (20)

5.1.2程序运行环境 (20)

5.2测试步骤 (20)

5.3测试结果评价 (20)

结论 (20)

参考文献 (21)

致谢 (22)

声明 (23)