Research and Transplant of LwIP Protocol Based on ARM
- Author
- DongXiangYang
- Advisor
- LiYan
- School
- Harbin University of Science and Technology
- Major
- Applied Computer Technology
- Classification
- TP393.04 Communication protocols, communication protocols
- Degree
- Master's thesis
- Year
- 2009
- Downloads
- 445
- Citations
- 12
- uC / OS - II operating system
- Stack of the LwIP Agreement
- Operating system emulation layer
- Low-level interface
Abstract
TCP / IP protocol as a communication implementations on the Internet , is a hot topic in the field of embedded applications in recent years . Embedded devices to exchange information directly with the Internet network , you need to support the TCP / IP protocol . Embedded systems with kernel small , specific and strong , streamlined system , real-time , power consumption and stringent environmental requirements , so the traditional TCP / IP protocol is not suitable for transplantation into embedded systems . Embedded system network access , there are two options , the first is a simplified version of the communication protocol prepared in accordance with the principle of the TCP / IP protocol ; second is transplanted to the existing small network protocols for embedded systems systems. First , the article briefly describes the research status and contents of the embedded network protocol analysis the LwIP protocol stack IP protocol , TCP protocol , UDP protocol and the principle of the ICMP protocol . Did not use due to LwIP and operating system -related system calls and data structures , an increase in the between LwIP and operating system encapsulation layer of an operating system to operating system services . LwIP not only to maintain the main function of the TCP protocol , but also reduce RAM usage . Second, transplant operating system simulation the layer and LwIP low-level interface . The operating system emulation layer protocols and operating system provides an interface protocol transparent to the operating system , you can not rely on the operating system is running , need to implement semaphores, mailboxes , threads and critical protection . The bottom of the LwIP interface provides different drivers for different hardware , system initialization , NIC initialization thread to receive , read and send packets . Finally, the test design framework , transplantation protocol for testing in the ARM development board and uC / OS - II operating system . The test results show that the the transplant protocol can work properly, to achieve the basic network functions .
Table of contents
Abstract 5-6
Abstract 6-12
Chapter 1 Introduction 12-18
1.1 research background and significance 12 -13
1.2 research status 13-16
1.2.1 embedded Operating System research 13-15
1.2.2 embedded Network protocols status 15-16
1.3 the main research topics 16-17
1.4 thesis organization 17-18
Chapter 2 LwIP protocol stack principle 18-31
2.1 LwIP Profile 18-19
2.2 IP protocol works 19-21
2.2.1 receive packets 19-20
2.2.2 sends packets 20-21
2.2.3 forwarding packets 21
2.3 TCP protocol works 21-27
2.3.1 Overview 21-23
2.3.2 data Structures 23
2.3.3 queue and data transmission 23-24
2.3.4 Receive segments 24-25
2.3.5 accept new connections 25
2.3.6 fast retransmit 25 < br /> 2.3.7 congestion Control 25-27
2.4 UDP protocol works 27-29
2.5 ICMP protocol works 29
2.6 protocol stack interfaces 29-30
2.7 application programming interface 30
2.8 Chapter Summary 30-31
Chapter 3 operating system emulation layer 31-42
3.1 data structure definitions 31-32
3.2 semaphore implementation 32-33
3.2.1 for the establishment of a semaphore 32
3.2.2 sending semaphore 32
3.2.3 release semaphore 32-33
3.2.4 Receive semaphore message 33
3.3 mailboxes to achieve 33-38
3.3.1 for the establishment of mail 34-35
3.3.2 release mailbox 35-36 <br / > 3.3.3 initialization mail list 36-37
3.3.4 send E-mail message 37-38
3.3.5 receiving mail messages 38 <br / > 3.4 build thread 38-39
3.5 thread control 39-40
3.6 critical protection 40-41
3.7 chapter Summary 41-42
Chapter 4 LwIP interface design and implementation 42-55
4.1 LwIP entry function file 42
4.2 LwIP initialization function 42 - 43
4.3 LwIP initial configuration function 43-46
4.3.1 TCP / IP to deliver the messages 43-45
4.3.2 TCP / IP thread control 45-46
4.4 initializes the underlying interface 46-54
4.4.1 initialize the underlying network interface 47
4.4.2 request to send data 47-49
4.4.3 initialize NIC 49-50
4.4.4 receiving thread 50-51
4.4.5 to get the packet length 51
4.4.6 read packets 51-53
4.4.7 sends packets 53-54
4.5 chapter Summary 54-55
Chapter 5 test program design and implementation 55-64
5.1 test program design 55
5.2 hardware platforms 55-58
5.2.1 hardware description 55-56
5.2.2 hardware structure 56-58
5.3 software platform 58
5.4 test organization 58-60
5.5 test implementation 60-63
5.5.1 test main function 60
5.5.2 test content 60-61
5.5.3 ping command to test 61-62
5.5.4 UDP function test 62-63
5.5.5 TCP protocol test 63 < br /> 5.6 chapter Summary 63-64
Conclusion 64-65
References 65-68
master's degree published during the academic papers 68-69
Thanks 69