Next: 3 The Network Layer:
Up: 15-441 Project 2, Fall
Previous: 1 Introduction
In this section we present a high-level overview of the project. We will
go into more detail in later sections.
The networking code in the kernel is organized into several layers
which you have already seen in class. The organization of the network code in the simulated kernel is shown in
Figure 1. Note that the application layer has been broken
into two ``mini'' layers, the first one consisting of the actual user
programs and the second one of the socket layer.
Figure 1:
Networking code organization in the simulated kernel
|
- In order to access the kernel's networking functionality, user programs
use the socket API, which includes system calls such as
Socket(). In this project, you will implement
a DHCP client and server application that use the socket
layer. DHCP allows a client host that does not have a static IP address
assigned to it to acquire a dynamic IP address from the server host.
- The socket layer is a protocol-independent interface to the
transport protocol. It is already implemented in the simulator. The
functionality provided by the socket layer is described in the
simulator handout.
- The transport layer contains the implementation of the transport
protocols UDP and TCP. These protocols are already implemented in the
simulator.
- The network layer contains an implementation of the IP protocol.
For this project, you will implement basic IP functionality of a
router, that is, input and output processing of datagrams and forwarding of
datagrams. In addition, you will also add support for NAT and firewalling.
- The link layer and the physical layer are
implemented in the simulator. Your network layer will interact with
the link layer to send/receive packets. The functionality provided
by the link layer is described in the simulator handout.
The project directory for this project will be:
/afs/cs.cmu.edu/academic/class/15441-f01/projects/project2/
In this handout, we will use $PDIR to denote this directory.
For your/our convenience, we provide
you a template for some of the code that you must write. This includes a Makefile,
skeleton definitions of some important structures, skeleton prototypes of
some interface
functions, etc. In this handout, we will reference the names of some
functions/structures defined in the template files. All the template files
are in $PDIR/template.
Next: 3 The Network Layer:
Up: 15-441 Project 2, Fall
Previous: 1 Introduction