A Discrete-Event Network Simulator
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 
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 
107 
114 
120 
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 
153 
159  static void CreateAndAggregateObjectFromTypeId (Ptr<Node> node, const std::string typeId);
160 
161 private:
162 
164 
165 };
166 } // namespace ns3
167 
168 #endif /* QKD_HELPER_H */
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
holds a vector of std::pair of Ptr<QKDControl> and interface index.
holds a vector of std::pair of Ptr<QKDEncryptor> and interface index.
Every class exported by the ns3 library is enclosed in the ns3 namespace.