short version:
is there a library to parse the output of the unix command:
ip address
If the answer is no, do you know any python networking library that I could use to speed up the development of a parser?
Detailed explanation:
I'm trying to build an open source abstraction layer to retrieve information from network devices with different protocols (SSH, SNMP, HTTP) to be used in wireless community networks, I started from SSH (prototype here) and initially I found a parser for the "ifconfig" command, but the parser does not take into account many cases plus my networking friends told me the "ifconfig" has been deprecated and "iproute2" is the future.
So, before start to develop my own, I ask if anybody knows if there is any open source python parser for the output of the "ip address" unix command. I just need to retrieve a list of interfaces, each interface being a dictionary or an object, with all the details contained in the output of the command (name, type, ip, mac, mtu, ecc).
The only thing I've found is this undocumented and unfinished github repo: https://github.com/nwhalen/python-iproute2
/proc/net- that's where theifconfigoripcommands get most of their information from.netifacesmodule.-ooption (oneline) toipmight give you output that's much easier to parse. Sorry to put all this in comments, but I currently don't have the time to write up a decent answer that's portable, covers most of the cases and is tested.