Accessing NIC configuration via Python
Micheal Kelly
michealk at newlix.com
Mon Jul 31 10:14:28 EDT 2000
Hoping someone can help:
Earlier I posted a message asking how to access low-level Linux network
information in Python - Shae Erisson was kind enough to point out gnetstat
(http://www.linuxcare.com.au/projects/gnetstat) to me...
Unfortunately, this wasn't quite what I was after. What I'd really like
to get is low-level NIC configuration information, such as the device
names of all configured ethernet cards (eth0, eth1... ethx), their IP
addresses, netmasks, etc.
I could do this by parsing the output of ifconfig, but for various reasons
don't want to do that. Is there any sort of low-level interface that I
can access via Python to get this information? I've looked through /proc
to see if there was something I could read, but nothing that seems to
contain the information I'm after.
Help! :)
- Mike K.
More information about the Python-list
mailing list