A Discrete-Event Network Simulator
API
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) More...
 
 QKDAppHelper (std::string protocol, Address address)
 Constructor. More...
 
 QKDAppHelper (std::string protocol, Ipv4Address addressSrc, Ipv4Address addressDst, uint32_t keyRate)
 Constructor. More...
 
void ConnectKMSToSDN (Ptr< Node > kmsNode, Ipv4Address sdnAddress, uint32_t port)
 
Ptr< QKDKeyManagerSystemApplicationInstallKMS (Ptr< Node > node, Ipv4Address kmsAddress) const
 Install an ns3::QKDKeyManagmentSystem on the node configured with all the attributes set with SetAttribute. More...
 
Ptr< QKDKeyManagerSystemApplicationInstallKMS (Ptr< Node > node, Ipv4Address kmsAddress, uint32_t port) const
 Install an ns3::QKDKeyManagmentSystem on the node configured with all the attributes set with SetAttribute. More...
 
ApplicationContainer InstallPostProcessing (Ptr< Node > node1, Ptr< Node > node2, Address masterAddress, Address slaveAddress, Address masterKMSAddress, Address slaveKMSAddress, uint32_t keySizeInBits, DataRate keyRate, uint32_t packetSize, DataRate dataRate)
 Install an ns3::QKDPostprocessingApplication on the node configured with all the attributes set with SetAttribute. More...
 
ApplicationContainer InstallQKDApp (Ptr< Node > node) const
 Install an ns3::QKDApp on the node configured with all the attributes set with SetAttribute. More...
 
void InstallSDN (Ptr< Node > node, Ipv4Address sdnAddress) const
 Install an ns3::QKDKeyManagmentSystem on the node configured with all the attributes set with SetAttribute. More...
 
void InstallSDN (Ptr< Node > node, Ipv4Address sdnAddress, uint32_t port) const
 Install an ns3::QKDKeyManagmentSystem on the node configured with all the attributes set with SetAttribute. More...
 
void SetAttribute (std::string mFactoryName, std::string name, const AttributeValue &value)
 Helper function used to set the underlying application attributes, not the socket attributes. More...
 
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. More...
 

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. More...
 

Private Attributes

ObjectFactory m_factory_kms_app
 Object factory. More...
 
ObjectFactory m_factory_lr_app
 
ObjectFactory m_factory_postprocessing_app
 Object factory. More...
 
ObjectFactory m_factory_qkd_app
 Object factory. More...
 
ObjectFactory m_factory_sdn_app
 Object factory. More...
 
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 42 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.

Constructor.

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

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

+ Here is the call graph for this function:

◆ QKDAppHelper() [2/3]

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

Constructor.

Parameters
protocolThe transport layer protocol.
addressThe application address.

◆ QKDAppHelper() [3/3]

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

Constructor.

Parameters
protocolThe transport layer protocol.
addressSrcThe source application IP address.
addressDstThe destination application IP address.
keyRateThe secret key rate.

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

References SetSettings().

+ Here is the call graph for this function:

Member Function Documentation

◆ ConnectKMSToSDN()

void ns3::QKDAppHelper::ConnectKMSToSDN ( Ptr< Node kmsNode,
Ipv4Address  sdnAddress,
uint32_t  port 
)

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

References ns3::Object::GetObject().

+ Here is the call graph for this function:

◆ InstallKMS() [1/2]

Ptr< QKDKeyManagerSystemApplication > ns3::QKDAppHelper::InstallKMS ( Ptr< Node node,
Ipv4Address  kmsAddress 
) const

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

Parameters
nodeThe node on which an QKDAppApplication will be installed.
nodeThe IP address on which KMS will listen for requests

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

◆ InstallKMS() [2/2]

Ptr< QKDKeyManagerSystemApplication > ns3::QKDAppHelper::InstallKMS ( Ptr< Node node,
Ipv4Address  kmsAddress,
uint32_t  port 
) const

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

Parameters
nodeThe node on which an QKDAppApplication will be installed.
nodeThe IP address on which KMS will listen for requests
nodeThe port number on which KMS will listen for requests

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

References ns3::Node::AddApplication(), ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), ns3::Object::GetObject(), m_factory_kms_app, m_factory_lr_app, and port.

+ Here is the call graph for this function:

◆ InstallPostProcessing()

ApplicationContainer ns3::QKDAppHelper::InstallPostProcessing ( Ptr< Node node1,
Ptr< Node node2,
Address  masterAddress,
Address  slaveAddress,
Address  masterKMSAddress,
Address  slaveKMSAddress,
uint32_t  keySizeInBits,
DataRate  keyRate,
uint32_t  packetSize,
DataRate  dataRate 
)

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

Parameters
nodeNameThe nodes on which an QKDPostprocessingApplication will be installed.
Returns
Container of Ptr to the applications installed.

UDP Protocol is used for sifting (implementation detail)

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

References ns3::ApplicationContainer::Add(), ns3::Node::AddApplication(), ns3::ObjectFactory::Create(), ns3::Socket::CreateSocket(), ns3::TypeId::LookupByName(), m_factory_postprocessing_app, packetSize, ns3::ObjectFactory::Set(), and ns3::ObjectBase::SetAttribute().

+ Here is the call 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.

◆ InstallQKDApp()

ApplicationContainer ns3::QKDAppHelper::InstallQKDApp ( Ptr< Node node) const

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

Parameters
nodeThe node on which an QKDAppApplication will be installed.
Returns
Container of Ptr to the applications installed.

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

References ns3::ApplicationContainer::Add(), ns3::Node::AddApplication(), ns3::ObjectFactory::Create(), and m_factory_qkd_app.

+ Here is the call graph for this function:

◆ InstallSDN() [1/2]

void ns3::QKDAppHelper::InstallSDN ( Ptr< Node node,
Ipv4Address  sdnAddress 
) const

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

Parameters
nodeThe node on which an QKDAppApplication will be installed.
nodeThe IP address on which SDN will listen for requests

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

References InstallSDN().

Referenced by InstallSDN().

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

◆ InstallSDN() [2/2]

void ns3::QKDAppHelper::InstallSDN ( Ptr< Node node,
Ipv4Address  sdnAddress,
uint32_t  port 
) const

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

Parameters
nodeThe node on which an QKDAppApplication will be installed.
nodeThe IP address on which SDN will listen for requests
nodeThe port number on which SDN will listen for requests

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

References ns3::Node::AddApplication(), ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), ns3::Object::GetObject(), m_factory_lr_app, m_factory_sdn_app, and port.

+ Here is the call 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 73 of file qkd-app-helper.cc.

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

+ 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 54 of file qkd-app-helper.cc.

References 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 183 of file qkd-app-helper.h.

◆ m_factory_kms_app

ObjectFactory ns3::QKDAppHelper::m_factory_kms_app
private

Object factory.

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

Referenced by QKDAppHelper(), InstallKMS(), SetAttribute(), and SetSettings().

◆ m_factory_lr_app

ObjectFactory ns3::QKDAppHelper::m_factory_lr_app
private

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

Referenced by QKDAppHelper(), InstallKMS(), and InstallSDN().

◆ m_factory_postprocessing_app

ObjectFactory ns3::QKDAppHelper::m_factory_postprocessing_app
private

Object factory.

Definition at line 178 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 177 of file qkd-app-helper.h.

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

◆ m_factory_sdn_app

ObjectFactory ns3::QKDAppHelper::m_factory_sdn_app
private

Object factory.

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

Referenced by QKDAppHelper(), and InstallSDN().

◆ m_protocol

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

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

Referenced by SetSettings().


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