git: c8f34118ac82 - main - netstat: print path weight when showing routes in structured output.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Jun 2022 12:48:30 UTC
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=c8f34118ac8207660385f99b78e8daa03ec2408f commit c8f34118ac8207660385f99b78e8daa03ec2408f Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2022-06-20 08:59:15 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2022-06-22 12:47:06 +0000 netstat: print path weight when showing routes in structured output. Differential Revision: https://reviews.freebsd.org/D35530 MFC after: 2 weeks --- usr.bin/netstat/route.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 317e3ffb9607..c2a68cae87e8 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -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);