ark::snmp::SnmpMockAgentFixture

Defined in header “ark/snmp/test/snmp_mock_agent_fixture.hh”.


Lightweight UDP mock SNMP agent used by tests.

This fixture runs a background thread that listens for incoming SNMP requests and emits a minimal response set for known OIDs.

Methods

  • SnmpMockAgentFixture(uint16_t port)
    Constructor. Starts the background mock-agent thread bound to the given port.

  • ~SnmpMockAgentFixture()
    Destructor. Stops the background thread and releases resources.

  • SnmpMockAgentFixture()
    No copies.

  • SnmpMockAgentFixture & operator=()
    No copies.

  • uint16_t port()
    Returns the actual UDP port the fixture bound (useful when constructed with port 0).

  • void rethrow_if_failed()
    Rethrows any exception captured from the background worker thread.