#include <stdio.h>#include <fstream>#include "ns3/core-module.h"#include "ns3/applications-module.h"#include "ns3/internet-module.h"#include "ns3/flow-monitor-module.h"#include "ns3/mobility-module.h"#include "ns3/point-to-point-module.h"#include "ns3/internet-apps-module.h"#include "ns3/gnuplot.h"#include "ns3/qkd-link-helper.h"#include "ns3/qkd-app-helper.h"#include "ns3/qkd-app-004.h"#include "ns3/network-module.h"#include "ns3/netanim-module.h"#include "ns3/mpi-module.h"
Include dependency graph for examples_qkd_etsi_combined_input.cc:Go to the source code of this file.
Classes | |
| struct | LinkDetails |
Functions | |
| std::string | CalculateAverageDelayBasedOnDistance (uint32_t distanceInMeters) |
| void | CreateOutputForCPU (std::string outputStatsName) |
| bool | DoesLinkExist (std::string linkName, Ipv4InterfaceContainer &interfacesToApp) |
| void | KeyConsumedLink (std::string context, const uint32_t &srcNodeId, const uint32_t &dstNodeId, const uint32_t &amountInBits) |
| Keys fetched from qkdBuffers for transformation before delivery to end-user application. | |
| void | KeyGenerated (std::string context, const std::string &appId, const std::string &keyId, const uint32_t &amountInBits) |
| void | KeyServed (std::string context, const std::string &appId, const std::string &keyId, const uint32_t &amountInBits) |
| Keys served from KMS to end-user application. | |
| void | MissedSendPacketCall (std::string context, const std::string &appId, Ptr< const Packet > p) |
| std::string | outputFileType ("json") |
| void | Ratio (std::string outputStatsName, uint32_t cpuCounter) |
| std::vector< std::pair< std::string, std::vector< uint32_t > > > | read_csv (std::string filename) |
| void | ReceivedPacket (std::string context, const std::string &appId, Ptr< const Packet > p) |
| void | ReceivedPacketFromKMS (std::string context, const std::string &appId, Ptr< const Packet > p) |
| void | ReceivedPacketSig (std::string context, const std::string &appId, Ptr< const Packet > p) |
| void | RelayKeyTrace (std::string context, const uint32_t &nodeId, const uint32_t &srcNodeId, const uint32_t &dstNodeId, const uint32_t &amountInBits) |
| void | SentPacket (std::string context, const std::string &appId, Ptr< const Packet > p) |
| void | SentPacketSig (std::string context, const std::string &appId, Ptr< const Packet > p) |
| void | SentPacketToKMS (std::string context, const std::string &appId, Ptr< const Packet > p) |
| void | write_csv (std::string filename, std::vector< std::pair< std::string, std::vector< uint32_t > > > dataset) |
Variables | |
| std::ofstream | logFile |
| std::map< std::string, Ipv4InterfaceContainer > | m_interfaces |
| std::map< std::string, LinkDetails * > | m_nodePairs |
| nlohmann::json | outputLogFile |
| uint32_t | showKeyAdded = 1 |
| uint32_t | showKeyServed = 1 |
| std::string CalculateAverageDelayBasedOnDistance | ( | uint32_t | distanceInMeters | ) |
Definition at line 887 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create().
Here is the call graph for this function:| void CreateOutputForCPU | ( | std::string | outputStatsName | ) |
Definition at line 531 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), m_nodePairs, and write_csv().
Here is the call graph for this function:| bool DoesLinkExist | ( | std::string | linkName, |
| Ipv4InterfaceContainer & | interfacesToApp | ||
| ) |
Definition at line 409 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), and m_interfaces.
Here is the call graph for this function:| void KeyConsumedLink | ( | std::string | context, |
| const uint32_t & | srcNodeId, | ||
| const uint32_t & | dstNodeId, | ||
| const uint32_t & | amountInBits | ||
| ) |
Keys fetched from qkdBuffers for transformation before delivery to end-user application.
Definition at line 259 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), outputLogFile, and showKeyAdded.
Here is the call graph for this function:| void KeyGenerated | ( | std::string | context, |
| const std::string & | appId, | ||
| const std::string & | keyId, | ||
| const uint32_t & | amountInBits | ||
| ) |
Definition at line 221 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), outputLogFile, and showKeyAdded.
Here is the call graph for this function:| void KeyServed | ( | std::string | context, |
| const std::string & | appId, | ||
| const std::string & | keyId, | ||
| const uint32_t & | amountInBits | ||
| ) |
Keys served from KMS to end-user application.
Definition at line 300 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), outputLogFile, and showKeyServed.
Here is the call graph for this function:Definition at line 426 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), and m_nodePairs.
Here is the call graph for this function:| std::string outputFileType | ( | "json" | ) |
Referenced by KeyConsumedLink(), KeyGenerated(), KeyServed(), ReceivedPacketFromKMS(), RelayKeyTrace(), SentPacket(), SentPacketSig(), and SentPacketToKMS().
Here is the caller graph for this function:| void Ratio | ( | std::string | outputStatsName, |
| uint32_t | cpuCounter | ||
| ) |
Definition at line 628 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), m_nodePairs, nodes, and read_csv().
Here is the call graph for this function:| std::vector< std::pair< std::string, std::vector< uint32_t > > > read_csv | ( | std::string | filename | ) |
Definition at line 156 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create().
Referenced by Ratio().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 433 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), and m_nodePairs.
Here is the call graph for this function:| void ReceivedPacketFromKMS | ( | std::string | context, |
| const std::string & | appId, | ||
| Ptr< const Packet > | p | ||
| ) |
Definition at line 503 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), outputLogFile, and showKeyServed.
Here is the call graph for this function:Definition at line 467 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), and m_nodePairs.
Here is the call graph for this function:| void RelayKeyTrace | ( | std::string | context, |
| const uint32_t & | nodeId, | ||
| const uint32_t & | srcNodeId, | ||
| const uint32_t & | dstNodeId, | ||
| const uint32_t & | amountInBits | ||
| ) |
Definition at line 341 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), outputLogFile, and showKeyAdded.
Here is the call graph for this function:Definition at line 383 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), and outputLogFile.
Here is the call graph for this function:Definition at line 441 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), and outputLogFile.
Here is the call graph for this function:Definition at line 475 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create(), ns3::Time::GetSeconds(), logFile, m_nodePairs, ns3::Simulator::Now(), outputFileType(), outputLogFile, and showKeyAdded.
Here is the call graph for this function:| void write_csv | ( | std::string | filename, |
| std::vector< std::pair< std::string, std::vector< uint32_t > > > | dataset | ||
| ) |
Definition at line 120 of file examples_qkd_etsi_combined_input.cc.
References ns3::Create().
Referenced by CreateOutputForCPU().
Here is the call graph for this function:
Here is the caller graph for this function:| std::ofstream logFile |
Definition at line 52 of file examples_qkd_etsi_combined_input.cc.
Referenced by KeyConsumedLink(), KeyGenerated(), KeyServed(), ReceivedPacketFromKMS(), RelayKeyTrace(), SentPacket(), SentPacketSig(), and SentPacketToKMS().
| std::map<std::string, Ipv4InterfaceContainer> m_interfaces |
Definition at line 49 of file examples_qkd_etsi_combined_input.cc.
Referenced by DoesLinkExist(), ns3::Ipv4L3ClickProtocol::Receive(), ns3::Ipv4L3Protocol::Receive(), and ns3::Ipv6L3Protocol::Receive().
| std::map<std::string, LinkDetails*> m_nodePairs |
Definition at line 117 of file examples_qkd_etsi_combined_input.cc.
Referenced by CreateOutputForCPU(), KeyConsumedLink(), KeyGenerated(), KeyServed(), MissedSendPacketCall(), Ratio(), ReceivedPacket(), ReceivedPacketFromKMS(), ReceivedPacketSig(), RelayKeyTrace(), SentPacket(), SentPacketSig(), and SentPacketToKMS().
| nlohmann::json outputLogFile |
Definition at line 53 of file examples_qkd_etsi_combined_input.cc.
Referenced by KeyConsumedLink(), KeyGenerated(), KeyServed(), ReceivedPacketFromKMS(), RelayKeyTrace(), SentPacket(), SentPacketSig(), and SentPacketToKMS().
| uint32_t showKeyAdded = 1 |
Definition at line 47 of file examples_qkd_etsi_combined_input.cc.
Referenced by KeyConsumedLink(), KeyGenerated(), RelayKeyTrace(), and SentPacketToKMS().
| uint32_t showKeyServed = 1 |
Definition at line 48 of file examples_qkd_etsi_combined_input.cc.
Referenced by KeyServed(), and ReceivedPacketFromKMS().