1 | .. COMMENT: Written by Eric Norum |
---|
2 | .. COMMENT: COPYRIGHT (c) 1988-2002. |
---|
3 | .. COMMENT: On-Line Applications Research Corporation (OAR). |
---|
4 | .. COMMENT: All rights reserved. |
---|
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 | .. image:: ../images/networking/networkflow.jpg |
---|
13 | |
---|
14 | |
---|
15 | The transmit task for each network interface is normally blocked waiting for a |
---|
16 | packet to arrive in the transmit queue. Once a packet arrives, the transmit |
---|
17 | task may block waiting for an event from the transmit interrupt handler. The |
---|
18 | transmit interrupt handler sends an RTEMS event to the transmit task to |
---|
19 | indicate that transmit hardware resources have become available. |
---|
20 | |
---|
21 | The receive task for each network interface is normally blocked waiting for an |
---|
22 | event from the receive interrupt handler. When this event is received the |
---|
23 | receive task reads the packet and forwards it to the network stack for |
---|
24 | subsequent processing by the network task. |
---|
25 | |
---|
26 | The network task processes incoming packets and takes care of timed operations |
---|
27 | such as handling TCP timeouts and aging and removing routing table entries. |
---|
28 | |
---|
29 | The 'Network code' contains routines which may run in the context of the user |
---|
30 | application tasks, the interface receive task or the network task. A network |
---|
31 | semaphore ensures that the data structures manipulated by the network code |
---|
32 | remain consistent. |
---|