HOME

TheInfoList



OR:

The uIP is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
implementation of the
TCP/IP The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suit ...
network protocol stack intended for use with tiny 8- and 16-bit
microcontrollers A microcontroller (MCU for ''microcontroller unit'', often also MC, UC, or μC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs ( processor cores) along with memory and programmab ...
. It was initially developed by
Adam Dunkels Adam Dunkels (born 1978) is a Swedish computer scientist, computer programmer, entrepreneur, and founder of Thingsquare, an Internet of things (IoT) product development business. His father was professor of mathematics Andrejs Dunkels. His m ...
of the Networked Embedded Systems group at the
Swedish Institute of Computer Science RISE SICS (previously Swedish Institute of Computer Science) is a leading research institute for applied information and communication technology in Sweden, founded in 1985. It explores the digitalization of products, services and businesses. In ...
, licensed under a BSD style license, and further developed by a wide group of developers. uIP can be very useful in
embedded system An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' ...
s because it requires very small amounts of code and RAM. It has been ported to several platforms, including DSP platforms. In October 2008,
Cisco Cisco Systems, Inc., commonly known as Cisco, is an American-based multinational corporation, multinational digital communications technology conglomerate (company), conglomerate corporation headquartered in San Jose, California. Cisco develo ...
,
Atmel Atmel Corporation was a creator and manufacturer of semiconductors before being subsumed by Microchip Technology in 2016. Atmel was founded in 1984. The company focused on embedded systems built around microcontrollers. Its products included mi ...
, and
SICS RISE SICS (previously Swedish Institute of Computer Science) is a leading research institute for applied information and communication technology in Sweden, founded in 1985. It explores the digitalization of products, services and businesses. In ...
announced a fully compliant
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. I ...
extension to uIP, called uIPv6.


Implementation

uIP makes many unusual design choices in order to reduce the resources it requires. uIP's native software interface is designed for small computer systems with no operating system. It can be called in a timed loop, and the call manages all the retries and other network behavior. The hardware driver is called after uIP is called. uIP builds the packet, and then the driver sends it, and optionally receives a response. It is normal for IP protocol stack software to keep many copies of different IP packets, for transmission, reception and to keep copies in case they need to be resent. uIP is economical in its use of memory because it uses only one packet buffer. First, it uses the packet buffer in a half-duplex way, using it in turn for transmission and reception. Also, when uIP needs to retransmit a packet, it calls the application code in a way that requests for the previous data to be reproduced. Another oddity is how uIP manages connections. Most IP implementations have one task per connection, and the task communicates with a task in a distant computer on the other end of the connection. In uIP, no multitasking operating system is assumed. Connections are held in an array. On each call, uIP tries to serve a connection, making a subroutine call to application code that responds to, or sends data. The size of the connection array is a number that can be adjusted when uIP is recompiled. uIP is fully compliant with the RFCs that define TCP, UDP and IP. It also implements the mandatory maintenance protocol ICMP.


Versions

uIP 0.9 is the version with the least dependence on operating systems, the smallest resource use, and the only version that presents a pure event loop API, but in its original form does not support IP version 6, only the older, more common IPv4. It may be used in
embedded system An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is ''embedded'' ...
s with very small amounts of resources. It was delivered with a set of examples of higher-level protocols that also run on an event loop system, including
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
(a simple web server),
SMTP The Simple Mail Transfer Protocol (SMTP) is an Internet standard communication protocol for electronic mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail messages. User-level email clients typic ...
(simple mail transmission protocol), FTP (file transfer protocol),
telnet Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspersed in-band with Telnet cont ...
(terminal emulation), and others. Despite the examples and its small size, uIP 0.9 can be difficult to apply because it does not use any form of socket API. uIP is widely used code with well-known weaknesses. The design minimizes and separates 32-bit arithmetic so that it can be adjusted or optimized for 8 and 16-bit CPUs. Also, 16-bit software timers (common on small microcontrollers) can overflow and cause defective operation. This can be fixed with a timer system that does not overflow (e.g. the timers count down or use
modular arithmetic In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his bo ...
). Another issue is that its single packet buffer can have substantial throughput problems because a PC host usually delays the "ACK" packet, waiting for more packets. In slow,
serial port In computing, a serial port is a serial communication interface through which information transfers in or out sequentially one bit at a time. This is in contrast to a parallel port, which communicates multiple bits simultaneously in paralle ...
implementations, the ack-throughput can be fixed by modifying uIP to send every packet as two half-packet fragments. uIP systems with fast
ethernet Ethernet () is a family of wired computer networking technologies commonly used in local area networks (LAN), metropolitan area networks (MAN) and wide area networks (WAN). It was commercially introduced in 1980 and first standardized in ...
or
WiFi Wi-Fi () is a family of wireless network protocols, based on the IEEE 802.11 family of standards, which are commonly used for local area networking of devices and Internet access, allowing nearby digital devices to exchange data by radio wa ...
can modify the hardware driver to send every packet twice. Some PCs do not correctly respond to a fast uIP system on a local ethernet, because the uIP system can start a responding packet before the PC is ready to receive it. The solution is to call the uIP system less frequently in the main loop (Windows PCs are designed for a response time of about 1 millisecond). Typical implementations of uIP have a fixed IP address, which can make them impractical in real networks, although some have implemented
DHCP The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a cli ...
. Later versions of uIP, including the reference version of uIPv6, are integrated with Contiki, an operating system that uses
coroutine Coroutines are computer program components that generalize subroutines for non-preemptive multitasking, by allowing execution to be suspended and resumed. Coroutines are well-suited for implementing familiar program components such as cooperative ...
s for cooperative multitasking. Contiki provides the multitasking needed by a simplified socket API, simplifying the use of uIP. These versions may be less popular than 0.9 however. Many examples of embedded code do not use them.Code-Red examples, above.


See also

*
Internet Engineering Task Force The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and ...
*
List of TCP and UDP port numbers This is a list of TCP and UDP port numbers used by protocols for operation of network applications. The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) only need one port for duplex, bidirectional traffic. They usually us ...
*
lwIP lwIP (lightweight IP) is a widely used open-source TCP/IP stack designed for embedded systems. lwIP was originally developed by Adam Dunkels at the Swedish Institute of Computer Science and is now developed and maintained by a worldwide netwo ...
–another TCP/IP stack project (also created by Dunkels), but more fully-featured and aimed at more capable hardware


