1. Overview
Network connection model. Declares the normalized connection record shared by packet interception, socket discovery, process inspection, rules, statistics and the UI protocol.
The original source path is:
include/bsc/model/Connection.hpp
2. Role in the Daemon
This file participates in the privileged BastionGuard Secure Connection daemon. It uses the shared bsc models and follows the daemon-wide fallback strategy: optional high-fidelity backends are used when available, while portable polling or stub behavior preserves service startup.
3. Namespaces
bsc::model
4. Dependencies and Included Interfaces
bsc/model/ProcessInfo.hppchronocstdintstring
5. Declared Types
struct Connection
6. State and Data Members
The interface declares the following relevant state members:
std::string protocolstd::string src_ipstd::string dst_ipstd::string dst_hoststd::string process_pathstd::string process_commstd::string process_cwdstd::vector<std::string> process_argsstd::map<std::string, std::string> process_envstd::map<std::string, std::string> process_checksumsstd::vector<std::pair<std::string, std::uint32_t>> process_tree
7. Connection Data
The model carries protocol, source and destination addresses/ports, resolved hostname, process PID/UID/GID, executable and command metadata, checksums, ancestry and timestamps. It is the canonical object passed to the rule engine and serialized to the UI.
8. External Resources and Protocol Values
Relevant paths, endpoints, command names or policy values referenced by this file include:
bsc/model/ProcessInfo.hpp
9. Security Considerations
- The component processes privileged operating-system or network data and should run with only the capabilities required by its backend.
- Process environment data may contain credentials and should not be exposed unnecessarily.
10. Implementation Considerations
- Linux /proc data can disappear between reads because processes and sockets are inherently short-lived.
11. Source Metrics
| Metric | Value |
|---|---|
| File size | 992 bytes |
| Lines | 30 |
| Detected API entries | 0 |
| Detected types | 1 |
