Check NIC card present or not form dos

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
chaand

Check NIC card present or not form dos

Post by chaand »

how it is possible to check whether nic card is present or not from pure dos?
need c or c++ or assembly code to check whether the card is present or not

regards,

chaand
TripleFault

RE:Check NIC card present or not form dos

Post by TripleFault »

Detecting a Network Interface Card from DOS can vary from brand to brand.  It can also vary by the type of NIC (PCI, ISA, USB, PCMCIA, etc.).  Are you trying to detect a specific card or just see if there is one present?
chaand

RE:Check NIC card present or not form dos

Post by chaand »

hello tripleFault,

i need whether on card is present or not? then need to identify which card it is like details of the card...

if any idea please reply

with luv

chaand
Chase

RE:Check NIC card present or not form dos

Post by Chase »

It *really* depends on the type of bus you're wanting to scan. If it's PCI then you just do some PCI PNP detection and compare which device you find against a list like the one at http://www.yourvote.com/pci/

-Chase
chaand

RE:Check NIC card present or not form dos

Post by chaand »

hai chase,
i am going through the url you have specified. but where is this details "PCI device listing" stored in computer. can we able to read the details through our own writte c or assembly program

luv
chaand
Chris Giese

RE:Check NIC card present or not form dos

Post by Chris Giese »

Use PCI to scan for any device of base class=2, sub-class=0 (Ethernet). Actually, you could just scan for class=2 to include Token Ring, FDDI, ATM, etc.

By "Use PCI" I mean either:
- INT 1Ah AX=B101h (for 16-bit real-mode code)
- PCIBIOS (for 32-bit pmode code)
- Type 1 direct accesses to the PCI hardware (16-bit or 32-bit code)

If you want to check if a specific Ethernet card is present, scan for
the PCI ID of that card.

It might be possible to do something similar for PnP boards (16-bit ISA) too,
but I'm not sure.

http://my.execpc.com/~geezer/osd/pnp/index.htm
chaand

RE:Check NIC card present or not form dos

Post by chaand »

hai Chris Giese,

i have tried the url you specified.
and i tried the program pnp16.c with the list provided but it is not showing the Network Controller or something related to that.

what i need is to find whether NIC card is present in the system.
and interrupt 1A ax=b101h is not showing network control in it output list

and i have tried the same int 1ah with ax=b102h but it is need to give the vendor id and device id then as return cf set on error and clear on success.
but for that i need to give the specific id of both vendor and device but it may varry system.

so what should i do for getting whether the NIC card is present or not in a PC form pure dos through my own program.

any way thanks for the suggestions

bye

chaand
chaand

RE:Check NIC card present or not form dos

Post by chaand »

dear chris giese,
thanks a lot...
the "pci16.zip" file is listing all the vendor id, device id and no. but again need the device class ie. like network controller etc.

any way thanks a lot once again.

luv,

chaand
Post Reply