You can only surmise what is happening inside. You're out of luck. So, if you need altered behavior, it may be relatively simple to achieve. You may need to develop a program that has a number of similarities to existing UNIX code. Why not learn how others have solved various aspects of your problem and leverage the experience from their working base.
Books can provide in-depth design discussion to even the most thoroughly documented code.
Without the contributions of that community's members, there would be nothing about which to write. FreeBSD, NetBSD, OpenBSD, and BSDI all derive their base code from 4.4BSD, which is now about 5 years old. This book explains in detail the workings of the 4.4BSD networking code. The data structures, algorithms, and thought processes behind much of the work are explained in detail. General system-level documentation that helps explain source code can be found with the search engines.