From nobody Fri Jan 13 21:24:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NtvZG6rb9z2qkdd; Fri, 13 Jan 2023 21:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtvZG6DX1z3yfn; Fri, 13 Jan 2023 21:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwD0hGBqnEi1ioiQtkWQKPVlzSNv30y1TUEhFZpzyNw=; b=m5hgsR62FuAgEOsgc4ovyM3QRH7AH9rZufA9PkIham2chZ+SR6UarZ8ggIhKC4JKcIJf9+ M0zdcNvCBSJk5m903JgRNoEhuta8trTljRNQR5DkcjwFCrlggOkEjr8tPa78X0MR8o8gQl H1ob7j9Pz3SYxPzixNHnPz40AR+GcXlh3jbq7HLjJlSQIVk1C6YqUbMVFBmBm122BYLiL4 62Cz7Lnw6HyE2p2WYgefn01kEq2AU/1aWkOdiyvtq8kW8Xm62695calwDNJZOeLhHycLyP zOB6Gr98MeFLixkdzIwl4EomyqmBaBsO31IJiDUahbHuJ/z/f2QuiwXP5T+pSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673645078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwD0hGBqnEi1ioiQtkWQKPVlzSNv30y1TUEhFZpzyNw=; b=aGHeX28B8EoAM6V3o4wG14gYPE9/id3TP4x3BVTBPc0oSkB/XAbvptj7fwR7LXre7/qzRw dtgO4vtdxGSLWszNW1nmb2KNhHMi2en6sy5+EjkTurtbc6K+2CbB3YvTl4e+hBETJZ6ITx d5ZmmJxMM8ldi5LEnhWLzqF21twDpdmthtvUgu/4PI/9t3Woh9+RTEeCFIQ/OMoVNDVhRw i5Gw1sCoRTmkbAkSiUHcW37xkxYv8A85Of2Hv0QNH1jaOk85Xw+FB5jSizekl1AfrdDDCq yo/ShMTi1d1Gfrkod1b9xJkT8Pr3k2kSKFJkLmoyGiSmp+mZTPf+2Qj99fjBzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673645078; a=rsa-sha256; cv=none; b=Hoc1Lqpb0xAIhbNx5cvNgmkdQDV8AmB0BEur9ya4gMpc/ylBsaPqNuiz/f3wVBjLtKbVKz qYdvyKzBcI8Z7P/MEsQu3mOgi7jhvwQ99KKuKF09KhqnaG35WeGTgH1sreTBqCXwHhE+FN vqgoKED9c/bxvghOjx5UECL3Rbm4gjvFlWqTOKvu1+i3mbSGBdOlorgcw+N5YQ3bcjXANE EjP3+o/mk7K2AaVR52kIoQkcsbFu17uF7coHxkJTDi7R6bp60cuqvh5yetiIAGdzuqbFLG 2wh7rEBYCmCV/MWoYPL1Rsd73Y4odXVQBvdl2X17cKGpcDQpM2ODPU3x0YoLBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NtvZG4znXzNGQ; Fri, 13 Jan 2023 21:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30DLOc9x040292; Fri, 13 Jan 2023 21:24:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30DLOcsA040291; Fri, 13 Jan 2023 21:24:38 GMT (envelope-from git) Date: Fri, 13 Jan 2023 21:24:38 GMT Message-Id: <202301132124.30DLOcsA040291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 9cc645e3e382 - stable/13 - netstat: print path weight when showing routes in structured output. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9cc645e3e3821bf7d2478c6eea955e0c2c471009 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=9cc645e3e3821bf7d2478c6eea955e0c2c471009 commit 9cc645e3e3821bf7d2478c6eea955e0c2c471009 Author: Alexander V. Chernikov AuthorDate: 2022-06-20 08:59:15 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-01-13 21:18:24 +0000 netstat: print path weight when showing routes in structured output. Differential Revision: https://reviews.freebsd.org/D35530 MFC after: 2 weeks (cherry picked from commit c8f34118ac8207660385f99b78e8daa03ec2408f) --- 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);