mac osx support

#3 · closed · 6 comments

View on GitHub ↗

kellyjonbrazil

Hi - I'm using `ifconfig-parser` in my `jc` project (https://github.com/kellyjonbrazil/jc) and I was wondering if we could add support for ifconfig on mac OSX. The output currently looks like this: ``` [ { "name": "lo0", "flags": 8049, "state": "UP,LOOPBACK,RUNNING,MULTICAST", "mtu": 16384, "type": null, "mac_addr": null, "ipv4_addr": null, "ipv4_bcast": null, "ipv4_mask": null, "ipv6_addr": null, "ipv6_mask": null, "ipv6_scope": null, "metric": null, "rx_packets": null, "rx_errors": null, "rx_dropped": null, "rx_overruns": null, "rx_frame": null, "tx_packets": null, "tx_errors": null, "tx_dropped": null, "tx_overruns": null, "tx_carrier": null, "tx_collisions": null }, ... { "name": "en0", "flags": 8863, "state": "UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST", "mtu": 1500, "type": null, "mac_addr": null, "ipv4_addr": null, "ipv4_bcast": null, "ipv4_mask": null, "ipv6_addr": null, "ipv6_mask": null, "ipv6_scope": null, "metric": null, "rx_packets": null, "rx_errors": null, "rx_dropped": null, "rx_overruns": null, "rx_frame": null, "tx_packets": null, "tx_errors": null, "tx_dropped": null, "tx_overruns": null, "tx_carrier": null, "tx_collisions": null }, ... ] ```

Comments

KnightWhoSayNi

Hi @kellyjonbrazil, the package already supports Mac OS. Can you share the raw console output, which you pass to [ifconfig-parser ](https://github.com/KnightWhoSayNi/ifconfig-parser) (**remember to obfuscate your ip and mac address**)? I released the new version v0.0.2 with improved parsing. Could you try one more time and share the output? Which version of Mac OS are you using?

kellyjonbrazil

Yep, v0.0.2 is improved on OSX. It looks like we are getting everything except the IPv6 info now. Could we try to get that info in? I have attached some obfuscated sample files from two OSX versions. [ifconfig-osx-10.11.6-2.txt](https://github.com/KnightWhoSayNi/ifconfig-parser/files/3898413/ifconfig-osx-10.11.6-2.txt) [ifconfig-osx-10.11.6.txt](https://github.com/KnightWhoSayNi/ifconfig-parser/files/3898414/ifconfig-osx-10.11.6.txt) [ifconfig-osx-10.14.6-2.txt](https://github.com/KnightWhoSayNi/ifconfig-parser/files/3898415/ifconfig-osx-10.14.6-2.txt) [ifconfig-osx-10.14.6.txt](https://github.com/KnightWhoSayNi/ifconfig-parser/files/3898416/ifconfig-osx-10.14.6.txt)

KnightWhoSayNi

Thank you for sharing your console outputs. Can I add them to the repo?

kellyjonbrazil

Absolutely, no problem. > On Nov 27, 2019, at 5:00 PM, Three Headed Knight <[email protected]> wrote: > >  > Thank you for sharing your console outputs. Can I add them to the repo? > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub, or unsubscribe.

KnightWhoSayNi

I released the new version v0.0.4 with improved IPv6 parsing for Mac OS. Can you try it out and let me know if the issue is resolved?

kellyjonbrazil

Nice - the new version looks good on OSX 10.11.6 and 10.14.6. Thanks!