#pragma once #include "bsc/model/ProcessInfo.hpp" #include #include #include namespace bsc::model { struct Connection { std::string protocol; std::string src_ip; std::uint32_t src_port{0}; std::string dst_ip; std::string dst_host; std::uint32_t dst_port{0}; std::uint32_t user_id{0xffffffffu}; // 0 e' un UID valido (root), usiamo -1 come "non impostato" std::uint32_t process_id{0}; std::string process_path; std::string process_comm; // nome kernel (/proc//comm) - sorgente primaria del nome std::string process_cwd; std::vector process_args; std::map process_env; std::map process_checksums; std::vector> process_tree; std::chrono::system_clock::time_point seen_at{std::chrono::system_clock::now()}; [[nodiscard]] std::string key() const; }; } // namespace bsc::model