References

{{Reflist, refs= {{cite web , url=https://github.com/adamdunkels/uip/tags , title=Tagged releases , first=Adam , last=Dunkels , work=uIP tagged releases on
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
, access-date=February 2, 2015
{{cite web , url=http://www.maximintegrated.com/en/app-notes/index.mvp/id/4205 , title=APPLICATION NOTE 4205 - Using the uIP Stack to Network a MAXQ Microcontroller , first=Zach , last=Metzinger , work=Maxim Integrated Products, Inc. , date=March 25, 2008 , access-date=February 2, 2015 {{cite web, url=http://www.cyantechnology.com/public/AN057uIPV1_0TCP-IPStackforeCOG1kandeCOG1X.pdf , title=AN057 – uIP V1.0 TCP/IP Stack for eCOG1k and eCOG1X, Version 1.0 , work=Cyan Technology Ltd. , date=January 28, 2008 , access-date=February 18, 2012 , url-status=dead , archive-url=https://web.archive.org/web/20120218123417/http://www.cyantechnology.com/public/AN057uIPV1_0TCP-IPStackforeCOG1kandeCOG1X.pdf , archive-date=February 18, 2012 {{cite web , url=http://www.rowley.co.uk/msp430/uip.htm , title=Adam Dunkel's uIP on the Olimex EasyWeb2 and LPC-E2124 , first=Paul , last=Curtis , work=Rowley Associates Limited , access-date=February 2, 2015 {{cite web , url=http://www.drdobbs.com/inside-the-uip-stack/184405971 , title=Inside the uIP Stack , first1=Drew , last1=Barnett , first2=Anthony J. , last2=Massa , work=Dr Dobbs Journal , date=February 1, 2005 , access-date=February 2, 2015 {{cite web , url=http://newsroom.cisco.com/dlls/2008/prod_101408e.html , title=Cisco, Atmel and the Swedish Institute of Computer Science (SICS) Collaborate to Support a Future Where Any Device Can Be Connected to the Internet , work=Cisco , date=October 14, 2008 , access-date=February 2, 2015


External links


uIP source

uIP port for AVR microcontrollers

uIP-based Webserver using OpenRISC-embedded SoC
Embedded systems Free network-related software Software using the BSD license