The ioctl commands that are used in network programs can be divided into six categories:
Socket operations (Are we at the out-of-band mark?)
File operations (set or clear the nonblocking flag)
Interface operations (return interface list, obtain broadcast address)
ARP table operations (create, modify, get, delete)
Routing table operations (add or delete)
STREAMS system (Chapter 31)
We will use the socket and file operations, and obtaining the interface list is such a common operation that we developed our own function to do this. We will use this function numerous times in the remainder of the text. Only a few specialized programs use the ioctl operations with the ARP cache and routing table.