Commit c8f34118 authored by Alexander V. Chernikov's avatar Alexander V. Chernikov
Browse files

netstat: print path weight when showing routes in structured output.

Differential Revision: https://reviews.freebsd.org/D35530
MFC after:	2 weeks
parent 8db679af
......@@ -329,6 +329,8 @@ p_rtentry_sysctl(const char *name, struct rt_msghdr *rtm)
snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ",
wid_flags - protrusion);
p_flags(rtm->rtm_flags, buffer);
/* Output path weight as non-visual property */
xo_emit("{e:weight/%u}", rtm->rtm_rmx.rmx_weight);
if (Wflag) {
/* XXX: use=0? */
xo_emit("{t:nhop/%*lu} ", wid_mtu, rtm->rtm_rmx.rmx_nhidx);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment