On Wed, Jun 28, 2006 at 09:10:54AM -0700, Scott Francis wrote:
> On 6/28/06, joakinen <[EMAIL PROTECTED]> wrote:
> >Greetings to all,
> >
> >I'm a programmer and network administrator and want to study the code of
> >OpenBSD related to TCP/IP & Ethernet to understand networking from inside
> >and also to see if I can be of any help to the rest of developers.
> >
> >I'm interested specifically in the following topics:
> >
> >- Programming ethernet drivers
> >- Study and understand the API that TCP/IP offers to applications
> >
> >I know the basics of C language so reading code I will refresh my
> >knowledge of it.
> >
> >Where do you recommend me to start?
> >Perhaps reading src/sys/netinet?
> >Is there any "diagram" of how every piece of code retales to the others?
>
> not to my knowledge. Starting with section 4 of the manual, and the
> corresponding source files, is probably the way to go. style(9) may
> also be enlightening.
For books, I usually hear 'The Design and Implementation of the 4.4BSD
Operating System' thrown around in such discussions. It might or might
not apply in this case, though.
There are also many programs that can help; ctags(1), devel/ectags,
devel/cscope (WARNING: this is known-vulnerable software, don't run on
untrusted sources!), and a host of others.
As to the userland API of TCP/IP, especially if using the standard
socket API (i.e., not bpf(4), pf(4), raw sockets, or something else that
also requires root priviliges and more calls) - just write a couple of
quick programs.
Where ethernet drivers are concerned, you might want to pick a
reasonably clean - probably recent - driver for not-too-broken hardware.
Joachim