git: 71ae1f462bb4 - stable/14 - libpfctl: add missing pfctl_status_lcounter() function
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Nov 2023 15:11:03 UTC
The branch stable/14 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=71ae1f462bb4c6f730fc558bca0dbe569c48b003
commit 71ae1f462bb4c6f730fc558bca0dbe569c48b003
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-10-30 18:02:29 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
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);