Page 1 of 1

Programming a driver for network card(s)

Posted: Fri Oct 27, 2006 3:18 am
by sevobal
Hi,
I want to write a simple program for my OS which just works like ping.exe
But I don't know how to control the ethernet card...are there any information how to program them (low-level). Which types of cards (chipsets) are available and where are the differents? Are there any good links with which I can deal? I hope it is possible to write a driver...

Thank U for your help :D

Posted: Fri Oct 27, 2006 4:35 am
by spix
http://www.vijaymukhi.com/vmis/roll.htm

That link might be helpful

Posted: Fri Oct 27, 2006 5:03 am
by muisei
Try to read the datasheet for your Network card chip.
http://www.alldatasheet.com/
For example search for
NE2000

Posted: Fri Oct 27, 2006 8:52 am
by Dex
You first job should be a pci scan function, that can scan and find a pci by its vendor/device ID, also some functions for "PciRegWrite","PciRegRead" then you can test for install card.
Than you can start writing your driver, go for one with lots of info like "RTL8139" get the data sheet there is info in the sheet with loads of offsets address, it as simple as getting the address that your FindPciCard function returns, adding the offset, you can then read the bits at the address or change the bits at the address to do differant things, but all the info of what each bit does is in the data sheet.

Posted: Mon Oct 30, 2006 2:15 am
by lode
The GRUB source code has some small drivers for several cards. I found those to be very helpful in writing my own.