How to know about NIC?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Mohanty
Member
Member
Posts: 28
Joined: Fri Jul 30, 2010 9:15 am
Location: India
Contact:

How to know about NIC?

Post by Mohanty »

How to know which NICard your system have for all OS?
Basically which NICard is more widely used.....
Last edited by Mohanty on Tue Oct 05, 2010 4:31 am, edited 3 times in total.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: How to know about NIC?

Post 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?
User avatar
quanganht
Member
Member
Posts: 301
Joined: Fri May 16, 2008 7:13 pm
Location: Hanoi, Vietnam

Re: How to know about NIC?

Post 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 :wink:
"Programmers are tools for converting caffeine into code."
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to know about NIC?

Post 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).
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Mohanty
Member
Member
Posts: 28
Joined: Fri Jul 30, 2010 9:15 am
Location: India
Contact:

Re: How to know about NIC?

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: How to know about NIC?

Post by Solar »

Hint: Never rely completely on some emulator. Always test your stuff on real hardware, too...
Every good solution is obvious once you've found it.
Gaidheal
Member
Member
Posts: 51
Joined: Mon Oct 04, 2010 6:23 pm

Re: How to know about NIC?

Post 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.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

Re: How to know about NIC?

Post 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)
Developer of tyndur - community OS of Lowlevel (German)
Post Reply