diff --git a/userspace/libsinsp/event.h b/userspace/libsinsp/event.h index 4bd59a8634..b3d5069208 100644 --- a/userspace/libsinsp/event.h +++ b/userspace/libsinsp/event.h @@ -532,6 +532,17 @@ class SINSP_PUBLIC sinsp_evt : public gen_event m_info = ppm_event; m_errorcode = errorcode; } + + static std::unique_ptr from_scap_evt( + std::unique_ptr> scap_event) + { + auto ret = std::make_unique(); + auto evdata = scap_event.release(); + ret->init(evdata, 0); + ret->m_pevt_storage = (char*)evdata; + return ret; + } + inline void load_params() { uint32_t j;