MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / FindDirectionDevice

Method FindDirectionDevice

Src/Core/Profiler.cpp:1429–1437  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1427
1428////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1429FSecure::C3::DeviceId FSecure::C3::Core::Profiler::Relay::FindDirectionDevice(AgentId aid)
1430{
1431 auto& routes = m_Routes.GetUnderlyingContainer();
1432 auto it = std::find_if(routes.begin(), routes.end(), [&](auto& e) {return e.m_Id.GetAgentId() == aid; });
1433 if (it == routes.end())
1434 throw std::logic_error{ "There is no route to provided agent" };
1435
1436 return it->m_OutgoingDevice;
1437}
1438
1439////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1440void FSecure::C3::Core::Profiler::Gateway::Connector::RunCommand(ByteView commandWithArguments)

Callers 1

ReAddRemoteAgentMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetAgentIdMethod · 0.45

Tested by

no test coverage detected