Page 1 of 1
How to know about NIC?
Posted: Tue Oct 05, 2010 3:56 am
by Mohanty
How to know which NICard your system have for all OS?
Basically which NICard is more widely used.....
Re: How to know about NIC?
Posted: Tue Oct 05, 2010 3:57 am
by JamesM
What system are you using? What operating system?
If windows (assumption from your other questions/answers) - have you never ever used Device Manager? Seriously?
Re: How to know about NIC?
Posted: Tue Oct 05, 2010 6:47 am
by quanganht
For OS development, you'd better choose and implement some very common and well documented NIC, for example NE2000. NE2000 is also supported by Bochs, so you can easily test your code on Bochs. Testing your code on real hardware at the first place can be harmful and is not recommended, as you don't know when you will fry your card
Re: How to know about NIC?
Posted: Tue Oct 05, 2010 6:53 am
by Combuster
After three edits, the question has now become which NIC is the most prevalent. Shame on you for not asking the right question first time around. Beaten to the actual point by quanganht, posting anyway:
There is no one most common standard, but RTL8139s pretty common as they seem to be on every plug-in card currently in store. On the other hand, motherboard manufacturers often include a NIC as part of the chipset to promote variety.
You can use
http://forum.osdev.org/viewtopic.php?f=2&t=2970 as sample data, but it is a rather small and biased test set to draw worldwide conclusions.
That said, the previous "standard" was Ne2000, and this is what you'll find in Bochs, making that a good starting point from a debugging point of view. IIRC to cover all common emulators and VMs, you need a Ne2000 driver, an Intel Pro/100 driver, and an AMD PcNet driver. Of the above I only have a real Pro/100, and it's in a Pentium2 based server machine.
Bottom line: Take the nic YOU have (emulator or real).
Re: How to know about NIC?
Posted: Tue Oct 05, 2010 7:52 am
by Mohanty
Combuster, thank you so much for understanding gist of topic. And thank you so much for your Answer.
Combuster wrote:
Bottom line: Take the nic YOU have (emulator or real).
And I have Virtual-Box Emulator.
Re: How to know about NIC?
Posted: Tue Oct 05, 2010 8:08 am
by Solar
Hint: Never rely completely on some emulator. Always test your stuff on real hardware, too...
Re: How to know about NIC?
Posted: Tue Oct 05, 2010 8:59 am
by Gaidheal
Only a hint? ;¬)
I used to wonder why everything included an NE2000 as a default, years ago, as I'd never even seen one. I'd have to second others by telling you to start with hardware you have ready access to and see often in machines you own or use and then that friends and family own or use. Making sure you can target the emulated cards in Bochs and its ilk is also good sense and will let you test code against 'hardware' that you cannot actually damage with accidental stupidity.
Re: How to know about NIC?
Posted: Thu Oct 07, 2010 1:50 am
by Kevin
The problem with just using the real hardware that you have is that often enough you have the hardware but no adequate documentation.
For example, I have two sis900 NICs here, an older one as a PCI card and a newer one on-board. Somewhere on the net I found some documentation for some SiS chipset which included a sis900 NIC and I used that for my driver. Seems to work very well for hardware up to Rev 82, but my on-board NIC is Rev 90 and the card is dead as soon as I try sending a packet > 128 Bytes. No documentation for this card means that I haven't found out yet what's wrong. (Yes, I tried comparing to some other drivers, didn't find anything suspicious)