From nobody Thu Nov 2 15:11:03 2023 X-Original-To: dev-commits-src-branches@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 4SLnPz53c0z4yb7K; Thu, 2 Nov 2023 15:11:03 +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 4SLnPz4c32z4bY1; Thu, 2 Nov 2023 15:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698937863; 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=3KH4mgxd1lXASEvz8njEbjJaogCixTDppNBkEDj6EQU=; b=DRAh5GTIM6yCEndyX3v/nDBH56DyaIxkTdj8TobJUE4qUoa/osBx8iEInxk9wHoBgCx+Us iD8X5JwAxmIavuu8NiGLbn1v9Muy6N77ljaVKJP90yvdgQ77Qo8xcBEbVyg9iZLK7fzXGU gyDd932jEwOmx6QjuzgVXYw/P7MIRin5jT9AtrwMGd0W/gaGEvN5XtQ4o9TS20PEk7EVC7 OFqWF3o7bmseV/tbG10SYz5i/tBU2m0ZKIrIxKi6v9Ypd5PZtXSVlCjI6JeWTd4D8j107b 4T6r5ngqSiZF2FbR1AvfQMzj7aomkwfAbdQC3fRQM4gsGsFF+K49hsAlN+6McQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698937863; 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=3KH4mgxd1lXASEvz8njEbjJaogCixTDppNBkEDj6EQU=; b=C/JfLshk9SmLgtcxeL/7yX3wlcAn1GWgSY7hW/vI5hp9XwIz94ABX9OJ3B7KptGPdxPZ3/ rEiynQlhG9MPkfiOoj1BepNqwkPJviyTT981/X+0v7NE1XwpH0Ujr18kzzu9oaygBSXCmt oUnwJx9MUMOvOr/+bUnrIbNLAStdktW6SfAf311j+xtHS2XLhmA30Wa8g7WlaVKqV0haj8 U+++QdgjZ5asw88BiAIXwylWNzqurS/zFYUhKutfcoGbr3ioyzXYJ/DhDENYg+I48euuLt nLiSQJzC4FaWxF0la3xI+CZY3RFGyMSn4KZZoiPfJhkdpOl61iSBEMhrOwTGMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698937863; a=rsa-sha256; cv=none; b=c8T0cU0CmAiQbBuLyWT5Xmh62OunY4xEyUEEG5XzkYQeLwbWv6s5FoHmLCUL7dmRNmKsHu /yG0VzFDX7BzB9s7fjtNaXinrpu+6qJrdQFws1wy8vEP9veSW8614fxf1oImaoDtVEVYRj 0Qg6E3HoNMvQfE7Rp5aEdIPU8xk1ANNqbuvuEBlVca6xdfyQ0gbz9wmBqUfpIkei7ZI6Lk 6LwVUUevUoaBoWvNAtCUiA7OwcsOpnXNKuTvO1ZhPn4ZPNJAxvV2r1dmrrsYLtOEMQCMw3 gt2KIbM8klFchSHesDriVUy6Lymw0c+za1dH4wrFCgHCdhefPFbXGLBJ69iwjA== 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 4SLnPz3hrfzZSy; Thu, 2 Nov 2023 15:11:03 +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 3A2FB3Rq086988; Thu, 2 Nov 2023 15:11:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A2FB38f086973; Thu, 2 Nov 2023 15:11:03 GMT (envelope-from git) Date: Thu, 2 Nov 2023 15:11:03 GMT Message-Id: <202311021511.3A2FB38f086973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 71ae1f462bb4 - stable/14 - libpfctl: add missing pfctl_status_lcounter() function List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 71ae1f462bb4c6f730fc558bca0dbe569c48b003 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=71ae1f462bb4c6f730fc558bca0dbe569c48b003 commit 71ae1f462bb4c6f730fc558bca0dbe569c48b003 Author: Kristof Provost AuthorDate: 2023-10-30 18:02:29 +0000 Commit: Kristof Provost CommitDate: 2023-11-02 15:10:00 +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") (cherry picked from commit 1c824f430a395cdc66e22406e72f20ebd300e47e) --- 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 2bdc14e8868a..403dbf809b89 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -272,6 +272,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 2559fc9c4843..7fe035f94cee 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -386,6 +386,7 @@ struct pfctl_syncookies { 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);