Up to now, we've been talking quite a bit about network interfaces and general TCP/IP issues, but didn't really cover exactly what happens when ``the networking code'' in the kernel accesses a piece of hardware. For this, we have to talk a little about the concept of interfaces and drivers.
First, of course, there's the hardware itself, for example an Ethernet board: this is a slice of Epoxy, cluttered with lots of tiny chips with silly numbers on them, sitting in a slot of your PC. This is what we generally call a device.
For you to be able to use the Ethernet board, special functions have to be present in your kernel that understand the particular way this device is accessed. These are the so-called device drivers. For example, has device drivers for several brands of Ethernet boards that are very similar in function. They are known as the ``Becker Series Drivers'', named after their author, Donald Becker. A different example is the D-Link driver that handles a D-Link pocket adaptor attached to a parallel port.
But, what do we mean when we say a driver ``handles'' a device? Let's go back to that Ethernet board we examined above. The driver has to be able to communicate with the peripheral's on-board logic somehow: it has to send commands and data to the board, while the board should deliver any data received to the driver.
[tbp]
figures/iface.epsf
(405,270)(0,-10) (120,0)(120,40)(90,40) (90,0)(120,0) (115,35)(111,35)(111,16)(103,10) (113,33)(113,15)(103,7) (115,33)(115,13)(103,4) (103,3)(103,15)(95,15) (95,3)(103,3) (105,20)(105,35)(95,35) (95,20)(105,20) (105,20)(105,35)(95,35) (95,20)(105,20) (107,31)(107,34)(93,34) (93,31)(107,31) (107,26)(107,29)(93,29) (93,26)(107,26) (107,21)(107,24)(93,24) (93,21)(107,21) (190,0)(190,40)(160,40) (160,0)(190,0) (185,35)(181,35)(181,16)(173,10) (183,33)(183,15)(173,7) (185,33)(185,13)(173,4) (173,3)(173,15)(165,15) (165,3)(173,3) (175,20)(175,35)(165,35) (165,20)(175,20) (175,20)(175,35)(165,35) (165,20)(175,20) (177,31)(177,34)(163,34) (163,31)(177,31) (177,26)(177,29)(163,29) (163,26)(177,26) (177,21)(177,24)(163,24) (163,21)(177,21) (370,0)(370,40)(340,40) (340,0)(370,0) (365,35)(361,35)(361,16)(353,10) (363,33)(363,15)(353,7) (365,33)(365,13)(353,4) (353,3)(353,15)(345,15) (345,3)(353,3) (355,20)(355,35)(345,35) (345,20)(355,20) (355,20)(355,35)(345,35) (345,20)(355,20) (357,31)(357,34)(343,34) (343,31)(357,31) (357,26)(357,29)(343,29) (343,26)(357,26) (357,21)(357,24)(343,24) (343,21)(357,21) (300,0)(300,40)(270,40) (270,0)(300,0) (295,35)(291,35)(291,16)(283,10) (293,33)(293,15)(283,7) (295,33)(295,13)(283,4) (283,3)(283,15)(275,15) (275,3)(283,3) (285,20)(285,35)(275,35) (275,20)(285,20) (285,20)(285,35)(275,35) (275,20)(285,20) (287,31)(287,34)(273,34) (273,31)(287,31) (287,26)(287,29)(273,29) (273,26)(287,26) (287,21)(287,24)(273,24) (273,21)(287,21)
(175,155)3030