A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
qkd-link-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2020 DOTFEESA www.tk.etf.unsa.ba
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Miralem Mehic <miralem.mehic@ieee.org>
19
*/
20
21
#ifndef QKD_HELPER_H
22
#define QKD_HELPER_H
23
24
#include <string>
25
26
#include "ns3/object-factory.h"
27
#include "ns3/net-device-container.h"
28
#include "ns3/node-container.h"
29
#include "ns3/trace-helper.h"
30
#include "ns3/ipv4-interface-address.h"
31
#include "ns3/core-module.h"
32
#include "ns3/network-module.h"
33
#include "ns3/internet-module.h"
34
35
#include "ns3/qkd-encryptor.h"
36
#include "ns3/qkd-encryptor-container.h"
37
38
#include "ns3/qkd-control.h"
39
#include "ns3/qkd-control-container.h"
40
41
#include "ns3/qkd-graph-manager.h"
42
43
namespace
ns3
{
44
45
class
NetDevice;
46
class
Node;
47
55
class
QKDLinkHelper
56
{
57
public
:
58
65
QKDLinkHelper
();
66
70
virtual
~QKDLinkHelper
() {}
71
77
void
AddGraph
(
Ptr<Node>
src,
Ptr<Node>
dst);
78
85
void
AddGraph
(
Ptr<Node>
src,
Ptr<Node>
dst, std::string graphName);
86
94
void
AddGraph
(
Ptr<Node>
src,
Ptr<Node>
dst, std::string graphName, std::string graphType);
95
99
void
PrintGraphs
();
100
106
Ptr<QKDEncryptor>
InstallQKDEncryptor
(
Ptr<Node>
node);
107
113
QKDEncryptorContainer
InstallQKDEncryptor
(
NodeContainer
& n);
114
119
Ptr<QKDControl>
InstallQKDControl
(
Ptr<Node>
node);
120
126
QKDControlContainer
InstallQKDControl
(
NodeContainer
& n);
127
140
std::string
CreateQKDLink
(
141
Ptr<QKDControl>
control,
142
Ptr<Node>
alice,
143
Ptr<Node>
bob,
144
Ptr<Node>
aliceKMS,
145
Ptr<Node>
bobKMS,
146
uint32_t Mmin,
147
uint32_t Mthr,
148
uint32_t Mmax,
149
uint32_t Mcurrent
150
);
151
152
bool
m_useRealStorages
;
153
159
static
void
CreateAndAggregateObjectFromTypeId
(
Ptr<Node>
node,
const
std::string typeId);
160
161
private
:
162
163
ObjectFactory
m_qkdbufferFactory
;
164
165
};
166
}
// namespace ns3
167
168
#endif
/* QKD_HELPER_H */
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:39
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::Ptr< Node >
ns3::QKDControlContainer
holds a vector of std::pair of Ptr<QKDControl> and interface index.
Definition:
qkd-control-container.h:41
ns3::QKDEncryptorContainer
holds a vector of std::pair of Ptr<QKDEncryptor> and interface index.
Definition:
qkd-encryptor-container.h:42
ns3::QKDLinkHelper
Build a set of QKDNetDevice objects such as QKD buffers QKD encryptors and QKD graphs.
Definition:
qkd-link-helper.h:56
ns3::QKDLinkHelper::m_useRealStorages
bool m_useRealStorages
Wheater to use real key file storage (still in development).
Definition:
qkd-link-helper.h:152
ns3::QKDLinkHelper::AddGraph
void AddGraph(Ptr< Node > src, Ptr< Node > dst)
Add a graph.
Definition:
qkd-link-helper.cc:53
ns3::QKDLinkHelper::InstallQKDEncryptor
Ptr< QKDEncryptor > InstallQKDEncryptor(Ptr< Node > node)
Install QKD encryptor on a node.
Definition:
qkd-link-helper.cc:154
ns3::QKDLinkHelper::InstallQKDControl
Ptr< QKDControl > InstallQKDControl(Ptr< Node > node)
Install the QKD control on a node.
Definition:
qkd-link-helper.cc:120
ns3::QKDLinkHelper::PrintGraphs
void PrintGraphs()
Print graphs.
Definition:
qkd-link-helper.cc:109
ns3::QKDLinkHelper::~QKDLinkHelper
virtual ~QKDLinkHelper()
Destructor.
Definition:
qkd-link-helper.h:70
ns3::QKDLinkHelper::CreateQKDLink
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.
Definition:
qkd-link-helper.cc:209
ns3::QKDLinkHelper::CreateAndAggregateObjectFromTypeId
static void CreateAndAggregateObjectFromTypeId(Ptr< Node > node, const std::string typeId)
Create an object from its TypeId and aggregates it to the node.
Definition:
qkd-link-helper.cc:185
ns3::QKDLinkHelper::QKDLinkHelper
QKDLinkHelper()
Constructor.
Definition:
qkd-link-helper.cc:41
ns3::QKDLinkHelper::m_qkdbufferFactory
ObjectFactory m_qkdbufferFactory
Device Factory.
Definition:
qkd-link-helper.h:163
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
qkd
helper
qkd-link-helper.h
Generated on Tue Feb 6 2024 19:21:26 for ns-3 by
1.9.1