Description: |
Appears that the ifconfig output has been changed (a while ago) and nettool::dump cannot parse it anymore.
An example of an old version:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:11582962 errors:0 dropped:0 overruns:0 frame:0
TX packets:11582962 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:208725263600 (194.3 GiB) TX bytes:208725263600 (194.3 GiB)
And a new one:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 11577619 bytes 208724261162 (194.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 11577619 bytes 208724261162 (194.3 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also, it should be mentioned that (at least for Debian) there's an idea to drop
net-tools (from which ifconfig and arp are) eventually.
So I would suggest to replace ifconfig by 'ip address show' and arp by simply parsing /proc/net/arp. I don't know what happens on Macosx, so I came with a patch for Linux only.
|