We know that the tcp ip protocol stack includes many protocols. So let's take a look at the functions and functions of the protocols here. Now let's make an inventory check to help you summarize it and hope it will help you.
1. bsd tcp ip protocol stack
BSD stack is the starting point of other commercial stacks in history. Most professional TCP/IP stacks embedded in VxWorks are derived from the BSD stack. this is because the BSD stack provides the prototype of these professional stacks under the BSD license agreement, BSD permits allow the BSD stack to combine the code of these professional stacks in a modified or unmodified form without the need to pay royalty to the Creator. at the same time, BSD is also the beginning of many innovations in TCP/IP protocols, such as the control and avoidance of hunger congestion in wide area networks.
2. uC/IP
UC/IP is a set of open-source TCP/IP protocol stacks Based on uC/OS compiled by Guy Lancaster. It can also be transplanted to other operating systems, is a completely free set of TCP/IP protocol stacks available for research. Most of the uC/IP source code is a tcp ip protocol stack running in a single DOS task environment from the open source BSD release site and KA9Q) port it. uC/IP has the following features: PPP protocol with authentication and header compression, optimized single request/reply interaction process, and support IP/TCP/UDP protocol, the network functions are more powerful and can be reduced. the UCIP protocol stack is designed as a network module with minimal user interfaces and applicable serial links. the code size required by the Protocol Stack is between 30-60 kb based on the number of protocols required by the CPU, compiler, and system.
3. LwIP
LwIP is an open-source tcp ip protocol stack developed by Adam Dunkels of Swedish Institute of Computer Science, Swiss Emy of Computer sciences. the meaning of LwIP is Light Weight (Light) IP protocol, relative to uip. lwIP can be transplanted to the operating system or run independently without an operating system. the focus of LwIP TCP/IP implementation is to reduce the usage of RAM while maintaining the main functions of the TCP protocol. Generally, it only requires dozens of KB of RAM and about 40 kb of ROM to run, this makes the LwIP protocol stack suitable for low-end embedded systems. the features of LwIP are as follows: it supports IP Forwarding under multiple network interfaces and ICMP protocol, including experimental extended UDP User Datagram Protocol), including blocking control, RTT estimation and fast recovery and fast forwarding of the TCP transmission control protocol), provides a dedicated internal callback interface Raw API) used to improve application performance, and provides an optional Berkeley interface API.
4. uIP
UIP is a very small TCP/IP stack specially designed for 8-bit and 16-bit controllers. it is fully written in C, so it can be transplanted to various structures and operating systems. A compiled stack can run in several kb rom or several hundred bytes RAM. uIP also includes an HTTP server as the service content. license: BSD permit.
5. TinyTcp
TinyTcp stack is a very small and simple implementation of TCP/IP. It includes an FTP client. tinyTcp is designed to burn in ROM, and now it seems to be useful for large-end structures. The initial target is 68000 chips ). tinyTcp also includes a simple Ethernet driver for 3COM multi-bus cards.
You can choose an Open Source protocol stack from four aspects:
Whether to provide easy-to-use underlying hardware APIs, that is, unrelated to the hardware platform;
One is the system function interface that needs to be called with the kernel API of the operating system. Is it easy to construct,
Another level of application support.
The most important thing is whether the occupied system resources are within the acceptable range and there is room for optimization reduction?
Among them, the BSD stack can fully implement the TCP/IP protocol, but the code is huge, between 70 kb-150kb, it is difficult to cut down the optimization, the uIP and TinyTcp code capacity is small, the implementation function is streamlined, applications with high requirements, such as reliability and large-capacity data transmission, are restricted.
LwIP and uC/IP are two open source protocol stacks of the same magnitude. The Code capacity and implementation functions of the two are similar. LwIP is not specific to the operating system. It abstracts the protocol stack and platform-related code, if you want to port the code to your system, you need to encapsulate the Code and provide API interface optionality for network application support. the uC/IP protocol was initially designed for uC/OS. To facilitate user porting and implementation, it also abstracts the protocol stack and platform-related code, however, most of the system functions required to be called by the Protocol Stack are designed based on the uC/OS kernel function prototype, and test functions of the protocol stack are provided for your reference, the disadvantage is that the protocol stack does not support network applications.
According to the above analysis, from the perspective of Application and Development, it seems that LWIP is favored by many friends on the Internet. uC/IP has many shortcomings in document support and software upgrade management, however, it was initially designed for UC/OS. If UC/OS is used as the software basis, it has advantages in system function construction. if you select another operating system, you can modify it by referring to the file in the OS _NULL folder. the above open source protocol stack is not free, can be used, as far as I know, UC/OS parent company launched UC/OS-TCP/IP spent 6 people * 2 years of work, A company in China uses LWIP as a reference for transplantation. It took 4-5 people * 2 years to test and optimize the Protocol. It is not surprising that the high cost of using the commercial TCP/IP stack is high. as for the majority of fans, if you just run the prototype and experiment the results, the above open source protocol stacks provide test examples, it should be a good choice.
My opinion: LWIP is preferred. At least a lot of people are studying it online and there are many references. UC/IP is the second. If you want to study TCP/IP in depth, porting UC/IP addresses is a challenging task and needs to be improved.