15#include "ns3/packet.h"
16#include "ns3/simulator.h"
18#include "ns3/boolean.h"
19#include "ns3/double.h"
20#include "ns3/uinteger.h"
35 .SetGroupName(
"QKDControl")
75 for(
uint32_t i = 0;
i < src->GetNApplications(); ++
i){
111 for(
uint32_t i = 0;
i < n->GetNApplications(); ++
i){
140 std::vector<uint32_t>
143 std::vector<uint32_t>
output;
249 NS_LOG_ERROR(
this <<
"Peer application ID not registered!");
274 NS_LOG_LOGIC(
this <<
"\tDefault configuration selected");
277 NS_LOG_LOGIC(
this <<
"\tCustom buffer configuration selected");
Ipv4 addresses are stored in host order in this class.
A base class which provides memory management and object aggregation.
virtual void DoInitialize()
Initialize() implementation.
virtual void DoDispose()
Destructor implementation.
Smart pointer class similar to boost::intrusive_ptr.
As described in OPENQKD deliverable D6.1(section 5), the QKD control is a network component with the ...
void AssignKeyManager(Ptr< Node > n)
Assign key manager.
Ptr< QBuffer > GetQBufferConf(uint32_t remoteId)
void AddRouteEntry(QKDLocationRegisterEntry entry)
Ipv4Address GetLocalKMAddress() const
void DoInitialize() override
@briefInitialization function
void RegisterQKDModulePair(Ptr< Node > moduleLocal, Ptr< Node > moduleRemote, std::string idLocal, std::string idRemote, Ptr< Node > kmLocal, Ptr< Node > kmRemote)
Register QKD Module / PP application pair.
TypeId GetInstanceTypeId() const override
Get the type ID for the instance.
std::vector< uint32_t > GetRemoteKmNodeIds() const
~QKDControl() override
Destructor.
static TypeId GetTypeId()
Get the type ID.
Ptr< QBuffer > m_rsbuffer_config
Ptr< QBuffer > m_qbuffer_config
Default QKD buffer configuration.
std::vector< std::string > m_local_qkdapps
Vector of all the apps(IDs) connecting to local KM node.
Ptr< QBuffer > GetBufferByDestinationNode(Ptr< Node >, Ptr< Node >)
Return QKDQBuffer for plotting.
std::string GetApplicationId(std::string peerAppId)
Get local application ID based on the remote application ID.
std::vector< Ptr< Node > > m_remote_km_nodes
Remote Key Manager Node(s)(direct QKD connection!)
Ptr< QKDLocationRegister > m_routingTable
Routing Table.
std::map< uint32_t, Ptr< QBuffer > > m_qbuffers_conf
Dedicaded QKD buffer configuration.
Ptr< Node > GetLocalKMNode() const
std::map< std::string, uint32_t > m_remote_qkdapps
All remote apps(IDs) and their KM nodes(must keep nodes to get remote KM address in QKD network)
Ptr< Node > GetNode() const
std::vector< QKDModule > m_qkd_modules
Registered QKD modules.
QKDLocationRegisterEntry GetRoute(std::string remoteAppId)
void SetNode(Ptr< Node >)
Ptr< QKDKeyManagerSystemApplication > GetKeyManagerSystemApplication(Ptr< Node > n) const
Get Key Manager System Application from node.
void DoDispose() override
The dispose method.
void RegisterQKDApplicationPair(std::string localAppId, std::string remoteAppId, Ptr< Node > remoteKmNode)
register a pair of QKD applications
void ConfigureQBuffers(uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurr, uint32_t defaultKeySize)
Configure all buffers(default conf).
uint32_t GetLocalKMNodeId() const
std::string GetLocalKMId() const
Ptr< SBuffer > CreateRSBuffer(uint32_t remoteId)
std::map< std::string, std::string > m_qkdapp_pairs
QKDapp pair(remoteApp, localApp)
void ConfigureRSBuffers(uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurr, uint32_t defaultKeySize)
QKDNetSim implements Key Management System(KMS) as an application that listens on TCP port 80.
Introspection did not find any typical Config paths.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Describes QKD modules at site.