diff --git a/src/detection/swap/swap_bsd.c b/src/detection/swap/swap_bsd.c index 8af98a16f..8e8089600 100644 --- a/src/detection/swap/swap_bsd.c +++ b/src/detection/swap/swap_bsd.c @@ -1,6 +1,8 @@ #include "swap.h" +#include "common/sysctl.h" void ffDetectSwapImpl(FFMemoryStorage* swap) { - ffStrbufAppendS(&swap->error, "Not implemented"); + swap->bytesTotal = (uint64_t)ffSysctlGetInt64("vm.swap_total", 0); + swap->bytesUsed = (uint64_t)ffSysctlGetInt64("vm.swap_reserved", 0); }