Accessing NIC configuration via Python

Jürgen Hermann jhe at webde-ag.de
Mon Jul 31 10:54:27 EDT 2000


"Micheal Kelly" <michealk at newlix.com> schrieb im Newsbeitrag
news:8Rfh5.23380$07.914891 at news1.rdc1.on.wave.home.com...
> 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.

SIOCGIFADDR via ioctl() on a socket() (which does not have to be connected).
Was mentioned in several news articles in the last two weeks.

Bye, Jürgen





More information about the Python-list mailing list