A helper to make it easier to instantiate an ns3::QKDAppApplication on a set of nodes. More...
#include "qkd-app-helper.h"
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< QKDKeyManagerSystemApplication > | InstallKMS (Ptr< Node > node, Ipv4Address kmsAddress) const |
Install an ns3::QKDKeyManagmentSystem on the node configured with all the attributes set with SetAttribute. More... | |
Ptr< QKDKeyManagerSystemApplication > | 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. 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 |
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.
ns3::QKDAppHelper::QKDAppHelper | ( | ) |
Create an QKDAppHelper to make it easier to work with QKD Applications (KMS, Post-processing and other)
protocol | the 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. |
address | the 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().
ns3::QKDAppHelper::QKDAppHelper | ( | std::string | protocol, |
Address | address | ||
) |
Constructor.
protocol | The transport layer protocol. |
address | The application address. |
ns3::QKDAppHelper::QKDAppHelper | ( | std::string | protocol, |
Ipv4Address | addressSrc, | ||
Ipv4Address | addressDst, | ||
uint32_t | keyRate | ||
) |
Constructor.
protocol | The transport layer protocol. |
addressSrc | The source application IP address. |
addressDst | The destination application IP address. |
keyRate | The secret key rate. |
Definition at line 48 of file qkd-app-helper.cc.
References SetSettings().
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().
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.
node | The node on which an QKDAppApplication will be installed. |
node | The IP address on which KMS will listen for requests |
Definition at line 95 of file qkd-app-helper.cc.
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.
node | The node on which an QKDAppApplication will be installed. |
node | The IP address on which KMS will listen for requests |
node | The 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.
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.
nodeName | The nodes on which an QKDPostprocessingApplication will be 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().
|
private |
Install an ns3::QKDAppApplication on the node configured with all the attributes set with SetAttribute.
node | The node on which an QKDAppApplication will be installed. |
ApplicationContainer ns3::QKDAppHelper::InstallQKDApp | ( | Ptr< Node > | node | ) | const |
Install an ns3::QKDApp on the node configured with all the attributes set with SetAttribute.
node | The node on which an QKDAppApplication will be installed. |
Definition at line 85 of file qkd-app-helper.cc.
References ns3::ApplicationContainer::Add(), ns3::Node::AddApplication(), openflow-switch::app, ns3::ObjectFactory::Create(), and m_factory_qkd_app.
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.
node | The node on which an QKDAppApplication will be installed. |
node | The IP address on which SDN will listen for requests |
Definition at line 121 of file qkd-app-helper.cc.
References InstallSDN().
Referenced by InstallSDN().
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.
node | The node on which an QKDAppApplication will be installed. |
node | The IP address on which SDN will listen for requests |
node | The 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.
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.
name | the name of the application attribute to set |
value | the 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().
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.
c | NodeContainer of the set of nodes on which an QKDAppApplication will be 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().
|
staticprivate |
Definition at line 183 of file qkd-app-helper.h.
|
private |
Object factory.
Definition at line 176 of file qkd-app-helper.h.
Referenced by QKDAppHelper(), InstallKMS(), SetAttribute(), and SetSettings().
|
private |
Definition at line 179 of file qkd-app-helper.h.
Referenced by QKDAppHelper(), InstallKMS(), and InstallSDN().
|
private |
Object factory.
Definition at line 178 of file qkd-app-helper.h.
Referenced by QKDAppHelper(), InstallPostProcessing(), and SetAttribute().
|
private |
Object factory.
Definition at line 177 of file qkd-app-helper.h.
Referenced by QKDAppHelper(), InstallQKDApp(), and SetAttribute().
|
private |
Object factory.
Definition at line 175 of file qkd-app-helper.h.
Referenced by QKDAppHelper(), and InstallSDN().
|
private |
Definition at line 181 of file qkd-app-helper.h.
Referenced by SetSettings().