Hi, I am looking for a way to do these two: 1. Finding out how many eths the system have (eth0, eth1 ... ethn) 2. Knowing the string of each eth as shown in lspci
I'm trying to write an app that will output something like: # ./geteths You have 2 ethernet cards, eth0: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ eth1: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ Thought about counting the number of times the string 'Ethernet controller' appears in lspci, that should give me the number of eths, shouldn't it? But how will I know the correct string for each eth? is the eth numbering is as their order on the bus so that the first occurrence of 'Ethernet controller' will hold the string for eth0, the second one for eth1 etc? I need this for the internet tool (http://iwiz.linux-kinneret.org), I want to be able to present to the user this information so he would know which interface his modem is connected to more easily, in case he have more then one ethernet card. Thanks. -- Regards, Itay 'z9u2K' Duvdevani, GNU/Linux Kinneret. Public GPG Key: ftp://ftp.berlios.de/pub/kinneret/z9u2k.asc ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
