【正文】
畢業(yè)設(shè)計(jì) ( 論文 ) 網(wǎng)絡(luò)數(shù)據(jù)包的協(xié)議分析程序的設(shè)計(jì)開發(fā) 論文作者姓名: 申請(qǐng)學(xué)位專業(yè): 申請(qǐng)學(xué)位類別: 指導(dǎo)教師姓名(職稱): 論文提交日期: 網(wǎng)絡(luò)數(shù)據(jù)包的協(xié)議分析程序的設(shè)計(jì)開發(fā) 摘 要 本文設(shè)計(jì)與實(shí)現(xiàn)了一個(gè)基于 Linux下 Libpcap庫函數(shù)的網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序。程序的主要功能包括網(wǎng)絡(luò)數(shù)據(jù)包捕獲和常用網(wǎng)絡(luò)協(xié)議分析。程序由輸入 /輸出模塊、規(guī)則匹配模塊、數(shù)據(jù)捕獲模塊、協(xié)議分析模塊組成。其中數(shù)據(jù)捕獲模塊和協(xié)議分析模塊是本程序最關(guān)鍵、最主要的模塊。 本文的主要內(nèi) 容如下: 首先 介紹了網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序的背景和概念 。其次 進(jìn)行了程序的總體設(shè)計(jì):確定了程序的功能,給出了程序的結(jié)構(gòu)圖和層次圖,描述了程序的工作流程,對(duì)實(shí)現(xiàn)程序的關(guān)鍵技術(shù)做出了分析 。接著, 介紹完數(shù)據(jù)包捕獲的相關(guān)背景和 Libpcap函數(shù)庫 后 ,闡述了如何利用 Libpcap函數(shù)庫實(shí)現(xiàn)網(wǎng)絡(luò)數(shù)據(jù)包捕獲模塊 。然后 對(duì)協(xié)議分析流程進(jìn)行了詳細(xì)的講解,分析了常用網(wǎng)絡(luò)協(xié)議 。最后進(jìn)行了 程序的測(cè)試與運(yùn)行:測(cè)試了程序能否按照預(yù)期的效果正確執(zhí)行,印證了預(yù)期結(jié)果。 關(guān)鍵詞: Libpcap; Linux; 數(shù)據(jù)包捕獲;應(yīng)用層 ; 協(xié)議識(shí)別 The Design and Development of Network Packet Protocol Analyzing Program Abstract The thesis is an attempt to introduce an implementation of work protocol analyzing program which is based on Libpcap, a famous work packet capture library on Linux. It has a rich feature set which includes capturing work packets and analyzing popular work protocols on Inter. 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 work 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 mon work 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 目 錄 論文總頁數(shù): 23頁 1 引言 .......................................................................................................................... 4 課題背景 ............................................................................................................ 4 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序簡(jiǎn)介 ............................................................................ 5 國(guó)內(nèi)外研究現(xiàn)狀 ................................................................................................. 5 2 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序的總體設(shè)計(jì) ......................................................................... 6 網(wǎng)絡(luò)數(shù)據(jù)包協(xié)議分析程序的功能分析 .................................................................. 6 系統(tǒng)的組成結(jié)構(gòu)和工作流程 ................................................................................ 6 系統(tǒng)的結(jié)構(gòu)框圖 .......................................................................................... 6 系統(tǒng)的結(jié)構(gòu)和功能 ....................................................................................... 7 程序的工作流程 .......................................................................................... 8 系統(tǒng)實(shí)現(xiàn)的關(guān)鍵技術(shù)分析 ................................................................................... 9 3 網(wǎng)絡(luò)數(shù)據(jù)包捕獲模塊的實(shí)現(xiàn) ..................................................................................... 10 網(wǎng)絡(luò)數(shù)據(jù)包捕獲簡(jiǎn)介 ........................................................................................ 10 基于 LIBPCAP 的網(wǎng)絡(luò)數(shù)據(jù)包捕獲的實(shí)現(xiàn) .............................................................. 11 Libpcap安裝 ............................................................................................ 11 Libpcap中基本的數(shù)據(jù)結(jié)構(gòu)和函數(shù) ............................................................. 11 數(shù)據(jù)捕獲模塊的實(shí)現(xiàn) ........................................................................................ 14 4 協(xié)議分析模塊的實(shí)現(xiàn) ............................................................................................... 14 網(wǎng)絡(luò)協(xié)議分析的總體流程 ................................................................................. 15 對(duì) TCP/IP模型中各層協(xié)議的分析 ..................................................................... 17 以太網(wǎng)首部的分析與提取 .......................................................................... 17 IP首部的分析與提取 ................................................................................ 18 TCP/UDP首部的分析與提取 ....................................................................... 19 應(yīng)用層協(xié)議的識(shí)別與分析 .......................................................................... 21 5 程序運(yùn)行與測(cè)試 ...................................................................................................... 23 測(cè)試環(huán)境 .......................................................................................................... 23 硬件環(huán)境 ................................................................................................... 23 程序運(yùn)行環(huán)境 ............................................................................................ 23 測(cè)試步驟 .......................................................................................................... 23 測(cè)試結(jié)果評(píng)價(jià) ................................................................................................... 23 結(jié) 論 ........................................................................................................................ 23 參考文獻(xiàn) ........................................................................................................................ 24 致 謝 ........................................................................................................................ 25 聲 明 ........................................................................................................................ 26 1 引言 課題背景 隨著計(jì)算機(jī)網(wǎng)絡(luò)的不斷發(fā)展,全球信息化 已 成 為當(dāng)今社會(huì)發(fā)展的趨勢(shì)。但由于計(jì)算機(jī)網(wǎng)絡(luò)自身所特具有的特點(diǎn),比如聯(lián)結(jié)形式多樣性和網(wǎng)絡(luò)的開放性、互連性等特征,所以導(dǎo)致網(wǎng)絡(luò)易受黑客還有一些病毒的攻擊。所以網(wǎng)上信息的安全和保密是一個(gè)至關(guān)重要的問題。對(duì)于軍用的自動(dòng)化指揮網(wǎng)絡(luò)和銀行等傳輸敏感數(shù)據(jù)的計(jì)算機(jī)網(wǎng)絡(luò)系統(tǒng)而言,其網(wǎng)上信息的安全和保密尤為重要。因此,網(wǎng)絡(luò)必須有足夠強(qiáng)的安全措施,否則該網(wǎng)絡(luò)將是個(gè)無用、甚至?xí)<皣?guó)家安全的網(wǎng)絡(luò)。在計(jì)算機(jī)網(wǎng)絡(luò)的世界里,存在著很多潛在的威脅,因此網(wǎng)絡(luò)的安全措施應(yīng)能全方位地應(yīng) 對(duì)各種不同的威脅,這樣才可以真正的做到網(wǎng)絡(luò)服務(wù)于社會(huì),體現(xiàn)網(wǎng)絡(luò)的 先進(jìn)性。