void sinsp_container_manager::dump_containers(scap_dumper_t* dumper) { for(unordered_map<string, sinsp_container_info>::const_iterator it = m_containers.begin(); it != m_containers.end(); ++it) { if(container_to_sinsp_event(container_to_json(it->second), &m_inspector->m_meta_evt)) { int32_t res = scap_dump(m_inspector->m_h, dumper, m_inspector->m_meta_evt.m_pevt, m_inspector->m_meta_evt.m_cpuid, 0); if(res != SCAP_SUCCESS) { throw sinsp_exception(scap_getlasterr(m_inspector->m_h)); } } } }
void sinsp_dumper::dump(sinsp_evt* evt) { if(m_dumper == NULL) { throw sinsp_exception("dumper not opened yet"); } int32_t res = scap_dump(m_inspector->m_h, m_dumper, evt->m_pevt, evt->m_cpuid); if(res != SCAP_SUCCESS) { throw sinsp_exception(scap_getlasterr(m_inspector->m_h)); } }