Closed Julian5555 closed 1 year ago
Nice! One of the reasons I hadn't implemented a parser for ip route
is because it looks like the newer versions support JSON output for that command. Have you been able to try that out or are you using an older version?
I hadn't tried that out because the feature I added was intended to aid me in dealing with older files/systems so I don't have access to the newer JSON output.
Sounds good. You can contribute it with a Pull Request from the dev
branch if you'd like. Then I'll review it an merge it in. Thanks!
Hey, I noticed that the find, proc/net/tcp, and iproute parsers were all marked as ready to ship but hadn't been merged yet. I was just wondering if there was anything on our end that we needed to do before they could be merged?
Nope, all good. I may be able to get a new release out this weekend. I usually batch up a few updates into a release.
Added in v1.23.4
I built a parser for the Ip route command in Linux. Headers were gathered from the Ip route man pages. The schema I'm using is as follows:
`[ {
` So, if the input file looked like this:
default via 10.0.2.2 dev enp0s3 proto dhcp metric 100
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100
169.254.0.0/16 dev enp0s3 scope link metric 1000
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
The parser would output: [ {
}, {
}, {
}, {
} ]
The status header was used to indicate the "linkdown" status and can be changed if needed.