Chapter 4. Notification Chains
The kernel's many subsystems are heavily interdependent, so an event detected or generated by one of them could be of interest to others. To fulfill the need for interaction, Linux uses so-called notification chains .
In this chapter, we will see:
How notification chains are declared and what chains are defined by the networking code
How a kernel subsystem can register to a notification chain
How a kernel subsystem generates a notification on a chain
Note that notification chains are used only between kernel subsystems. Notifications between kernel and user space rely on other mechanisms, such as those introduced in Chapter 3.
Reasons for Notification Chains
Suppose we had the Linux router in Figure 4-1 with four interfaces. The figure shows the relationship between the router and five networks, along with a simplified version of its routing table.
Let's look at some examples of the topology in Figure 4-1. Network A is directly connected to RT on interface eth0, and network F is not directly connected to RT, but RT's eth3 is directly connected to another router that has an interface with address IP1, and that second router knows how to reach network F. The other cases are similar. In short, some networks are directly connected and others require the help of one or more additional routers to be reached.
For a detailed description of how the routing code handles this situation, refer to Part VII. In this chapter, we will concentrate on the role of notification ...