Home > Articles > Networking

  • Print
  • + Share This
This chapter is from the book

3.7 Network Initialization Overview

All the structures we have described are allocated and attached to each other during kernel initialization. In this section we give a broad overview of the initialization steps. In later sections we describe the specific device- and protocol-initialization steps.

Some devices, such as the SLIP and loopback interfaces, are implemented entirely in software. These pseudo-devices are represented by a pdevinit structure (Figure 3.22) stored in the global pdevinit array. The array is constructed during kernel configuration. For example:

03fig22.gifFigure 3.22. pdevinit structure.

120-123

In the pdevinit structures for the SLIP and the loopback interface, pdev_attach is set to slattach and loopattach respectively. When the attach function is called, pdev_count is passed as the only argument and specifies the number of devices to create. Only one loopback device is created but multiple SLIP devices may be created if the administrator configures the SLIP entry accordingly.

The network initialization functions from main are shown in Figure 3.23.

03fig23.jpgFigure 3.23. main function: network initialization.

70-96

cpu_startup locates and initializes all the hardware devices connected to the system, including any network interfaces.

97-174

After the kernel initializes the hardware devices, it calls each of the pdev_attach functions contained within the pdevinit array.

175-234

ifinit and domaininit finish the initialization of the network interfaces and protocols and scheduler begins the kernel process scheduler, ifinit and domaininit are described in Chapter 7.

In the following sections we describe the initialization of the Ethernet, SLIP, and loopback interfaces.

  • + Share This
  • 🔖 Save To Your Account