A Discrete-Event Network Simulator
API
ns3::QKDLinkHelper Class Reference

Build a set of QKDNetDevice objects such as QKD buffers QKD encryptors and QKD graphs. More...

#include "qkd-link-helper.h"

+ Collaboration diagram for ns3::QKDLinkHelper:

Public Member Functions

 QKDLinkHelper ()
 Constructor. More...
 
virtual ~QKDLinkHelper ()
 Destructor. More...
 
void AddGraph (Ptr< Node > src, Ptr< Node > dst)
 Add a graph. More...
 
void AddGraph (Ptr< Node > src, Ptr< Node > dst, std::string graphName)
 Add a graph. More...
 
void AddGraph (Ptr< Node > src, Ptr< Node > dst, std::string graphName, std::string graphType)
 Add a graph. More...
 
std::string CreateQKDLink (Ptr< QKDControl > control, Ptr< Node > alice, Ptr< Node > bob, Ptr< Node > aliceKMS, Ptr< Node > bobKMS, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurrent)
 Create a QKD link. More...
 
QKDControlContainer InstallQKDControl (NodeContainer &n)
 Install the QKD controll on nodes within a given container. More...
 
Ptr< QKDControlInstallQKDControl (Ptr< Node > node)
 Install the QKD control on a node. More...
 
QKDEncryptorContainer InstallQKDEncryptor (NodeContainer &n)
 Install QKD encryptor on nodes within a given container. More...
 
Ptr< QKDEncryptorInstallQKDEncryptor (Ptr< Node > node)
 Install QKD encryptor on a node. More...
 
void PrintGraphs ()
 Print graphs. More...
 

Static Public Member Functions

static void CreateAndAggregateObjectFromTypeId (Ptr< Node > node, const std::string typeId)
 Create an object from its TypeId and aggregates it to the node. More...
 

Public Attributes

bool m_useRealStorages
 Wheater to use real key file storage (still in development). More...
 

Private Attributes

ObjectFactory m_qkdbufferFactory
 Device Factory. More...
 

Detailed Description

Build a set of QKDNetDevice objects such as QKD buffers QKD encryptors and QKD graphs.

Definition at line 55 of file qkd-link-helper.h.

Constructor & Destructor Documentation

◆ QKDLinkHelper()

ns3::QKDLinkHelper::QKDLinkHelper ( )

Constructor.

Create a QKDLinkHelper to make life easier when creating point to point networks.

Definition at line 41 of file qkd-link-helper.cc.

References m_qkdbufferFactory, m_useRealStorages, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~QKDLinkHelper()

virtual ns3::QKDLinkHelper::~QKDLinkHelper ( )
inlinevirtual

Destructor.

Definition at line 70 of file qkd-link-helper.h.

Member Function Documentation

◆ AddGraph() [1/3]

void ns3::QKDLinkHelper::AddGraph ( Ptr< Node src,
Ptr< Node dst 
)

Add a graph.

ADD QKDGraph.

Parameters
srcThe source node.
dstThe destination node.
Ptr<Node>src
Ptr<Node>dst

Definition at line 53 of file qkd-link-helper.cc.

Referenced by AddGraph().

+ Here is the caller graph for this function:

◆ AddGraph() [2/3]

void ns3::QKDLinkHelper::AddGraph ( Ptr< Node src,
Ptr< Node dst,
std::string  graphName 
)

Add a graph.

ADD QKDGraph.

Parameters
srcThe source node.
dstThe destination node.
graphNameThe graph name.
Ptr<Node>src
Ptr<Node>dst
std::stringgraphName

Definition at line 67 of file qkd-link-helper.cc.

References AddGraph().

+ Here is the call graph for this function:

◆ AddGraph() [3/3]

void ns3::QKDLinkHelper::AddGraph ( Ptr< Node src,
Ptr< Node dst,
std::string  graphName,
std::string  graphType 
)

Add a graph.

ADD QKDGraph.

Parameters
srcThe source node.
dstThe destination node.
graphNameThe graph name.
graphTypeThe graph type.
Ptr<QKDControl>QKDControl
Ptr<Node>src
Ptr<Node>dst
std::stringgraphName
std::stringgraphType

Definition at line 83 of file qkd-link-helper.cc.

