From nobody Wed Jun 22 12:48:30 2022 X-Original-To: dev-commits-src-main@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 9CAD885ED5D; Wed, 22 Jun 2022 12:48:30 +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 4LSjqL2bQHz3N8T; Wed, 22 Jun 2022 12:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655902110; 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=JgBQB2RbNKsvC5j2oe7D8HbYu8h/Wcz2nGhD2fEjRXY=; b=YUBDUTQ2hq1OT6mUs4UbbJP4rBeby1VK6YwCPXYuNKohx1QbE50T1fNwMlON9MD6+Em6Vp HhWyPHq5Q9G/nLX2MZvlchgZPzdtRL0hrll4hzxISHy3WJ/gEDEamwaGuv3WZrDcM05yCJ eswiDVLZh+caZm/NQ2nRxJHtS2fYmN6B5OWS9yyFYVyTQyFoUcZn+YhGVWn8PCI1gf2kEM 7thicytIkYzQ841+XSMb1ouubgEtWmYbjeXqsNekReN4ZTzLT3aUxI84Cj7f9Bnlij+VPK qnavfYVP4/bE9eGkqXCwQFS71RK0rP0eT6QvSmGuGk0be3eYo56mX+y2RmTblQ== 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 39945266BF; Wed, 22 Jun 2022 12:48:30 +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 25MCmU9g006738; Wed, 22 Jun 2022 12:48:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25MCmUQ2006737; Wed, 22 Jun 2022 12:48:30 GMT (envelope-from git) Date: Wed, 22 Jun 2022 12:48:30 GMT Message-Id: <202206221248.25MCmUQ2006737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: c8f34118ac82 - main - netstat: print path weight when showing routes in structured output. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: c8f34118ac8207660385f99b78e8daa03ec2408f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655902110; 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=JgBQB2RbNKsvC5j2oe7D8HbYu8h/Wcz2nGhD2fEjRXY=; b=S53YZFjGHUKcMc+1FYjL4MulpNSRUNPVl9/0Aqc/C8uiNd5XsA3A/zj9X+023eGZ9pFbDl 6YJ1se/vU/81AyaD3nPDsTSccwJnFPX5FbiJ5RZFDJKk/eDGjbNlA/UPQKrJuJ4pgyH2iN f8UID1byhAtu9n+auIH01QPkk6h4+WP8N7GTYFXL5HXzjy0nJsreqeklSkKaxGQlRZ1vqO mFtg9ognJsWDCPGck1lQA46zY+axyw4NXqy+KHGtREqSDDSjN+YHZl1kjh+jjQhYNeb4Kd Ed8IkEmZc10eTtNE86iAAT7uZ36ROCOPFjZZPBXypPOmOMJ2DAVcdl5UgAKZdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655902110; a=rsa-sha256; cv=none; b=wAgbwNUqMuoZERAVXcmdEtV46dnNlo5fPCqjdzSNuifElt5TOsDpGH2yiADNMoZORe5QW7 BbNCzv0d7XmfaafolPRWpYirMUlVZMTrurbjnRC94lZLTLkff4k2G8FYojMJVrxzMojloa qR10Rkg6OnsFbDhReG8KYvyZClZ0OU+o999Nl+fnuRc8fJWlAYjUQJKcGaJkmhPt+odark nRLuUrfrvaIPh2ap5raF02OyAYj9UpkSxwetsSaxp8lo4tb2CtDv1iJK170UGJa58Xqhyg tVL2rGQz/g2cv+iDUMCumB3cBR2syDJU3CrWGPrb8Kb/4D5zV+Qzi8bu67qcrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=c8f34118ac8207660385f99b78e8daa03ec2408f commit c8f34118ac8207660385f99b78e8daa03ec2408f Author: Alexander V. Chernikov AuthorDate: 2022-06-20 08:59:15 +0000 Commit: Alexander V. Chernikov 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);