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

Method InitializeRoute

Src/Core/NodeRelay.cpp:171–181  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

169
170////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
171void FSecure::C3::Core::NodeRelay::InitializeRoute()
172{
173 // Sanity check.
174 auto grc = GetGatewayReturnChannel();
175 if (!grc)
176 throw std::runtime_error{ OBF("No GRC.") };
177
178 // And post it to Neighbor through GRC.
179 auto query = ProceduresN2N::InitializeRouteQuery::Create(RouteId{ GetAgentId(), grc->GetDid() }, GetBuildId(), m_GatewayEncryptionKey, m_MyEncryptionKey, grc->GetTypeNameHash(), FSecure::Utils::TimeSinceEpoch(), FSecure::Utils::TimeSinceEpoch());
180 LockAndSendPacket(query->ComposeQueryPacket(), grc);
181}
182
183////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
184void FSecure::C3::Core::NodeRelay::NegotiateChannel(std::shared_ptr<DeviceBridge> const& device)

Callers 1

CreateAndRunMethod · 0.80

Calls 4

TimeSinceEpochFunction · 0.85
GetDidMethod · 0.80
GetTypeNameHashMethod · 0.80
ComposeQueryPacketMethod · 0.45

Tested by

no test coverage detected