References ns3::QKDGraphManager::AddQKDBuffer(), ns3::QKDGraphManager::getInstance(), ns3::Object::GetObject(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ CreateAndAggregateObjectFromTypeId()

void ns3::QKDLinkHelper::CreateAndAggregateObjectFromTypeId ( Ptr< Node node,
const std::string  typeId 
)
static

Create an object from its TypeId and aggregates it to the node.

Help function used to aggregate protocols to the node such as virtual-tcp, virtual-udp, virtual-ipv4-l3.

Parameters
nodeThe node.
Theobject TypeId.
Ptr<Node>node
conststd::string typeID

Definition at line 185 of file qkd-link-helper.cc.

References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ CreateQKDLink()

std::string ns3::QKDLinkHelper::CreateQKDLink ( Ptr< QKDControl centralControler,
Ptr< Node alice,
Ptr< Node bob,
Ptr< Node aliceKMS,
Ptr< Node bobKMS,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  Mcurrent 
)

Create a QKD link.

Create and setup QKD link between two nodes.

Parameters
controlThe QKD control.
aliceThe source node.
bobThe destination node.
aliceKMSThe source KMS node.
bobKMSThe destination KMS node.
MminThe lower threshold value.
MthrThe threshold value,
MmaxThe maximum capacity.
McurrentThe current amount of key material in bits.

It notifies LKMS (Local QKD Manager about the connection).

QKDControl passed as parameter is the central control entity which is not currently used.

Parameters
Ptr<QKDControl>QKDControl
Ptr<Node>alice
Ptr<Node>alice
uint32_tMmin
uint32_tMthr
uint32_tMmmax
uint32_tMcurrent

Definition at line 209 of file qkd-link-helper.cc.

References ns3::Node::GetId(), ns3::Object::GetObject(), InstallQKDControl(), ns3::QKDControl::QKDLink::keyAssociationId, m_useRealStorages, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ InstallQKDControl() [1/2]

QKDControlContainer ns3::QKDLinkHelper::InstallQKDControl ( NodeContainer n)

Install the QKD controll on nodes within a given container.

Install QKDControl on the node.

Parameters
nThe node container.
Returns
The container of the installed QKD controls.
Parameters
NodeContainer&n

Definition at line 138 of file qkd-link-helper.cc.

References ns3::QKDControlContainer::Add(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), and InstallQKDControl().

+ Here is the call graph for this function:

◆ InstallQKDControl() [2/2]

Ptr< QKDControl > ns3::QKDLinkHelper::InstallQKDControl ( Ptr< Node n)

Install the QKD control on a node.

Install QKDControl on the node.

Parameters
nodeThe node.
NodeContainer&n

Definition at line 120 of file qkd-link-helper.cc.

References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), ns3::Object::GetObject(), and ns3::ObjectFactory::SetTypeId().

Referenced by CreateQKDLink(), and InstallQKDControl().

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

◆ InstallQKDEncryptor() [1/2]

QKDEncryptorContainer ns3::QKDLinkHelper::InstallQKDEncryptor ( NodeContainer n)

Install QKD encryptor on nodes within a given container.

Install QKDEncryptor on the node.

Parameters
nThe node container.
Returns
The container of the installed QKD encryptors.
Parameters
NodeContainer&n

Definition at line 168 of file qkd-link-helper.cc.

References ns3::QKDEncryptorContainer::Add(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), and InstallQKDEncryptor().

+ Here is the call graph for this function:

◆ InstallQKDEncryptor() [2/2]

Ptr< QKDEncryptor > ns3::QKDLinkHelper::InstallQKDEncryptor ( Ptr< Node n)

Install QKD encryptor on a node.

Install QKDEncryptor on the node.

Parameters
nodeThe node.
Returns
The QKD encryptor.
Parameters
NodeContainer&n

Definition at line 154 of file qkd-link-helper.cc.

References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), and ns3::ObjectFactory::SetTypeId().

Referenced by InstallQKDEncryptor().

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

◆ PrintGraphs()

void ns3::QKDLinkHelper::PrintGraphs ( )

Print graphs.

Print QKDGraphs.

Definition at line 109 of file qkd-link-helper.cc.

References ns3::QKDGraphManager::getInstance(), and ns3::QKDGraphManager::PrintGraphs().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_qkdbufferFactory

ObjectFactory ns3::QKDLinkHelper::m_qkdbufferFactory
private

Device Factory.

Definition at line 163 of file qkd-link-helper.h.

Referenced by QKDLinkHelper().

◆ m_useRealStorages

bool ns3::QKDLinkHelper::m_useRealStorages

Wheater to use real key file storage (still in development).

Definition at line 152 of file qkd-link-helper.h.

Referenced by QKDLinkHelper(), and CreateQKDLink().


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