A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::QKDAppHelper Class Reference

A helper to make it easier to instantiate an ns3::QKDAppApplication on a set of nodes. More...

#include "qkd-app-helper.h"

+ Collaboration diagram for ns3::QKDAppHelper:

Public Member Functions

 QKDAppHelper ()
 Create an QKDAppHelper to make it easier to work with QKD Applications (KMS, Post-processing and other)
 
 QKDAppHelper (std::string protocol, Address address)
 
 QKDAppHelper (std::string protocol, Ipv4Address addressSrc, Ipv4Address addressDst, uint32_t keyRate)
 
void InstallKeyManager (Ptr< Node > node, Ipv4Address kmsAddress, uint32_t port, Ptr< QKDControl > controller)
 Install key manager.
 
void InstallKeyManager (Ptr< Node > node, Ipv4Address kmsAddress, uint32_t port, Ptr< QKDControl > controller, Ptr< QCenController > cenController)
 
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)
 
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)
 
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)
 Install a pair of cryptographic applications to consume keys.
 
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.
 
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 attributes set with SetAttribute.
 

Private Member Functions

ApplicationContainer InstallPriv (Ptr< NetDevice > net1, Ptr< NetDevice > net2) const
 Install an ns3::QKDAppApplication on the node configured with all the attributes set with SetAttribute.
 

Private Attributes

ObjectFactory m_factory_kms_app
 Object factory.
 
ObjectFactory m_factory_lr_app
 
ObjectFactory m_factory_postprocessing_app
 Object factory.
 
ObjectFactory m_factory_qkd_app
 Object factory.
 
std::string m_protocol
 

Static Private Attributes

static uint32_t appCounter = 0
 

Detailed Description

A helper to make it easier to instantiate an ns3::QKDAppApplication on a set of nodes.

Definition at line 37 of file qkd-app-helper.h.

Constructor & Destructor Documentation

◆ QKDAppHelper() [1/3]

ns3::QKDAppHelper::QKDAppHelper ( )

Create an QKDAppHelper to make it easier to work with QKD Applications (KMS, Post-processing and other)

Parameters
protocolthe name of the protocol to use to send traffic by the applications. This string identifies the socket factory type used to create sockets for the applications. A typical value would be ns3::UdpSocketFactory.
addressthe address of the remote node to send traffic to.

Definition at line 28 of file qkd-app-helper.cc.

References ns3::Create(), ns3::Ipv4Address::GetAny(), m_factory_kms_app, m_factory_lr_app, m_factory_postprocessing_app, m_factory_qkd_app, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ QKDAppHelper() [2/3]

ns3::QKDAppHelper::QKDAppHelper ( std::string  protocol,
Address  address 
)

◆ QKDAppHelper() [3/3]

ns3::QKDAppHelper::QKDAppHelper ( std::string  protocol,
Ipv4Address  addressSrc,
Ipv4Address  addressDst,
uint32_t  keyRate 
)

Definition at line 38 of file qkd-app-helper.cc.

References ns3::Create(), and SetSettings().

+ Here is the call graph for this function:

Member Function Documentation

◆ InstallKeyManager() [1/2]

void ns3::QKDAppHelper::InstallKeyManager ( Ptr< Node node,
Ipv4Address  kmsAddress,
uint32_t  port,
Ptr< QKDControl controller 
)

Install key manager.

Parameters
nodenode to install KM
kmsAddressKM Ipv4 address
portlistening port
controllercompetent controller's node

Definition at line 75 of file qkd-app-helper.cc.

References ns3::ObjectFactory::Create(), ns3::Create(), m_factory_kms_app, NS_LOG_FUNCTION, port, ns3::UUID::Sequential(), ns3::QKDKeyManagerSystemApplication::SetId(), and ns3::UUID::string().

+ Here is the call graph for this function:

◆ InstallKeyManager() [2/2]

void ns3::QKDAppHelper::InstallKeyManager ( Ptr< Node node,
Ipv4Address  kmsAddress,
uint32_t  port,
Ptr< QKDControl controller,
Ptr< QCenController cenController 
)

◆ InstallPostProcessing() [1/2]

ApplicationContainer ns3::QKDAppHelper::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 
)

Definition at line 106 of file qkd-app-helper.cc.

References ns3::Create(), InstallPostProcessing(), and packetSize.

+ Here is the call graph for this function:

◆ InstallPostProcessing() [2/2]

ApplicationContainer ns3::QKDAppHelper::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 
)

UDP Protocol is used for sifting (implementation detail)

Obtain KM addresses from the QKDN Controller!

Definition at line 136 of file qkd-app-helper.cc.

