Re: how to program a driver?

[ Available lists | Index of freebsd-net | Month of Dec 2008 | Week of 9 Dec 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Xin LI <delphij@delphij.net>
Date
9 Dec 2008 05:04:42
Subject
Re: how to program a driver?
Message-ID
493DFC60.2040305@delphij.net

In reply to
References to

[ Hide this part ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Espartano wrote:
> hi people first and foremost apologize me for my bad english I have a
> little question, if i want to understand how work a net driver, what
> things i will need to learn?
>
> Actually i know how to program with C language in a basic level but i
> don't know nothing about hardware or computer organization, what
> topics i should study for gain knowledges about net-drivers ? or if
> someone can recommend me books about this topic i will be very
> thankful.

I think you need some understanding on how the hardware is composed into
a computer system, usually this is taught in freshmen days for a CS or
EE major, and it's possible to learn yourself. Basically, NIC drivers
implement common interfaces like probe, transfer data, callback when
data is received, etc., this part would be easier if you do understand
how things works and have data sheets at your hand.

There is a book available to give you some ideas about how to write code
for FreeBSD Kernel, <<Design and Implementation of the FreeBSD Operating
System>> which would help you to understand the basic concepts, etc.

My personal suggestion is to start from a simple network driver and try
start to get knowledge by tweaking some stuff and see what would happen.

Cheers,
- --
Xin LI <delphij@delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkk9/GAACgkQi+vbBBjt66Cv4wCfVKw9Wkqfzr/dQcqlQ6zQUDI6
DDYAn3UIGWs7RBw1VF+M4iHzlI8ZKTpq
=8FQC
-----END PGP SIGNATURE-----

Elapsed time: 0.276 seconds