A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
examples_qkd_etsi_014.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 www.tk.etf.unsa.ba
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Emir Dervisevic <emir.dervisevic@etf.unsa.ba>
7 * Miralem Mehic <miralem.mehic@ieee.org>
8 */
9
10// Network topology
11
12// n7 ---------p2p-------- n8 (app)
13// | |
14// n3 (kms) -- p2p ------- n4 (kms)
15// | |
16// n0 ---p2p-- n1 --p2p-- n2 (app)
17// |<----qkd--x----------->|
18
19//
20// n5(QKDControl)
21// n6(QKDControl)
22//
23// - 1 QKD link (n0-n2)
24// - 2 KMSs on nodes n3 and n4
25// - 1 ETSI 014 UDP application on nodes n0 (master) and n2 (slave)
26// - 1 ETSI 014 UDP application on nodes n7 (master) and n8 (slave)
27
28#include <fstream>
29#include "ns3/core-module.h"
30#include "ns3/applications-module.h"
31#include "ns3/internet-module.h"
32#include "ns3/flow-monitor-module.h"
33#include "ns3/mobility-module.h"
34#include "ns3/point-to-point-module.h"
35#include "ns3/gnuplot.h"
36
37#include "ns3/qkd-link-helper.h"
38#include "ns3/qkd-app-helper.h"
39#include "ns3/qkd-app-014.h"
40
41#include "ns3/network-module.h"
42#include "ns3/internet-apps-module.h"
43#include "ns3/netanim-module.h"
44
45using namespace ns3;
46
47NS_LOG_COMPONENT_DEFINE ("QKD_ETSI014");
48
51
52std::map<std::string, std::map<std::string, uint32_t> > m_generatedKeys;
53std::map<std::string, std::map<std::string, uint32_t> > m_servedKeys;
54
55std::map<std::string, std::pair<uint32_t, uint32_t> > m_dataAppSent;
56std::map<std::string, std::pair<uint32_t, uint32_t> > m_dataAppReveived;
57std::map<std::string, std::pair<uint32_t, uint32_t> > m_dataSigSent;
58std::map<std::string, std::pair<uint32_t, uint32_t> > m_dataSigReceived;
59std::map<std::string, std::pair<uint32_t, uint32_t> > m_dataKmSent;
60std::map<std::string, std::pair<uint32_t, uint32_t> > m_dataKmReceived;
61std::map<std::string, uint32_t> m_missedSendPacketCalls;
62
63void
64KeyGenerated(std::string context, const std::string& appId, const std::string& keyId, const uint32_t& amountInBits)
65{
67}
68
69void
70KeyServed (std::string context, const std::string& appId, const std::string& keyId, const uint32_t& amountInBits)
71{
73}
74
75void
76SentPacket(std::string context, const std::string& appId, Ptr<const Packet> p){
77
78 auto it = m_dataAppSent.find(appId);
79 if(it == m_dataAppSent.end())
80 m_dataAppSent.insert(std::make_pair(appId, std::make_pair(1, p->GetSize() )) );
81 else{
82 it->second.first++;
83 it->second.second += p->GetSize();
84 }
85}
86
87void MissedSendPacketCall (std::string context, const std::string& appId, Ptr<const Packet> p){
88
89 auto it = m_missedSendPacketCalls.find(appId);
90 if(it == m_missedSendPacketCalls.end())
91 m_missedSendPacketCalls.insert(std::make_pair(appId, 1));
92 else
93 it->second++;
94}
95
96void
97ReceivedPacket(std::string context, const std::string& appId, Ptr<const Packet> p){
98
99 auto it = m_dataAppReveived.find(appId);
100 if(it == m_dataAppReveived.end())
101 m_dataAppReveived.insert(std::make_pair(appId, std::make_pair(1, p->GetSize())) );
102 else{
103 it->second.first++;
104 it->second.second += p->GetSize();
105 }
106}
107
108void
109SentPacketSig(std::string context, const std::string& appId, Ptr<const Packet> p){
110
111 auto it = m_dataSigSent.find(appId);
112 if(it == m_dataSigSent.end())
113 m_dataSigSent.insert(std::make_pair(appId, std::make_pair(1, p->GetSize())) );
114 else{
115 it->second.first++;
116 it->second.second += p->GetSize();
117 }
118}
119
120void
121ReceivedPacketSig(std::string context, const std::string& appId, Ptr<const Packet> p){
122
123 auto it = m_dataSigReceived.find(appId);
124 if(it == m_dataSigReceived.end())
125 m_dataSigReceived.insert(std::make_pair(appId, std::make_pair(1, p->GetSize())) );
126 else{
127 it->second.first++;
128 it->second.second += p->GetSize();
129 }
130}
131
132void
133SentPacketToKMS(std::string context, const std::string& appId, Ptr<const Packet> p){
134
135 auto it = m_dataKmSent.find(appId);
136 if(it == m_dataKmSent.end())
137 m_dataKmSent.insert(std::make_pair(appId, std::make_pair(1, p->GetSize())) );
138 else{
139 it->second.first++;
140 it->second.second += p->GetSize();
141 }
142}
143
144void
145ReceivedPacketFromKMS(std::string context, const std::string& appId, Ptr<const Packet> p){
146
147 auto it = m_dataKmReceived.find(appId);
148 if(it == m_dataKmReceived.end())
149 m_dataKmReceived.insert(std::make_pair(appId, std::make_pair(1, p->GetSize())) );
150 else{
151 it->second.first++;
152 it->second.second += p->GetSize();
153 }
154}
155
156void
158 std::cout << "\n\nAPPLICATION STATS:\n";
159 std::cout << "\n\tAPP-APP Data Packets Sent:";
160 for(const auto &el: m_dataAppSent)
161 std::cout << "\n\t\tApplication ID:\t" << el.first
162 << "\tNumber:\t" << el.second.first << "\t\tBytes:\t" << el.second.second;
163 std::cout << "\n\n\tAPP-APP Data Packets Received:";
164 for(const auto &el: m_dataAppReveived)
165 std::cout << "\n\t\tApplication ID:\t" << el.first
166 << "\tNumber:\t" << el.second.first << "\t\tBytes:\t" << el.second.second;
167 std::cout << "\n\n\tMissed Send Packet Calls:";
168 for(const auto &el: m_missedSendPacketCalls)
169 std::cout << "\n\t\tApplication ID:\t" << el.first << "\tNumber:\t" << el.second;
170 std::cout << "\n\n\tAPP-APP Signaling Packets Sent:";
171 for(const auto &el: m_dataSigSent)
172 std::cout << "\n\t\tApplication ID:\t" << el.first
173 << "\tNumber:\t" << el.second.first << "\t\tBytes:\t" << el.second.second;
174 std::cout << "\n\n\tAPP-APP Signaling Packets Received:";
175 for(const auto &el: m_dataSigReceived)
176 std::cout << "\n\t\tApplication ID:\t" << el.first
177 << "\tNumber:\t" << el.second.first << "\t\tBytes:\t" << el.second.second;
178 std::cout << "\n\n\tAPP-KM Packets Sent:";
179 for(const auto &el: m_dataKmSent)
180 std::cout << "\n\t\tApplication ID:\t" << el.first
181 << "\tNumber:\t" << el.second.first << "\t\tBytes:\t" << el.second.second;
182 std::cout << "\n\n\tAPP-KM Packets Received:";
183 for(const auto &el: m_dataKmReceived)
184 std::cout << "\n\t\tApplication ID:\t" << el.first
185 << "\tNumber:\t" << el.second.first << "\t\tBytes:\t" << el.second.second;
186
187 std::cout << "\n\nQKD LINK STATS:\n";
188 for (const auto &el: m_generatedKeys){
189 for(const auto &el1 : el.second)
190 std::cout << "\n\tLink (" << el.first << "-"<< el1.first << ")\tGenerated (bits):" << el1.second;
191 }
192
193 std::cout << "\n\nSERVICE STATS:\n";
194 for(auto const &el: m_servedKeys){
195 std::cout << "\n\tApplication ID:\t" << el.first;
196 for(auto const &el1: el.second)
197 std::cout << "\n\t\tKey ID:\t" << el1.first << "\t\tServed (bits):\t" << el1.second;
198 std::cout << "\n";
199 }
200
201}
202
203int main (int argc, char *argv[])
204{
207 //
208 // Explicitly create the nodes required by the topology (shown above).
209 //
210 NS_LOG_INFO ("Create nodes.");
211
212 NodeContainer n;
213
214 double appHoldTime = 0.5;
215 uint16_t simulationTime = 500;
216 uint16_t appStartTime = 50;
217 uint16_t appStopTime = 500;
218 uint16_t qkdStartTime = 0;
219 uint16_t qkdStopTime = 500;
220 uint32_t encryptionType = 1; //0-unencrypted, 1-OTP, 2-AES256
222 uint32_t aesLifetime = 10000; //In bytes! 64GB = 68719476736B
224 uint32_t authenticationType = 1; //0-unauthenticated, 1-VMAC, 2,3-MD5,SHA1
228 NS_LOG_DEBUG(simulationTime);
236
237 uint32_t appRate = 100000; //In bps
238 uint32_t appPacketSize = 800; //In bytes
239 uint32_t ppKeyRate = 10000; //In bps
240 uint32_t ppKeySize = 8192; //In bytes
241 uint32_t ppPacketSize = 100; //In bytes
242 uint32_t ppRate = 1000;
249
250 bool trace = false;
251 n.Create (9);
252
253 uint32_t stream = 15;
254 uint32_t seed = 100;
255
257 RngSeedManager::SetRun (stream);
258 srand( stream ); //seeding for the first time only!
259
260 // Configure command line parameters
262 cmd.AddValue ("simTime", "Simulation time (seconds)", simulationTime);
263 cmd.AddValue ("appHoldTime", "How long (seconds) should QKDApp004 wait to close socket to KMS after receiving REST response?", appHoldTime);
264 cmd.AddValue ("appStartTime", "Application start time (seconds)", appStartTime);
265 cmd.AddValue ("appStopTime", "Application stop time (seconds)", appStopTime);
266 cmd.AddValue ("qkdStartTime", "QKD start time (seconds)", qkdStartTime);
267 cmd.AddValue ("qkdStopTime", "QKD stop time (seconds)", qkdStopTime);
268 cmd.AddValue ("encryptionType", "Type of encryption to be used", encryptionType);
269 cmd.AddValue ("authenticationType", "Type of authentication to be used", authenticationType);
270 cmd.AddValue ("aesLifetime", "How many packets to encrypt with the same AES key?", aesLifetime);
271 cmd.AddValue ("numberOfKeyToFetchFromKMS", "How many keys to fetch from KMS in a query?", numberOfKeyToFetchFromKMS);
272 cmd.AddValue ("keyBufferLengthEncryption", "How many keys to store in local buffer of QKDApp004 for encryption?", keyBufferLengthEncryption);
273 cmd.AddValue ("keyBufferLengthAuthentication", "How many keys to store in local buffer of QKDApp004 for authentication?", keyBufferLengthAuthentication);
274 cmd.AddValue ("useCrypto", "Perform crypto functions?", useCrypto);
275 cmd.AddValue ("seed", "Random seed value", seed);
276 cmd.AddValue ("trace", "Enable datapath stats and pcap traces", trace);
277 cmd.Parse (argc, argv);
278
279 NodeContainer n0n1 = NodeContainer (n.Get(0), n.Get (1));
280 NodeContainer n1n2 = NodeContainer (n.Get(1), n.Get (2));
281 NodeContainer n0n3 = NodeContainer (n.Get(0), n.Get (3));
282 NodeContainer n7n3 = NodeContainer (n.Get(7), n.Get (3));
283 NodeContainer n2n4 = NodeContainer (n.Get(2), n.Get (4));
284 NodeContainer n8n4 = NodeContainer (n.Get(8), n.Get (4));
285 NodeContainer n3n4 = NodeContainer (n.Get(3), n.Get (4));
286
288 internet.Install (n);
289
290 // Set Mobility for all nodes
293 positionAlloc ->Add(Vector(0, 0, 0)); // node0 //Install PPApps and QKDApps
294 positionAlloc ->Add(Vector(200, 0, 0)); // node1 // optional
295 positionAlloc ->Add(Vector(400, 0, 0)); // node2 //Install PPApps and QKDApps
296 positionAlloc ->Add(Vector(0, 100, 0)); // node3 //KM node 1
297 positionAlloc ->Add(Vector(400, 100, 0)); // node4 //KM node 2
298 positionAlloc ->Add(Vector(0, 200, 0)); // node5 //Controller 1
299 positionAlloc ->Add(Vector(400, 200, 0)); // node6 //Controller 2
300 positionAlloc ->Add(Vector(0, 50, 0)); // test-PPApp - slave!
301 positionAlloc ->Add(Vector(400, 50, 0)); // test-PPApp - master!
302 mobility.SetPositionAllocator(positionAlloc);
303 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
304 mobility.Install(n);
305
306 // We create the channels first without any IP addressing information
307 NS_LOG_INFO ("Create channels.");
309 p2p.SetDeviceAttribute ("DataRate", StringValue ("50Mbps"));
310 p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));
311
312 NetDeviceContainer d0d1 = p2p.Install (n0n1);
313 NetDeviceContainer d1d2 = p2p.Install (n1n2);
314 NetDeviceContainer d0d3 = p2p.Install (n0n3);
315 NetDeviceContainer d7d3 = p2p.Install (n7n3);
316 NetDeviceContainer d2d4 = p2p.Install (n2n4);
317 NetDeviceContainer d8d4 = p2p.Install (n8n4);
318 NetDeviceContainer d3d4 = p2p.Install (n3n4);
319
320 //
321 // We've got the "hardware" in place. Now we need to add IP addresses.
322 //
323 NS_LOG_INFO ("Assign IP Addresses.");
325
326 ipv4.SetBase ("10.1.1.0", "255.255.255.0");
328 ipv4.SetBase ("10.1.2.0", "255.255.255.0");
330 ipv4.SetBase ("10.1.3.0", "255.255.255.0");
332 ipv4.SetBase ("10.1.4.0", "255.255.255.0");
334 ipv4.SetBase ("10.1.5.0", "255.255.255.0");
336 ipv4.SetBase ("10.1.6.0", "255.255.255.0");
338 ipv4.SetBase ("10.1.7.0", "255.255.255.0");
340
343
344 // install QKD Control the node 5 and 6
345 Ptr<QKDControl> controlSiteA = QLinkHelper.InstallQKDNController ( n.Get(5) );
346 Ptr<QKDControl> controlSiteB = QLinkHelper.InstallQKDNController ( n.Get(6) );
347 QLinkHelper.ConfigureQBuffers ( //Configure Q-Buffers
349 1024, //min_bits
350 1800, //thr_bits
351 500000000, //max_bits
352 512 //default key size in bits
353 );
354
355 //Config::SetDefault ("ns3::QKDKeyManagerSystemApplication::SBufferMaxSizeBits", UintegerValue (3000));
356
357 // install KMs on nodes 3 and 4
358 QAHelper.InstallKeyManager(//Install key manager for site A
359 n.Get(3), //Node KM-A
360 i3i4.GetAddress(0), //IP address KM-A
361 80, //Port
362 controlSiteA //Assigned controller A
363 );
364 QAHelper.InstallKeyManager( //Install key manager for site B
365 n.Get(4), //Node KM-B
366 i3i4.GetAddress(1), //IP address KM-B
367 80, //Port
368 controlSiteB //Assigned controller B
369 );
370
371 NS_LOG_INFO ("Create Applications.");
372
373 std::cout << "SrcNode: " << n.Get(0)->GetId() << " Source IP address: " << i0i1.GetAddress(0) << std::endl;
374 std::cout << "DstNode: " << n.Get(2)->GetId() << " Destination IP address: " << i1i2.GetAddress(1) << std::endl;
375 std::cout << "SrcKMSNode: " << n.Get(3)->GetId() << " Destination KMS IP address: " << i3i4.GetAddress(0) << std::endl;
376 std::cout << "DstKMSNode: " << n.Get(4)->GetId() << " Destination KMS IP address: " << i3i4.GetAddress(1) << std::endl;
377
378 //Create APP to generate keys
381 QAHelper.InstallPostProcessing(
382 n.Get(0), //QKD module A
383 n.Get(2), //QKD module B
384 InetSocketAddress (i0i1.GetAddress(0), 102), //Address A
385 InetSocketAddress (i1i2.GetAddress(1), 102), //Address B
386 n.Get(5), //Controller-A
387 n.Get(6), //Controller-B
388 ppKeySize, //size of key to be added to QKD buffer
389 DataRate (ppKeyRate), //average QKD key rate
390 ppPacketSize, //average data packet size
391 DataRate (ppRate) //average data traffic rate
392 )
393 );
396
397 //Set default values for applications created below
398 Config::SetDefault ("ns3::QKDApp014::NumberOfKeyToFetchFromKMS", UintegerValue (numberOfKeyToFetchFromKMS));//Number of keys to obtain per request!
399 Config::SetDefault ("ns3::QKDApp014::AuthenticationType", UintegerValue (authenticationType)); //(0-unauthenticated, 1-VMAC, 2-MD5, 3-SHA1)
400 Config::SetDefault ("ns3::QKDApp014::EncryptionType", UintegerValue (encryptionType)); //(0-unencrypted, 1-OTP, 2-AES)
401 Config::SetDefault ("ns3::QKDApp014::AESLifetime", UintegerValue (aesLifetime));
402 Config::SetDefault ("ns3::QKDApp014::UseCrypto", UintegerValue (useCrypto));
403
404 uint16_t communicationPort = 8081;
407 QAHelper.InstallQKDApplication(
408 n.Get(0), //Source Node
409 n.Get(2), //Destination Node
410 InetSocketAddress (i0i1.GetAddress(0), communicationPort), //Source address
411 InetSocketAddress (i1i2.GetAddress(1), communicationPort), //Destination address
412 n.Get(5), //Controller 1
413 n.Get(6), //Controller 2
414 "tcp", //Connection type
415 appPacketSize, //Payload size
416 DataRate (appRate), //Data rate
417 "etsi014" //Application type
418 )
419 );
421 QAHelper.InstallQKDApplication(
422 n.Get(8),
423 n.Get(7),
424 InetSocketAddress (i8i4.GetAddress(0), communicationPort), //Address A
425 InetSocketAddress (i7i3.GetAddress(0), communicationPort), //Address B
426 n.Get(6), //Controller-A
427 n.Get(5), //Controller-B
428 "tcp", //Connection type
429 appPacketSize, //Payload size
430 DataRate (appRate), //Data rate
431 "etsi014" //Application type
432 )
433 );
436
437
439
440 QLinkHelper.CreateTopologyGraph({controlSiteA, controlSiteB});
441 QLinkHelper.PopulateRoutingTables();
442 QLinkHelper.AddGraphs();
443
444 //////////////////////////////////////
445 //// STATISTICS
446 //////////////////////////////////////
447
448 //Connect Traces for QKD Cryptographic Applications
449 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/Tx", MakeCallback(&SentPacket));
450 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/Rx", MakeCallback(&ReceivedPacket));
451 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/Mx", MakeCallback(&MissedSendPacketCall));
452 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/TxSig", MakeCallback(&SentPacketSig));
453 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/RxSig", MakeCallback(&ReceivedPacketSig));
454 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/TxKMS", MakeCallback(&SentPacketToKMS));
455 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDApp014/RxKMS", MakeCallback(&ReceivedPacketFromKMS));
456
457 //Connect Traces for KM key statistics
458 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDKeyManagerSystemApplication/KeyServed", MakeCallback(&KeyServed));
459 Config::Connect("/NodeList/*/ApplicationList/*/$ns3::QKDKeyManagerSystemApplication/QKDKeyGenerated", MakeCallback(&KeyGenerated));
460
461 if(trace){
462 //if we need we can create pcap files
464 p2p.EnableAsciiAll (ascii.CreateFileStream ("qkd_etis014.tr"));
465 p2p.EnablePcapAll ("qkd_etis014");
466 AnimationInterface anim ("qkd_etis014.xml"); // where "animation.xml" is any arbitrary filename
467 }
468
469 Simulator::Stop (Seconds (simulationTime));
471
472 //Finally print the graphs
473 QLinkHelper.PrintGraphs();
474
475 std::cout << "simTime:\t" << simulationTime << "\n";
476 std::cout << "appStartTime:\t" << appStartTime << "\n";
477 std::cout << "appStopTime:\t" << appStopTime << "\n";
478 std::cout << "qkdStartTime:\t" << qkdStartTime << "\n";
479 std::cout << "qkdStopTime:\t" << qkdStopTime << "\n";
480 std::cout << "encryptionType:\t" << encryptionType << "\n";
481 std::cout << "authenticationType:\t" << authenticationType << "\n";
482 std::cout << "aesLifetime:\t" << aesLifetime << "\n";
483 std::cout << "useCrypto:\t" << useCrypto << "\n";
484 std::cout << "trace:\t" << trace << "\n";
485
486 Ratio();
488}
NodeContainer n1n2
Nodecontainer n1 + n2.
NodeContainer n3n4
Nodecontainer n3 + n4.
Ipv4InterfaceContainer i1i2
IPv4 interface container i1 + i2.
Ipv4InterfaceContainer i3i4
IPv4 interface container i3 + i4.
Interface to network animator.
holds a vector of ns3::Application pointers.
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container.
Manage ASCII trace files for device models.
Parse command-line arguments.
Class for representing data rates.
Definition data-rate.h:78
an Inet address class
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t GetId() const
Definition node.cc:106
static void EnablePrinting()
Enable printing packets metadata.
Definition packet.cc:585
static void Enable()
Enable the packet metadata.
Build a set of PointToPointNetDevice objects.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:66
A helper to make it easier to instantiate an ns3::QKDAppApplication on a set of nodes.
static void SetRun(uint64_t run)
Set the run number of simulation.
static void SetSeed(uint32_t seed)
Set the seed.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:131
static void Run()
Run the simulation.
Definition simulator.cc:167
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition simulator.cc:175
Hold variables of type string.
Definition string.h:45
Hold an unsigned integer type.
Definition uinteger.h:34
void SentPacket(std::string context, const std::string &appId, Ptr< const Packet > p)
uint32_t showKeyAdded
void MissedSendPacketCall(std::string context, const std::string &appId, Ptr< const Packet > p)
std::map< std::string, std::pair< uint32_t, uint32_t > > m_dataKmReceived
void SentPacketToKMS(std::string context, const std::string &appId, Ptr< const Packet > p)
void KeyGenerated(std::string context, const std::string &appId, const std::string &keyId, const uint32_t &amountInBits)
std::map< std::string, std::pair< uint32_t, uint32_t > > m_dataAppReveived
std::map< std::string, uint32_t > m_missedSendPacketCalls
std::map< std::string, std::pair< uint32_t, uint32_t > > m_dataSigSent
void Ratio()
void SentPacketSig(std::string context, const std::string &appId, Ptr< const Packet > p)
std::map< std::string, std::pair< uint32_t, uint32_t > > m_dataSigReceived
void ReceivedPacketFromKMS(std::string context, const std::string &appId, Ptr< const Packet > p)
void KeyServed(std::string context, const std::string &appId, const std::string &keyId, const uint32_t &amountInBits)
std::map< std::string, std::pair< uint32_t, uint32_t > > m_dataKmSent
void ReceivedPacketSig(std::string context, const std::string &appId, Ptr< const Packet > p)
void ReceivedPacket(std::string context, const std::string &appId, Ptr< const Packet > p)
std::map< std::string, std::map< std::string, uint32_t > > m_generatedKeys
uint32_t showKeyServed
std::map< std::string, std::map< std::string, uint32_t > > m_servedKeys
std::map< std::string, std::pair< uint32_t, uint32_t > > m_dataAppSent
void SetDefault(std::string name, const AttributeValue &value)
Definition config.cc:883
void Connect(std::string path, const CallbackBase &cb)
Definition config.cc:967
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1344
AnimationInterface * anim
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition callback.h:684
mobility
Definition third.py:92