Home > Articles > Networking

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

3.13 Summary

In this chapter we have examined the ifnet and ifaddr structures that are allocated for each network interface found at system initialization time. The ifnet structures are linked into the ifnet list. The link-level address for each interface is initialized, attached to the ifnet structure's address list, and entered into the if_addrs array.

We discussed the generic sockaddr structure and its sa_family, and sa_len members, which specify the type and length of every address. We also looked at the initialization of the sockaddr_dl structure for a link-level address.

In this chapter, we introduced the three example network interfaces that we use throughout the book.

Exercises

3.1

The netstat program on many Unix systems lists network interfaces and their configuration. Try netstat -i on a system you have access to. What are the names (if_name) and maximum transmission units (if_mtu) of the network interfaces?

3.2

In if_slowtimo (Figure 3.43) the splimp and splx calls appear outside the loop. What are the advantages and disadvantages of this arrangement compared with placing the calls within the loop?

3.3

Why is SLIP's interactive queue shorter than SLIP'S standard output queue?

3.4

Why aren't if_hdrlen and if_addrlen initialized in slattach?

3.5

Draw a picture similar to Figure 3.38 for the SLIP and loopback devices.

  • + Share This
  • 🔖 Save To Your Account