Firewall.hpp

1. Overview

Firewall controller interface. Declares firewall configuration reload and lifecycle management for the nftables NFQUEUE interception rule.

The original source path is:

include/bsc/fw/Firewall.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::fw

4. Dependencies and Included Interfaces

  • cstdint
  • string

5. Declared Types

  • class Firewall

6. State and Data Members

The interface declares the following relevant state members:

  • std::string backend_

7. API and Functions

The file declares or implements the following callable entry points:

  • bool reload(const std::string& config_path) const
  • bool install_nfqueue_rule(std::uint16_t queue_num, bool queue_bypass = true) const
  • void remove_nfqueue_rule() const

8. External Resources and Protocol Values

Relevant paths, endpoints, command names or policy values referenced by this file include:

  • nftables

9. Security Considerations

  • The component processes privileged operating-system or network data and should run with only the capabilities required by its backend.

10. Implementation Considerations

  • The file follows the daemon-wide convention of returning status values or optional objects instead of making recoverable conditions fatal.

11. Source Metrics

MetricValue
File size933 bytes
Lines27
Detected API entries3
Detected types1