Language: English | Deutsch | 中国的       Change Country
SEGGER Microcontroller

embOS/IP (TCP/IP Stack) » 7.xx.xx

B
U
Y
Get an online QUOTE.
embOS/IP (TCP/IP Stack) - 7.xx.xx

embOS/IP

embOS/IP is a CPU independent TCP/IP stack. embOS/IP is a high-performance library that has been optimized for speed, versatility and memory footprint. It is is written in ANSI C and can be used on virtually any CPU.

Features

  • ANSI C socket.h-like API for user applications. An application using the standard C socket library can easily be ported to use embOS/IP.
  • Very simple device driver structure.
  • High performance
  • Small footprint
  • Runs "out-of-the-box"
  • No configuration required
  • Works seamlessly with embOS in multitasking environment
  • Zero data copy for ultra fast performance
  • Standard sockets Interface
  • Raw Socket Support
  • Non-blocking versions of all functions
  • Connections limited only by memory availability
  • Nagle Algorithm (Slow start)
  • Delayed ACKs
  • BSD style "Keepalive" option
  • Re-assembly of fragmented packets
  • Optional drivers for the most common devices are available.

embOS/IP structure

embOS/IP is organized in different layers, illustrated in the follwoing diagram. A short description of each layer´s functionality follows below.

Application layer

The API Layer is the interface between embOS/IP and the user application. It uses the embOS/IP API to transmit data over an TCP/IP network. The embOS/IP API provides functions in Berkley socket style, such as connect(), bind(), listen(), etc.

Transport layer

The transport layer provides end-to-end communication services for applications. The two relevant protocols of the transport layer protocol are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). TCP is a reliable connection-oriented transport service. It provides end-to-end reliability, resequencing, and flow control. UDP is a connectionless transport service.

Internet layer

All protocols of the Transport layer use the Internet Protocol (IP) to carry data from source host to destination host. IP is a connectionless service, providing no end-to-end delivery guarantees. IP datagrams may arrive at the destination host damaged, duplicated, out of order, or not at all. The Transport layer is responsible for reliable delivery of the datagrams when it is required. The IP protocol includes provision for addressing, type-of-service specification, fragmentation and reassembly, and security information.

Link layer

The Link layer provides the implementation of the communication protocol used to interface to the directly-connected network. A variety of communication protocols have been developed and standadized. The most commonly used protocol is Ethernet (IEEE 802.3). In this version of embOS/IP is only Ethernet supported.

Encapsulation

The four layers structure is defined in RFC 1122. The data flow starts at application layer goes over the transport layer, the network layer, and the link layer. Every protocol adds an protocol-specific header and encapsulates the data and header from the layer above as data. On the receiving side the data will be extracted in the complementary direction. The opposed protocols does not know which protocol on the layers above and below are used. The following illustration shows the encapsulation of data within an UDP datagram within an IP packet.

Tasks and interrupt usage

embOS/IP can be used in an application in three different ways.

  • One task dedicated to the stack
  • Two tasks dedicated to the stack
  • Zero tasks dedicated to the stack (Superloop)

The default task structure is one task dedicated to the stack.

One task dedicated to the stack

This is the simplest way to use the TCP/IP stack. One task is dedicated to the stack. It is called IP_Task and handles housekeeping operations, resends and handling of incoming packets. The "Read packet" operation is performed from within the ISR. Since the "Read packet" operation is called directly from the ISR, no additional task is required. The length of the interrupt latency will be extended for the time period which is required to process the "Read packet" operation.

Two tasks dedicated to the stack

Two tasks are dedicated to the stack. The first is called IP_Task and handles housekeeping operations, resends and handling of incoming packets. The second one is called IP_RxTask and handles the "Read packet" operation. IP_RxTask is woken up from the interrupt service routine, if new packets are available. The interrupt latency is not extended, since the "Read packet" operation has been moved from the interrupt service routine to IP_RxTask.

Zero tasks dedicated to the stack (Superloop)

embOS/IP can also be used without any additonal task for the stack, if an application task calls periodically IP_Exec(). The "Read packet" operation is performed from within the ISR. Since the "Read packet" operation is called directly from the ISR, no additional task is required. The length of the interrupt latency will be extended for the time period which is required to process the "Read packet" operation.

 

embOS/IP Add-ons

The embOS/IP is a fully featured TCP/IP which can be supplemented application layer protocols like HTTP or FTP. The application layer protocols are optional extensions to embOS/IP. They can Be used with embOS/IP OR with any OTHER TCP/IP stack.