Date: Wed, 22 Jun 2022 12:48:30 GMT From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c8f34118ac82 - main - netstat: print path weight when showing routes in structured output. Message-ID: <202206221248.25MCmUQ2006737@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206221248.25MCmUQ2006737>