NFQueue.hpp

1. Overview

NFQUEUE interface. Declares packet metadata, allow/drop verdicts, callback decisions and queue lifecycle management.

The original source path is:

include/bsc/netfilter/NFQueue.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::netfilter

4. Dependencies and Included Interfaces

  • bsc/model/Connection.hpp
  • atomic
  • cstdint
  • functional
  • memory
  • optional
  • string

5. Declared Types

  • enum class Verdict
  • struct PacketInfo
  • struct Decision
  • class NFQueue
  • class Impl

6. State and Data Members

The interface declares the following relevant state members:

  • bsc::model::Connection connection
  • class Impl
  • std::unique_ptr<Impl> impl_

7. API and Functions

The file declares or implements the following callable entry points:

  • bool open(std::uint16_t queue_id, Handler handler)
  • void close()
  • bool available()
  • NFQueue()

8. External Resources and Protocol Values

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

  • bsc/model/Connection.hpp

9. Concurrency and Lifecycle

  • Uses atomic flags for lifecycle or activity state.

10. Implementation Considerations

  • Atomic flags are used for low-cost lifecycle or activity state coordination.

11. Source Metrics

MetricValue
File size1115 bytes
Lines54
Detected API entries4
Detected types5