Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2023 15:11:04 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 64ad7cdbbd0d - stable/13 - libpfctl: add missing pfctl_status_lcounter() function
Message-ID:  <202311021511.3A2FB4dT088197@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=64ad7cdbbd0dbfb2fd245cb8727e81a49c4e058a

commit 64ad7cdbbd0dbfb2fd245cb8727e81a49c4e058a
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-10-30 18:02:29 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-11-02 08:48:38 +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 e0fc90960d7c..2a77aeb0efad 100644
--- a/lib/libpfctl/libpfctl.c
+++ b/lib/libpfctl/libpfctl.c
@@ -271,6 +271,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 e500bbf0bddf..c32cee523d05 100644
--- a/lib/libpfctl/libpfctl.h
+++ b/lib/libpfctl/libpfctl.h
@@ -291,6 +291,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311021511.3A2FB4dT088197>