git: 1c824f430a39 - main - libpfctl: add missing pfctl_status_lcounter() function
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 30 Oct 2023 20:00:41 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=1c824f430a395cdc66e22406e72f20ebd300e47e
commit 1c824f430a395cdc66e22406e72f20ebd300e47e
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-10-30 18:02:29 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
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);