Closed Congee closed 6 years ago
I'd like to merge this but I don't have an OSX machine to test it on just yet so I'm going to leave it open for a while til I can confirm.
If anyone else has a macbook they can test this on an report I'd really like to merge it.
Hey Dan, if you're still looking for someone to test this out with a Macbook I can help you out.
That would be great s0lst1c3
I took a look in brona/iproute2mac1
, here you can see, what it does is parse the output (route table) of netstat -nr -f inet
. This is too simple to intoduce a lib. Therefore, you don't need to test this because it's already tested by by the lib.
BTW, scutil --nwi
is easier to parse
CC@~ $ scutil --nwi
Network information (generation 375595192471657)
IPv4 network interface information
en0 : flags 0x5 (IPv4,DNS)
reach 0x00000002 (Reachable)
Signature Hash: <data> 0x33d9150551e2fe0bb7abd9f3707bed81a0d95509
generation 375595192471657
REACH : flags 0x00000002 (Reachable)
IPv6 network interface information
No IPv6 states found
REACH : flags 0x00000007 (Reachable, Transient Connection, Connection Required)
Network interfaces: en0
Thus we don't need to install extra
iproute
wrapper on Mac OSX.