Friday, October 30, 2009

1.15 Summary

Team-Fly
 

 

TCP/IP Illustrated, Volume 2: The Implementation
By
Gary R. Wright, W. Richard Stevens
Table of Contents
Chapter 1. 
Introduction


1.15 Summary


This chapter provided an overview of the Net/3 networking code. Using a simple program (Figure 1.2) that sends a UDP datagram to a daytime server and receives a reply, we've followed the resulting output and input through the kernel. Mbufs hold the information being output and the received IP datagrams. The next chapter examines mbufs in more detail.


UDP output occurs when the process executes the sendto system call, while IP input is asynchronous. When an IP datagram is received by a device driver, the datagram is placed onto IP's input queue and a software interrupt is scheduled to cause the IP input function to execute. We reviewed the different interrupt levels used by the networking code within the kernel. Since many of the networking data structures are shared by different layers that can execute at different interrupt priorities, the code must be careful when accessing or modifying these shared structures. We'll encounter calls to the spl functions in almost every function that we look at.


The chapter finishes with a look at the overall organization of the source code in Net/3, focusing on the code that this text examines.


Exercises


1.1

Type in the example program (Figure 1.2) and run it on your system. If your system has a system call tracing capability, such as trace (SunOS 4.x), truss (SVR4), or ktrace (4.4BSD), use it to determine the system calls invoked by this example.

1.2

In our example that calls IF_DEQUEUE in Section 1.12, we noted that the call to splimp blocks network device drivers from interrupting. While Ethernet drivers execute at this level, what happens to SLIP drivers?





    Team-Fly
     

     
    Top
     


    No comments:

    Post a Comment