Date: Fri, 30 Jan 2004 10:13:12 -0800 From: Brooks Davis <brooks@one-eyed-alien.net> To: Erik Hamilton <ehamilt@siue.edu> Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD IP Device Driver Message-ID: <20040130181312.GC1914@Odin.AC.HMC.Edu> In-Reply-To: <Pine.SO4.4.05.10401301121020.29415-100000@cougar.isg.siue.edu> References: <Pine.SO4.4.05.10401301121020.29415-100000@cougar.isg.siue.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--6sX45UoQRIJXqkqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 30, 2004 at 11:34:41AM -0600, Erik Hamilton wrote: > I'm currently working on building a simple token ring networking scheme > over the parallel port (/dev/ppi0) for a graduate project. The project > itself is to be used later for educational purposes, illustrating how you > can build a network from the ground up through hardware developement, > framing, and layering. The hardware is done, simple token managment is > working, and data can be passed around the ring. So basically I have the > physical and datalink layers mostly done. It's my understanding that if I > can get my program to speak IP to FreeBSD (through a kernel module or > something else) I could inherit its TCP/IP stack. >=20 > Ideally I would like to have my simple token ring as another network > device that could be used just like any other network interface. I've been > reading through FreeBSD's handbooks and poking through /usr/src/sys/dev/. >=20 > * Developers' Handbook: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/inde= x.html >=20 > * FreeBSD Architecture Handbook (esp. Section II: Device Drivers): > http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/index.html >=20 > Basically I think I'm just looking for some guidance. Am I on the right > track? or am I confused? I haven't had the best luck with google, so any > other reading material would be greatly appreciated. Those are good places to look. I'd specifictly recommend looking at the implementation of the plip driver since that interfaces to the parallel port. Depending on how your device works (what the datalink layer looks like, what your timing requirements are, etc.), you might find it easier to handle the transmission through a userland program using tap or tun devices or possiably a combination of netgraph nodes. Actually, making a netgraph parallel port device might simplify your life tremendously if you decide to work in the kernel. One thing that would help you would be if your datalink layer looks enough like ethernet that you can use ARP so you don't have to rebuild the link layer to IP mapping code. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --6sX45UoQRIJXqkqR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAGp62XY6L6fI4GtQRAi5IAKCxW9UVt7KyqEmvLQ26Ecq4TMTz4QCeNjwd aGVwDLdWfoy9F9MhvSwcBQU= =Vrkh -----END PGP SIGNATURE----- --6sX45UoQRIJXqkqR--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040130181312.GC1914>