Figure 3:
The routing pseudo code.