What you see is from the perspective of the filesystem root. So you see /etc, /dev, /tmp -- but the bulk of these are empty directories.
Also "sys" is a symbolic link to "usr/src/sys". Handy though this is, I get rid of this also since it just bloats the tags file I generate later for all of this.
Next I run "ctags -R ." -- I get a lot of "no such file" warnings. These are due to things like the following. Links to absolute filenames. We could write a script to fix these (and maybe we will someday). A glance at them shows that few if any are in the vital source tree so we ignore these for now. We can just run ctags again someday, capture the output and write a script to process all of the offending files if that ever seem worth doing.
cd etc ls -al termcap lrwxrwxrwx 1 tom tom 23 Mar 17 2016 termcap -> /usr/share/misc/termcap
Another annoyance is tags files scattered around in various places. Running grep finds all kinds of distracting thing in these. These are easily dealt with via:
find . -name tags -print find . -name tags -delete
We are interested in kernel sources, and they are found in usr/src/sys.
Kernel include files are in the "sys" directory.
For a network device driver, look at usr/src/sys/hp300/dev/if_le.c which is a fairly concise driver for the AMD 7990 "LANCE" network chip.
The hp300 is (was) a Motorola 68020 based machine, not unlike a sun3. It is more properly called an HP 9000 series model 300. These were introduced in 1985 and declared obsolete in 1997.
This is good old K and R C code from the good old days.
Interestingly the header files have ansi prototypes (enclosed in a __P macro) which allowed some level of compiler verification.
Kyu / [email protected]