11#include "ns3/core-module.h"
12#include "ns3/inet-socket-address.h"
13#include "ns3/packet-socket-address.h"
14#include "ns3/socket.h"
15#include "ns3/string.h"
17#include "ns3/uinteger.h"
19#include "ns3/qkd-key-manager-system-application.h"
20#include "ns3/qkd-location-register.h"
77 NS_LOG_FUNCTION(
this <<
"Node ID" << node->GetId() <<
"Controller ID" << controller->GetNode()->GetId());
79 node->AddApplication (
appKMS);
86 kms->SetController(controller);
92 NS_LOG_FUNCTION(
this <<
"Node ID" << node->GetId() <<
"Controller ID" << controller->GetNode()->GetId());
94 node->AddApplication (
appKMS);
101 kms->SetController(controller);
337 std::cout <<
"\n\nCRYPTOGRAPHIC APPLICATION PAIR INSTALLED\n"
342 NS_LOG_FUNCTION(
this <<
"\n\nCRYPTOGRAPHIC APPLICATION PAIR INSTALLED\n"
374 node2->AddApplication (
appBob);
417 node2->AddApplication (
appBob);
435 std::cout <<
"ERROR: Unknown application type!";
a polymophic address class
AttributeValue implementation for Address.
holds a vector of ns3::Application pointers.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
The base class for all ns3 applications.
Hold a value for an Attribute.
Class for representing data rates.
AttributeValue implementation for DataRate.
Ipv4 addresses are stored in host order in this class.
static Ipv4Address GetAny()
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Smart pointer class similar to boost::intrusive_ptr.
ApplicationContainer InstallQKDApplication(Ptr< Node > node1, Ptr< Node > node2, Address masterAddress, Address slaveAddress, Ptr< Node > control1, Ptr< Node > control2, std::string connectionType, uint32_t packetSize, DataRate dataRate, std::string applicationType, std::string masterUUID, std::string slaveUUID)
Install a pair of cryptographic applications to consume keys.
ObjectFactory m_factory_postprocessing_app
Object factory.
ObjectFactory m_factory_qkd_app
Object factory.
void InstallKeyManager(Ptr< Node > node, Ipv4Address kmsAddress, uint32_t port, Ptr< QKDControl > controller)
Install key manager.
void SetAttribute(std::string mFactoryName, std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes, not the socket attributes.
void SetSettings(std::string protocol, Ipv4Address master, Ipv4Address slave, uint32_t keyRate)
Install an ns3::QKDAppApplication on each node of the input container configured with all the attribu...
ObjectFactory m_factory_kms_app
Object factory.
ObjectFactory m_factory_lr_app
QKDAppHelper()
Create an QKDAppHelper to make it easier to work with QKD Applications (KMS, Post-processing and othe...
ApplicationContainer InstallPostProcessing(Ptr< Node > node1, Ptr< Node > node2, Address masterAddress, Address slaveAddress, Ptr< Node > control1, Ptr< Node > control2, uint32_t keySize, DataRate keyRate, uint32_t packetSize, DataRate dataRate, std::string masterUUID, std::string slaveUUID)
static uint32_t appCounter
As described in OPENQKD deliverable D6.1(section 5), the QKD control is a network component with the ...
Ptr< Node > GetLocalKMNode() const
uint32_t GetLocalKMNodeId() const
QKDNetSim implements Key Management System(KMS) as an application that listens on TCP port 80.
void SetId(UUID id)
Set key manager ID.
static Ptr< Socket > CreateSocket(Ptr< Node > node, TypeId tid)
This method wraps the creation of sockets that is performed on a given node by a SocketFactory specif...
a unique identifier for an interface.
static TypeId LookupByName(std::string name)
Get a TypeId by name.
static UUID Sequential()
Generate sequential UUID1(time based version)
std::string string() const
Get string from the current UUID in format "00000000-0000-0000-0000-000000000000".
Hold an unsigned integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
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.
static unsigned int value(char c)
static const uint32_t packetSize
Packet size generated at the AP.