On Mon, Apr 19, 2010 at 09:59:06AM -0400, Adam M. Dutko wrote: > The obvious answer to this questions is "Just read the source..." but I > still want to ask if someone is aware of a good overview of the OpenBSD > source code? I've watched several presentations by Ted Unangst, Jason Dixon > and co. and there seems to be a good amount of information spread across the > web, but not a single canonical reference besides the source code (yes, I > know source is very important). > > I know the base of code is very very large, so maybe instead of the whole > repository, how about important parts/subsystems? Are any of you aware of > such a document or documents? Are there areas that are easier for "relative > newbies" to start in versus other areas? (eg. wireless drivers vs. SMP) Is > there something like an "openbsd janitors" project where newbies can start? > Thanks in advance.
http://www.openbsd.org/papers/ has some good pointers; specifically claudio@'s presentations on the network internals which have call graphs, and jsg@'s introduction to drivers. man 9 style is a good introduction to the conventions used in the source tree. I'm going to assume that you mean an overview as to which directories mean what inside the kernel, since outside of the kernel, it's rather self-evident (e.g., src/usr.sbin/foo is for /usr/sbin/foo): src/sys/ kern/ <- generic stuffs (signals, scheduling, vnodes, syscalls) net/ <- generic net stuffs (interface handling, pf, routing) netinet{,6}/ <- IPv{4,6} stuffs net*/ <- non-IP network stuffs sys/ <- system header files arch/ <- architecture-dependant code dev/ <- hardware drivers stuffs crypto/ <- kernel crypto stuffs *fs/ <- filesystem code nfs/ <- the source of all horror conf/ <- kernel configuration stuffs lib/ <- libc routines ported to the kernel, mostly scsi/ <- self-explanatory uvm/ <- virtual memory stuffs altq/ <- also self-explanatory compat/ <- compatibility routines for other OSes ddb/ <- kernel debugger stuffs I may have missed something (or be slightly incorrect; hopefully someone smarter than me can help clean this up if I'm too far off). Hopefully this is useful for somebody. > > -Adam
