aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2023-10-30 18:02:29 +0000
committerKristof Provost <kp@FreeBSD.org>2023-10-30 18:05:03 +0000
commit1c824f430a395cdc66e22406e72f20ebd300e47e (patch)
treef7a50432e64a25b2ed8296d8a9d6356a2392bece
parent0590ed0967e025e1d155da9e06509f3fe9686feb (diff)
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")
-rw-r--r--lib/libpfctl/libpfctl.c6
-rw-r--r--lib/libpfctl/libpfctl.h1
2 files changed, 7 insertions, 0 deletions
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
@@ -310,6 +310,12 @@ pfctl_status_counter(struct pfctl_status *status, int 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)
{
return (_pfctl_status_counter(&status->fcounters, 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);