輕量級網(wǎng)絡(luò)協(xié)議棧關(guān)鍵技術(shù)研究
發(fā)布時間:2018-04-16 16:12
本文選題:網(wǎng)絡(luò)協(xié)議棧 + 多進程 ; 參考:《西安電子科技大學(xué)》2014年碩士論文
【摘要】:隨著物聯(lián)網(wǎng)的蓬勃發(fā)展,嵌入式系統(tǒng)獲得了巨大的發(fā)展契機,各式各樣的嵌入式設(shè)備,如車載設(shè)備、移動終端、監(jiān)控設(shè)備充斥著人們的生活,為人們的生活和工作帶來了巨大的便利。然而,由于嵌入式系統(tǒng)種類繁多,又要考慮系統(tǒng)對嵌入式設(shè)備處理器及內(nèi)存的資源消耗,因而許多嵌入式系統(tǒng)中的網(wǎng)絡(luò)協(xié)議棧大都設(shè)計簡單,并不能滿足多應(yīng)用場景下的需求。如何使嵌入式網(wǎng)絡(luò)協(xié)議滿足各種應(yīng)用場景的需求,并保證日常通信的安全,已經(jīng)成為人們共同關(guān)注的問題。Lw IP(Light weight IP)即輕量級IP協(xié)議,是標(biāo)準(zhǔn)TCP/IP協(xié)議棧的裁剪,即在保證實現(xiàn)TCP/IP基礎(chǔ)功能的同時,又能很好的控制協(xié)議棧對處理器資源及存儲資源的消耗,是許多嵌入式系統(tǒng)網(wǎng)絡(luò)協(xié)議棧中非常重要的一種。但是隨著Lw IP協(xié)議棧應(yīng)用場景的擴大,在Lw IP協(xié)議棧應(yīng)用過程中依然存在著很多問題。首先,LwIP網(wǎng)絡(luò)協(xié)議棧的進程模型是讓整個協(xié)議棧駐留在一個單獨進程中,而并不將其放在操作系統(tǒng)內(nèi)核中。而應(yīng)用程序既可以與LwIP進程是一個進程,也可以是單獨的應(yīng)用進程。Windows系統(tǒng)自帶的協(xié)議棧是內(nèi)核態(tài)的網(wǎng)絡(luò)協(xié)議棧,而移植到Windows系統(tǒng)下的LwIP協(xié)議棧是用戶態(tài)的協(xié)議棧,與系統(tǒng)原生的協(xié)議棧相比具有更好的可擴展性并且高度定制。本文用官方發(fā)布的Lw IP contrib文件夾下的移植代碼作為基礎(chǔ),將Lw IP網(wǎng)絡(luò)協(xié)議棧移植到Windows操作系統(tǒng)中。此移植代碼是基于Windows的線程間通信來編寫,因此在此代碼中是不能實現(xiàn)進程間通信的,而為滿足LwIP多進程間的通信,一般的方法是要重新編寫移植文件sys_arch.c以及其它涉及到移植的函數(shù)。但重寫移植文件及函數(shù)涉及的方面非常多,不僅要對Windows中進程間通信非常了解,而且還要對Lw IP協(xié)議棧本身的移植過程非常熟悉,此種方式實現(xiàn)LwIP協(xié)議棧進程間通信難度很大。其次,LwIP協(xié)議棧對需要安全傳輸敏感信息的場景并沒有做考慮,這使得嵌入式網(wǎng)絡(luò)傳輸?shù)男畔⑼耆┞对诎踩{中。因此,如何保證嵌入式設(shè)備之間通訊的安全性,保證雙方通信信息的保密性、完整性已成為亟待解決的重要問題。本文針對LwIP在多進程應(yīng)用場景和安全傳輸問題中的不足,研究設(shè)計了多進程LwIP和LwIP IPsec協(xié)議。本設(shè)計基于Windows平臺,為了能夠?qū)崿F(xiàn)多應(yīng)用進程間的通信,在不改變移植文件及相應(yīng)的移植函數(shù)的基礎(chǔ)上,通過將LwIP的核心代碼編譯成動態(tài)鏈接庫,使得原本只能在線程間通信的協(xié)議棧轉(zhuǎn)變?yōu)榭梢栽趹?yīng)用進程間通信的協(xié)議棧。同時為了能保證通信的安全,還設(shè)計實現(xiàn)了Lw IP的IPsec協(xié)議解決了嵌入式系統(tǒng)中傳輸安全的問題。最后通過對相應(yīng)模塊的測試證明了這兩種方案的可行性。
[Abstract]:With the vigorous development of the Internet of things, embedded systems have got a great opportunity to develop. All kinds of embedded devices, such as vehicle-mounted devices, mobile terminals and monitoring devices, are flooded with people's lives.It brings great convenience to people's life and work.However, because of the variety of embedded systems and the resource consumption of embedded device processors and memory, most of the network protocol stacks in embedded systems are simple and can not meet the needs of multi-application scenarios.How to make embedded network protocol meet the requirements of various application scenarios and ensure the security of daily communication has become the common concern of people, I. E. lightweight IP protocol, which is the cutting of standard TCP/IP protocol stack.It is very important in many embedded system network protocol stacks to control the consumption of processor resource and storage resource at the same time to realize the basic function of TCP/IP.However, with the expansion of the application scenario of the LW IP stack, there are still many problems in the application of the LW IP protocol stack.Firstly, the process model of LwIP protocol stack is to let the whole protocol stack reside in a single process, but not in the operating system kernel.The application program can be the same process as the LwIP process, or it can be a separate application process. Windows protocol stack is the kernel network protocol stack, and the LwIP protocol stack transplanted to the Windows system is the user protocol stack.Compared with the native protocol stack of the system, it is more extensible and highly customized.In this paper, the LwIP network protocol stack is transplanted to the Windows operating system on the basis of the porting code under the LwIP contrib folder.The porting code is written on the basis of inter-thread communication of Windows, so inter-process communication cannot be implemented in this code, and in order to satisfy the LwIP multi-process communication,The general approach is to reprogram the migration file sys_arch.c and other functions involved in migration.However, there are many aspects involved in rewriting porting files and functions, not only to understand inter-process communication in Windows very well, but also to be familiar with the porting process of LW IP stack itself. It is very difficult to implement inter-process communication in LwIP protocol stack in this way.Secondly, the LwIP protocol stack does not consider the need for secure transmission of sensitive information, which makes the embedded network information completely exposed to security threats.Therefore, how to ensure the security of communication between embedded devices, the confidentiality and integrity of communication information between the two sides has become an important problem to be solved.Aiming at the deficiency of LwIP in multi-process application scenarios and secure transmission, this paper designs the multi-process LwIP and LwIP IPsec protocols.This design is based on Windows platform, in order to realize the communication between multiple application processes, without changing the porting file and the corresponding porting function, the core code of LwIP is compiled into dynamic link library.The protocol stack, which can only communicate between threads, is transformed into a protocol stack that can communicate between application processes.At the same time, in order to ensure the security of communication, the IPsec protocol of LWIP is designed and implemented to solve the problem of transmission security in embedded system.Finally, the feasibility of the two schemes is proved by testing the corresponding modules.
【學(xué)位授予單位】:西安電子科技大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2014
【分類號】:TP393.04
【參考文獻】
相關(guān)期刊論文 前1條
1 張齊;勞熾元;;輕量級協(xié)議棧LWIP的分析與改進[J];計算機工程與設(shè)計;2010年10期
,本文編號:1759660
本文鏈接:http://sikaile.net/guanlilunwen/ydhl/1759660.html
最近更新
教材專著