References ns3::ApplicationContainer::Add(), ns3::ObjectFactory::Create(), ns3::Create(), ns3::Socket::CreateSocket(), ns3::QKDControl::GetLocalKMNode(), ns3::Object::GetObject(), ns3::TypeId::LookupByName(), m_factory_postprocessing_app, NS_LOG_FUNCTION, packetSize, ns3::UUID::Sequential(), ns3::ObjectFactory::Set(), and ns3::UUID::string().

Referenced by InstallPostProcessing().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InstallPriv()

ApplicationContainer ns3::QKDAppHelper::InstallPriv ( Ptr< NetDevice net1,
Ptr< NetDevice net2 
) const
private

Install an ns3::QKDAppApplication on the node configured with all the attributes set with SetAttribute.

Parameters
nodeThe node on which an QKDAppApplication will be installed.
Returns
Ptr to the application installed.

◆ InstallQKDApplication() [1/2]

ApplicationContainer ns3::QKDAppHelper::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 
)

Install a pair of cryptographic applications to consume keys.

Parameters
node1master application node
node2slave application node
masterAddressmaster application address
slaveAddressslave application address
control1QKDN controller node at site of master application
control2QKDN controller node at site of slave application
connectionTypeconnection type
packetSizethe size of data packets
dataRatedata rate
applicationTypethe type of the application (etsi014 or etsi004)
Returns
Container of Ptr to the applications installed

Definition at line 272 of file qkd-app-helper.cc.

References ns3::Create(), InstallQKDApplication(), and packetSize.

+ Here is the call graph for this function:

◆ InstallQKDApplication() [2/2]

ApplicationContainer ns3::QKDAppHelper::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.

Parameters
node1master application node
node2slave application node
masterAddressmaster application address
slaveAddressslave application address
control1QKDN controller node at site of master application
control2QKDN controller node at site of slave application
connectionTypeconnection type
packetSizethe size of data packets
dataRatedata rate
applicationTypethe type of the application (etsi014 or etsi004)
Returns
Container of Ptr to the applications installed

Obtain KM addresses from the QKDN Controller!

Create unique identifiers

Definition at line 303 of file qkd-app-helper.cc.

References ns3::Create(), ns3::QKDControl::GetLocalKMNode(), ns3::QKDControl::GetLocalKMNodeId(), ns3::Object::GetObject(), NS_LOG_FUNCTION, packetSize, ns3::UUID::Sequential(), and ns3::UUID::string().

Referenced by InstallQKDApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAttribute()

void ns3::QKDAppHelper::SetAttribute ( std::string  mFactoryName,
std::string  name,
const AttributeValue value 
)

Helper function used to set the underlying application attributes, not the socket attributes.

Parameters
namethe name of the application attribute to set
valuethe value of the application attribute to set

Definition at line 63 of file qkd-app-helper.cc.

References ns3::Create(), m_factory_kms_app, m_factory_postprocessing_app, m_factory_qkd_app, ns3::ObjectFactory::Set(), and ns3::value().

+ Here is the call graph for this function:

◆ SetSettings()

void ns3::QKDAppHelper::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 attributes set with SetAttribute.

Parameters
cNodeContainer of the set of nodes on which an QKDAppApplication will be installed.
Returns
Container of Ptr to the applications installed.

Definition at line 44 of file qkd-app-helper.cc.

References ns3::Create(), ns3::Ipv4Address::GetAny(), m_factory_kms_app, m_protocol, port, and ns3::ObjectFactory::SetTypeId().

Referenced by QKDAppHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ appCounter

uint32_t ns3::QKDAppHelper::appCounter = 0
staticprivate

Definition at line 186 of file qkd-app-helper.h.

◆ m_factory_kms_app

ObjectFactory ns3::QKDAppHelper::m_factory_kms_app
private

◆ m_factory_lr_app

ObjectFactory ns3::QKDAppHelper::m_factory_lr_app
private

Definition at line 182 of file qkd-app-helper.h.

Referenced by QKDAppHelper().

◆ m_factory_postprocessing_app

ObjectFactory ns3::QKDAppHelper::m_factory_postprocessing_app
private

Object factory.

Definition at line 181 of file qkd-app-helper.h.

Referenced by QKDAppHelper(), InstallPostProcessing(), and SetAttribute().

◆ m_factory_qkd_app

ObjectFactory ns3::QKDAppHelper::m_factory_qkd_app
private

Object factory.

Definition at line 180 of file qkd-app-helper.h.

Referenced by QKDAppHelper(), and SetAttribute().

◆ m_protocol

std::string ns3::QKDAppHelper::m_protocol
private

Definition at line 184 of file qkd-app-helper.h.

Referenced by SetSettings().


The documentation for this class was generated from the following files: