mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 07:30:30 +00:00
firewall-util: introduce fw_ctx_get_reply_callback_count()
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "firewall-util.h"
|
||||
#include "firewall-util-private.h"
|
||||
#include "log.h"
|
||||
#include "netlink-util.h"
|
||||
#include "string-table.h"
|
||||
|
||||
static const char * const firewall_backend_table[_FW_BACKEND_MAX] = {
|
||||
@@ -90,6 +91,13 @@ FirewallContext *fw_ctx_free(FirewallContext *ctx) {
|
||||
return mfree(ctx);
|
||||
}
|
||||
|
||||
size_t fw_ctx_get_reply_callback_count(FirewallContext *ctx) {
|
||||
if (!ctx || !ctx->nfnl)
|
||||
return 0;
|
||||
|
||||
return netlink_get_reply_callback_count(ctx->nfnl);
|
||||
}
|
||||
|
||||
int fw_add_masquerade(
|
||||
FirewallContext **ctx,
|
||||
bool add,
|
||||
|
||||
@@ -15,6 +15,8 @@ FirewallContext *fw_ctx_free(FirewallContext *ctx);
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(FirewallContext *, fw_ctx_free);
|
||||
|
||||
size_t fw_ctx_get_reply_callback_count(FirewallContext *ctx);
|
||||
|
||||
int fw_add_masquerade(
|
||||
FirewallContext **ctx,
|
||||
bool add,
|
||||
|
||||
Reference in New Issue
Block a user