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

Method SendNewDeviceNotification

Src/Core/NodeRelay.cpp:353–361  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

351
352////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
353void FSecure::C3::Core::NodeRelay::SendNewDeviceNotification(std::shared_ptr<FSecure::C3::Core::DeviceBridge> const& device)
354{
355 auto grc = GetGatewayReturnChannel();
356 if (!grc)
357 throw std::runtime_error(OBF("Failed to lock gateway return channel"));
358
359 auto response = ProceduresS2G::AddDeviceResponse::Create(RouteId(m_AgentId, grc->GetDid()), FSecure::Utils::TimeSinceEpoch(), device->GetDid(), device->GetTypeNameHash(), device->IsChannel(), device->IsNegotiationChannel(), m_GatewayEncryptionKey);
360 LockAndSendPacket(response->ComposeQueryPacket(), grc);
361}
362
363////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
364void FSecure::C3::Core::NodeRelay::SendNewNegotiatedChannelNotification(DeviceId newDeviceId, DeviceId negotiatorId, ByteView inId, ByteView outId)

Callers

nothing calls this directly

Calls 7

RouteIdClass · 0.85
TimeSinceEpochFunction · 0.85
GetDidMethod · 0.80
GetTypeNameHashMethod · 0.80
IsNegotiationChannelMethod · 0.80
IsChannelMethod · 0.45
ComposeQueryPacketMethod · 0.45

Tested by

no test coverage detected