[Previous] [Contents] [Index] [Next]

Networking Architecture

Introduction

As with other service-providing processes in QNX, the networking services execute outside the kernel. Applications are presented with a single unified interface, regardless of the configuration and number of networks involved.

As a result of this architecture:

The QNX network subsystem consists of three cooperating pieces:


io-net and friends


The io-net component.


Network manager (io-net)

The io-net component is the active executable within the network subsystem. Acting as a kind of packet redirector/multiplexer, io-net is responsible for loading protocol and driver interfaces based on the configuration given to it on its command line (or via the mount command after it's started).

Employing a zero-copy architecture, the io-net executable efficiently loads multiple networking protocols, drivers, or filters (e.g. ARP, VLAN) on the fly -- these modules are shared objects that install into io-net.

Protocol interface

The networking protocol interface is responsible for implementing the details of a particular protocol (e.g. Qnet, TCP/IP, etc.). Each protocol component is packaged as a shared object (e.g. npm-qnet.so). One or more protocol components may run concurrently.

For example, the following line from a buildfile shows io-net loading two protocols (TCP/IP and Qnet) via its -p protocol command-line option:

io-net -dne2000 -ptcpip -pqnet
tcpip
QNX provides an implementation of the BSD TCP/IP stack as a protocol module within the dynamic structure of QNX networking.
qnet
Qnet is the QNX native networking protocol. Its main purpose is to extend the OS's powerful message-passing IPC transparently over a network of microkernels.

Qnet also provides Quality of Service policies to help ensure reliable network transactions.

For more information on the Qnet and TCP/IP protocols, see the following chapters in this book:

Driver interface

The network driver interface is responsible for managing the details of a particular network adaptor (e.g. an NE-2000 compatible Ethernet controller). Each driver is packaged as a shared object and installs into the io-net component.

Loading a driver

Once io-net is running, you can dynamically load drivers at the command line using the mount command. For example:

io-net &
mount -T io-net devn-ne2000.so

would start io-net and then mount the driver for an NE-2000 Ethernet adapter. All network device drivers are shared objects of the form:

devn-driver.so

Once the shared object is loaded, io-net will then initialize it. The driver and io-net are then effectively bound together -- the driver will call into io-net (for example when packets arrive from the interface) and io-net will call into the driver (for example when packets need to be sent from an application to the interface).

For more information on network device drivers, see their individual utility pages (devn-*) in the Utilities Reference.

Network DDK

Although several network drivers are shipped with the OS, you may want to write your own driver for your particular networking hardware. The Network Driver Development Kit makes this task relatively easy. The DDK provides full source code for several sample drivers as well as detailed instructions for handling the hardware-dependent issues involved in developing custom drivers for the io-net infrastructure.


[Previous] [Contents] [Index] [Next]