How to write a NIC driver for FreeBSD

“[..] I write new drivers by choosing an existing driver that
most closely matches the design of the chip I need to support, run
it through sed(1) to change its name, strip out all the device-dependent
stuff specific to the old device and replace it with stuff for the
new device.
And then the stork comes, and it’s a driver.” — Bill Paul on freebsd-net