mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
netstat: print path weight when showing routes in structured output.
Differential Revision: https://reviews.freebsd.org/D35530 MFC after: 2 weeks
This commit is contained in:
parent
8db679af66
commit
c8f34118ac
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue