1 | .. SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. COMMENT: Written by Eric Norum |
---|
4 | .. Copyright (C) 1988, 2002 On-Line Applications Research Corporation (OAR) |
---|
5 | |
---|
6 | Network Task Structure and Data Flow |
---|
7 | #################################### |
---|
8 | |
---|
9 | A schematic diagram of the tasks and message *mbuf* queues in a simple RTEMS |
---|
10 | networking application is shown in the following figure: |
---|
11 | |
---|
12 | .. figure:: ../images/networking/networkflow.png |
---|
13 | :align: center |
---|
14 | :alt: Network Flow |
---|
15 | |
---|
16 | The transmit task for each network interface is normally blocked waiting for a |
---|
17 | packet to arrive in the transmit queue. Once a packet arrives, the transmit |
---|
18 | task may block waiting for an event from the transmit interrupt handler. The |
---|
19 | transmit interrupt handler sends an RTEMS event to the transmit task to |
---|
20 | indicate that transmit hardware resources have become available. |
---|
21 | |
---|
22 | The receive task for each network interface is normally blocked waiting for an |
---|
23 | event from the receive interrupt handler. When this event is received the |
---|
24 | receive task reads the packet and forwards it to the network stack for |
---|
25 | subsequent processing by the network task. |
---|
26 | |
---|
27 | The network task processes incoming packets and takes care of timed operations |
---|
28 | such as handling TCP timeouts and aging and removing routing table entries. |
---|
29 | |
---|
30 | The 'Network code' contains routines which may run in the context of the user |
---|
31 | application tasks, the interface receive task or the network task. A network |
---|
32 | semaphore ensures that the data structures manipulated by the network code |
---|
33 | remain consistent. |
---|