Chapter 1 - Introduction to Azure RTOS NetX
Azure RTOS NetX is a high-performance real-time implementation of the TCP/IP standards designed exclusively for embedded ThreadX-based applications. This chapter contains an introduction to NetX and a description of its applications and benefits.
NetX Unique Features
Unlike other TCP/IP implementations, NetX is designed to be versatile—easily scaling from small microcontroller-based applications to those that use powerful RISC and DSP processors. This is in sharp contrast to public domain or other commercial implementations originally intended for workstation environments but then squeezed into embedded designs.
Piconet™ Architecture
Underlying the superior scalability and performance of NetX is Piconet, a software architecture especially designed for embedded systems. Piconet architecture maximizes scalability by implementing NetX services as a C library. In this way, only those services actually used by the application are brought into the final runtime image. Hence, the actual size of NetX is completely determined by the application. For most applications, the image size requirements of NetX ranges between 5 KBytes and 30 KBytes in size.
NetX achieves superior network performance by layering internal component function calls only when it is absolutely necessary. In addition, much of NetX processing is done directly in-line, resulting in outstanding performance advantages over the workstation network software that was often used in embedded designs in the past.
Zero-copy Implementation
NetX provides a packet-based, zero-copy implementation of TCP/IP. Zero copy means that data in the application's packet buffer are never copied inside NetX. This greatly improves performance and frees up valuable processor cycles to the application, which is extremely important in embedded applications.
UDP Fast Path™ Technology
With UDP Fast Path Technology, NetX provides the fastest possible UDP processing. On the sending side, UDP processing—including the optional UDP checksum—is completely contained within the nx_udp_socket_send service. No additional function calls are made until the packet is ready to be sent via the internal NetX IP send routine. This routine is also flat (i.e., its function call nesting is minimal) so the packet is quickly dispatched to the application's network driver. When the UDP packet is received, the NetX packet-receive processing places the packet directly on the appropriate UDP socket's receive queue or gives it to the first thread suspended waiting for a receive packet from the UDP socket's receive queue. No additional ThreadX context switches are necessary.
ANSI C Source Code
NetX is written completely in ANSI C and is portable immediately to virtually any processor architecture that has an ANSI C compiler and ThreadX support.
Not A Black Box
Most distributions of NetX include the complete C source code. This eliminates the "black-box" problems that occur with many commercial network stacks. By using NetX, applications developers can see exactly what the network stack is doing—there are no mysteries!
Having the source code also allows for application-specific modifications. Although not recommended, it is certainly beneficial to have the ability to modify the network stack if it is required.
These features are especially comforting to developers accustomed to working with in-house or public domain network stacks. They expect to have source code and the ability to modify it. NetX is the ultimate network software for such developers.
BSD-Compatible Socket API
For legacy applications, NetX provides a BSD compatible socket interface that makes calls to the high-performance NetX API underneath. This helps in migrating existing network application code to NetX.
RFCs Supported by NetX
NetX support of RFCs describing basic network protocols includes but is not limited to the following network protocols. NetX follows all general recommendations and basic requirements within the constraints of a real-time operating system with small memory footprint and efficient execution.
| RFC | Description |
|---|---|
| RFC 1112 | Host Extensions for IP Multicasting (IGMPv1) |
| RFC 1122 | Requirements for Internet Hosts - Communication Layers |
| RFC 2236 | Internet Group Management Protocol, Version 2 |
| RFC 768 | User Datagram Protocol (UDP) |
| RFC 791 | Internet Protocol (IP) |
| RFC 792 | Internet Control Message Protocol (ICMP) |
| RFC 793 | Transmission Control Protocol (TCP) |
| RFC 826 | Ethernet Address Resolution Protocol (ARP) |
| RFC 903 | Reverse Address Resolution Protocol (RARP) |
Embedded Network Applications
Embedded network applications are applications that need network access and execute on microprocessors hidden inside products such as cellular phones, communication equipment, automotive engines, laser printers, medical devices, and so forth. Such applications almost always have some memory and performance constraints. Another distinction of embedded network applications is that their software and hardware have a dedicated purpose.
Real-time Network Software
Basically, network software that must perform its processing within an exact period of time is called real-time network software, and when time constraints are imposed on network applications, they are classified as real-time applications. Embedded network applications are almost always real-time because of their inherent interaction with the external world.
NetX Benefits
The primary benefits of using NetX for embedded applications are high-speed Internet connectivity and very small memory requirements. NetX is also completely integrated with the high-performance, multitasking ThreadX real-time operating system.
Improved Responsiveness
The high-performance NetX protocol stack enables embedded network applications to respond faster than ever before. This is especially important for embedded applications that either have a significant volume of network traffic or stringent processing requirements on a single packet.
Software Maintenance
Using NetX allows developers to easily partition the network aspects of their embedded application. This partitioning makes the entire development process easy and significantly enhances future software maintenance.
Increased Throughput
NetX provides the highest-performance networking available, which is achieved by minimal packet processing overhead. This also enables increased throughput.
Processor Isolation
NetX provides a robust, processor-independent interface between the application and the underlying processor and network hardware. This allows developers to concentrate on the network aspects of the application rather than spending extra time dealing with hardware issues directly affecting networking.
Ease of Use
NetX is designed with the application developer in mind. The NetX architecture and service call interface are easy to understand. As a result, NetX developers can quickly use its advanced features.
Improve Time to Market
The powerful features of NetX accelerate the software development process. NetX abstracts most processor and network hardware issues, thereby removing these concerns from a majority of application network-specific areas. This, coupled with the ease-of-use and advanced feature set, results in a faster time to market.
Protecting the Software Investment
NetX is written exclusively in ANSI C and is fully integrated with the ThreadX real-time operating system. This means NetX applications are instantly portable to all ThreadX supported processors. Better still, a completely new processor architecture can be supported with ThreadX in a matter of weeks. As a result, using NetX ensures the application's migration path and protects the original development investment.