From nobody Mon Oct 30 20:00:41 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 4SK3zZ0wF8z4yM54; Mon, 30 Oct 2023 20:00:42 +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 4SK3zZ0PFlz4DNj; Mon, 30 Oct 2023 20:00:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698696042; 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=mv9CNe/2wTOHlsTq7MfzZEF/6P+RdK4C6EwoKDcB+eE=; b=QbTjWirKDLXHKYSohNBamBUN1PF2tr7ICCZGJuSzn7qy/Wgrt70Vg/VCIeUL9thgHZNo4m 22zWWoeU3BNjtnxZmQ24NLL5MTGej5tOPh3SIUkBL8BxPc3qBqDnIAm3ybIJ9Il8D2lEYk xLkDw1FiNWHbP9wY5BUL6kt5NDnnqHfx7LiyyUGolrXNQyX3c45iPAUoWcwEkRuR4EVb51 v7jhtGBkL73gAspy3npZusoql5JDQ8RyfW+KzxMxT1eNOzmDvHsZO/q1zY8wAMaDVJJDve COqjEmodo2mjh3Yh+Fhdhue1/TlG1rfGS3tCVtudUjrzqQEdiX21+B4tNtplcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698696042; 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=mv9CNe/2wTOHlsTq7MfzZEF/6P+RdK4C6EwoKDcB+eE=; b=eO91s4tIEWixULp11g9ltZ7oB5/nUPKYYzB0qFUbfbFj75hBa1+SBBs41uP5r8NiWmqaaf CYf3kOeBoDQwQ+8aPQtygIHy+jL7WCyIFyXiH+io1brncwBqiL8GYt35PNhaJSKiWepIwP ZY7+EWIQRnszyyhXRtJgnKxQgLzED1eQqhMbD+R5y8owBVE2pBoEA6BsUmT+BumpoTykKC 6fHIG+/HX8g0VImndb18kj2VtlnK8XtGp/EDjTrR1GALbYiqmh7AC6RZY/qHc5bKkm94Hz s0CvOu6ZQ2qWfB44pWb7oyuLc4Y8hQdq7NXcDDzmRUqpv/lvD/5cK5PT0NF7EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698696042; a=rsa-sha256; cv=none; b=iTmPdOAE8IwgWMl4ilP4hbRdgVvrrNdaiXoRqdfJkgj71LknwDMboGum5cQd4OJe4t9844 9IJf6SVCSRMsqyrDTbE0kQZNA7BZyM4Vixh9zpqZONIs/iTEoD6okHMtcRAeyoBm6P3uoZ KdumqmPx5L4JmAcCwijkXVOQYsEtluWnaKczNIGKvyA5z8j9T6bQz7FIvuBDsMmk30ga0t EFy0UZbjNGbCHFk1MexT3Qqw29q0j85uA99BAtQOJ75UB2H+UauzPiTfnK/6BXRfV0pJv5 Xz5toFDle8uo4DV5zzpGXW7uh9+gIjVsLYRz1cXbUSuXcbe5kOJxgLnbiAzsUw== 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 4SK3zY6YfpzZmX; Mon, 30 Oct 2023 20:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39UK0f40038514; Mon, 30 Oct 2023 20:00:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39UK0fYA038511; Mon, 30 Oct 2023 20:00:41 GMT (envelope-from git) Date: Mon, 30 Oct 2023 20:00:41 GMT Message-Id: <202310302000.39UK0fYA038511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1c824f430a39 - main - libpfctl: add missing pfctl_status_lcounter() function 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c824f430a395cdc66e22406e72f20ebd300e47e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1c824f430a395cdc66e22406e72f20ebd300e47e commit 1c824f430a395cdc66e22406e72f20ebd300e47e Author: Kristof Provost AuthorDate: 2023-10-30 18:02:29 +0000 Commit: Kristof Provost CommitDate: 2023-10-30 18:05:03 +0000 libpfctl: add missing pfctl_status_lcounter() function We already had accessors for the other types of counters, but not this one. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 6 ++++++ lib/libpfctl/libpfctl.h | 1 + 2 files changed, 7 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 335aeb8e2c8c..1c8873dd6429 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -309,6 +309,12 @@ pfctl_status_counter(struct pfctl_status *status, int id) return (_pfctl_status_counter(&status->counters, id)); } +uint64_t +pfctl_status_lcounter(struct pfctl_status *status, int id) +{ + return (_pfctl_status_counter(&status->lcounters, id)); +} + uint64_t pfctl_status_fcounter(struct pfctl_status *status, int id) { diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index 0b50cc054060..5e304ac56dd8 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -388,6 +388,7 @@ struct pfctl_syncookies { int pfctl_startstop(int start); struct pfctl_status* pfctl_get_status(int dev); uint64_t pfctl_status_counter(struct pfctl_status *status, int id); +uint64_t pfctl_status_lcounter(struct pfctl_status *status, int id); uint64_t pfctl_status_fcounter(struct pfctl_status *status, int id); uint64_t pfctl_status_scounter(struct pfctl_status *status, int id); void pfctl_free_status(struct pfctl_status *status);