The latest edition of Linux Gazette has an excellent article on writing linux network device drivers, and walks through the steps of detecting the network device, enabling it, using the net_device structure, and transmitting and receiving.
Linux Magazine has a fairly in-depth look at using ioctl to control device drivers, with some real-world examples of getting and setting the line speed of a terminal and setting the ip address of network interfaces, from your own C code.