From owner-freebsd-net@FreeBSD.ORG Tue Dec 9 05:04:42 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5EA8106564A for ; Tue, 9 Dec 2008 05:04:42 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD118FC18 for ; Tue, 9 Dec 2008 05:04:42 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 964E328449 for ; Tue, 9 Dec 2008 13:04:41 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id DBC94EC22B1; Tue, 9 Dec 2008 13:04:40 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id fn0oC-4d0AJu; Tue, 9 Dec 2008 13:04:36 +0800 (CST) Received: from charlie.delphij.net (c-67-180-38-12.hsd1.ca.comcast.net [67.180.38.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id D7E04EC1CC3; Tue, 9 Dec 2008 13:04:34 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=bmKNhEhh3W3k4uQmpDrL3nnbi8+HCy3E76Xgr+1glFvRaH3LLPbql7fyLEN0PG2Wz zUm25tzfH0RTDCrojSr0w== Message-ID: <493DFC60.2040305@delphij.net> Date: Mon, 08 Dec 2008 21:04:32 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Espartano References: In-Reply-To: X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: how to program a driver? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 05:04:42 -0000 -----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, <> 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 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-----