Re: linux headers and tcpdump programs

Michael Elizabeth Chastain (mec@duracef.shout.net)
Thu, 11 Jul 1996 10:16:51 -0500


Note that /usr/include/linux is available to user-space programs, but
/usr/include/net does *not* point at /usr/src/linux/include/net.
Instead it comes from some other mysterious place.

Also note that that almost none of /usr/src/linux/include/net has
user-visible stuff (there's one bridging structure returned by an
ioctl), and it has lots of internal kernel declarations not protected
by __KERNEL__.

My conclusion is that /usr/src/linux/include/linux is the right
place for things visible from userland, and /usr/src/linux/include/net
is the right place for networking things NOT visible from userland.

I'm planning to clean up the headers in 2.1:

include guards on all files
proper nested #include on all files
document which directories in include/* are exported to user space
move internal kernel stuff from include/linux to new include/kernel
proper use of __KERNEL__ everywhere

Ideas and comments welcomed. Especially welcomed are one-liners from
experienced kernel hackers saying whether this will be useful or if I'm
just wasting my time.

Michael Chastain
mec@duracef.shout.net