Hi!
I would like to write a routine to find out if the user has an ethernet card in his system.
If the card is present and it's ready for use, I need to fetch the following info.:
- name of the device in Linux (e.g: eth0)
- Hardware manufacturer's name
- Currently assigned IP address
- maybe PCI ID.
Are there any standard functions or a library in C for this purpose? Where should I begin?
P.S: I guess this could be accomplished via programs such as scanpci, lspci, or ifconfig, but these provide a lot of unnecessary details as well. So this something I would like to avoid.
I would appreciate any help!
Thank you in advance!