A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::QKDPostprocessingApplication Class Reference

QKDPostprocessingApplication is a class used to generate QKD key in key establishment process. More...

#include "qkd-postprocessing-application.h"

+ Inheritance diagram for ns3::QKDPostprocessingApplication:
+ Collaboration diagram for ns3::QKDPostprocessingApplication:

Classes

struct  AddressHash
 Hashing for the Address class. More...
 

Public Member Functions

 QKDPostprocessingApplication ()
 
 ~QKDPostprocessingApplication () override
 
std::list< Ptr< Socket > > GetAcceptedSockets () const
 
Ptr< NodeGetDst ()
 pointer to associated destination node
 
std::string GetId ()
 Get QKD module ID.
 
Time GetLastAckTime ()
 
Ptr< SocketGetListeningSocket () const
 
std::string GetPeerId ()
 Get matching QKD module ID.
 
Ptr< SocketGetSendSocket () const
 
Ptr< SocketGetSinkSocket () const
 set the sink socket
 
Ptr< NodeGetSrc ()
 pointer to associated source node
 
uint32_t GetTotalRx () const
 
void SetDst (Ptr< Node >)
 
void SetId (std::string id)
 Set QKD module ID.
 
void SetId (UUID id)
 Set QKD module ID.
 
void SetPeerId (std::string id)
 Set matching QKD module ID.
 
void SetPeerId (UUID id)
 Set matching QKD module ID.
 
void SetSiftingSocket (std::string type, Ptr< Socket > socket)
 
void SetSocket (std::string type, Ptr< Socket > socket, bool isMaster)
 
void SetSrc (Ptr< Node >)
 
- Public Member Functions inherited from ns3::Application
 Application ()
 
 ~Application () override
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this Application object.
 
Ptr< NodeGetNode () const
 
void SetNode (Ptr< Node > node)
 
void SetStartTime (Time start)
 Specify application start time.
 
void SetStopTime (Time stop)
 Specify application stop time.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Application
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
- Protected Member Functions inherited from ns3::Application
void DoInitialize () override
 Initialize() implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Member Functions

void ConnectionFailed (Ptr< Socket > socket)
 
void ConnectionFailedKMS (Ptr< Socket > socket)
 
void ConnectionFailedSifting (Ptr< Socket > socket)
 
void ConnectionSucceeded (Ptr< Socket > socket)
 
void ConnectionSucceededKMS (Ptr< Socket > socket)
 
void ConnectionSucceededSifting (Ptr< Socket > socket)
 
void DataSend (Ptr< Socket > s, uint32_t)
 
void DataSendKMS (Ptr< Socket > s, uint32_t)
 
void GenerateRandomKeyId ()
 Generate Random Seed Used to Generate Key Values.
 
std::string GenerateRandomString (const int len)
 Internal help function.
 
std::string GetStringAddress (Address m_address)
 Obtain IPv4 address in string type.
 
void HandleAccept (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection.
 
void HandleAcceptKMS (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection from KMS.
 
void HandleAcceptQiskit (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection.
 
void HandleAcceptSifting (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection.
 
void HandlePeerClose (Ptr< Socket > socket)
 Handle an connection close.
 
void HandlePeerCloseKMS (Ptr< Socket > socket)
 Handle an connection close.
 
void HandlePeerCloseQiskit (Ptr< Socket > socket)
 Handle an connection close.
 
void HandlePeerError (Ptr< Socket > socket)
 Handle an connection error KMS.
 
void HandlePeerErrorKMS (Ptr< Socket > socket)
 Handle an connection error KMS.
 
void HandlePeerErrorQiskit (Ptr< Socket > socket)
 Handle an connection error KMS.
 
void HandleRead (Ptr< Socket > socket)
 Handle a packet received by the application.
 
void HandleReadKMS (Ptr< Socket > socket)
 Handle a packet received by the application from KMS.
 
void HandleReadQiskit (Ptr< Socket > socket)
 Handle a packet received by the application.
 
void HandleReadSifting (Ptr< Socket > socket)
 Handle a packet received by the application.
 
void PacketReceived (const Ptr< Packet > &p, const Address &from, Ptr< Socket > socket)
 
void PrepareOutput (std::string value, std::string action)
 Help function to prepare output values.
 
void ProcessIncomingPacket (Ptr< Packet > packet)
 Process data received.
 
void ProcessQiskitRequest (HTTPMessage headerIn, Ptr< Packet > packet, Ptr< Socket > socket)
 
void RegisterAckTime (Time oldRtt, Time newRtt)
 Callback for ack messages.
 
void ResetCounter ()
 After completing post-processing round, reset counters.
 
void ScheduleNextReset ()
 Schedule reset of post-processing round.
 
void SendData ()
 Schedule data to be sent.
 
void SendPacket (Ptr< Packet > packet)
 Send packet to the socket.
 
void SendSiftingPacket ()
 Send SIFTING packet to the socket.
 
void StartApplication () override
 Called at time specified by Start.
 
void StopApplication () override
 Called at time specified by Stop.
 
void StoreKey (std::string keyId, std::string keyValue)
 Store generated key at KMS.
 

Private Attributes

std::unordered_map< Address, Ptr< Packet >, AddressHashm_buffer
 Buffer for received packets(TCP segmentation)
 
bool m_connected
 Connection Status.
 
DataRate m_dataRate
 Rate that data is generatedm_pktSize.
 
Ptr< Nodem_dst
 
Ptr< QKDEncryptorm_encryptor
 
DataRate m_keyRate
 QKD Key rate.
 
uint32_t m_keySize
 KeyRate of the QKDlink.
 
Address m_kms
 
Time m_lastAck
 
std::string m_lastUUID
 The latest UUID of the key.
 
Address m_local
 Local address to bind to.
 
Address m_local_sifting
 Local address for sifting to bind to.
 
bool m_master
 Alice(1) or Bob(0)
 
std::string m_matching_module_id
 Unique UUID of matching QKD module.
 
uint32_t m_maxPackets_sifting
 Limitation for the number of sifting packets.
 
std::string m_module_id
 Unique UUID of QKD module.
 
uint32_t m_packetNumber
 
uint32_t m_packetNumber_sifting
 How many sifting packets have been sent.
 
Address m_peer
 Peer address.
 
Address m_peer_sifting
 Peer address for sifting.
 
uint32_t m_pktSize
 Size of packets.
 
uint32_t m_ppId
 
Ptr< UniformRandomVariablem_random
 
uint64_t m_randomSeed
 Random seed used when generating key values.
 
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
 Traced Callback: received packets, source address.
 
TracedCallback< Ptr< const Packet >, const Address & > m_rxTraceKMS
 
EventId m_sendEvent
 Event id of pending "send packet" event.
 
Ptr< Socketm_sendSocket
 IMITATE post-processing traffic(CASCADE, PRIVACY AMPLIFICATION and etc.
 
Ptr< Socketm_sendSocket_sifting
 Sockets used for SIFTING.
 
Ptr< Socketm_sendSocketKMS
 Sockets to talk with LKMS.
 
Ptr< Socketm_sinkSocket
 Associated socket.
 
Ptr< Socketm_sinkSocket_sifting
 Associated socket for sifting.
 
Ptr< Socketm_sinkSocketKMS
 Associated socket.
 
std::list< Ptr< Socket > > m_sinkSocketList
 the accepted sockets
 
Ptr< Socketm_sinkSocketQiskit
 Associated socket.
 
Ptr< Nodem_src
 
TypeId m_tid
 
TypeId m_tidSifting
 
uint32_t m_totalRx
 Total bytes received.
 
TracedCallback< Ptr< const Packet > > m_txTrace
 
TracedCallback< Ptr< const Packet > > m_txTraceKMS
 

Static Private Attributes

static uint32_t m_applicationCounts = 0
 

Additional Inherited Members

- Public Types inherited from ns3::Application
typedef void(* DelayAddressCallback) (const Time &delay, const Address &from)
 Common callback signature for packet delay and address.
 
typedef void(* StateTransitionCallback) (const std::string &oldState, const std::string &newState)
 Common signature used by callbacks to application's state transition trace source.
 
- Protected Attributes inherited from ns3::Application
Ptr< Nodem_node
 The node that this application is installed on.
 
EventId m_startEvent
 The event that will fire at m_startTime to start the application.
 
Time m_startTime
 The simulation time that the application will start.
 
EventId m_stopEvent
 The event that will fire at m_stopTime to end the application.
 
Time m_stopTime
 The simulation time that the application will end.
 

Detailed Description

QKDPostprocessingApplication is a class used to generate QKD key in key establishment process.

QKD protocols are used to securely generate new key material. Although there are different types of QKD protocols, each of them requires raw material processing through post-processing applications implementing the following steps: the extraction of the raw key(sifting), error rate estimation, key reconciliation, privacy amplification and authentication. However, since the QKDNetSim focus is primarily QKD network organization, management and network traffic, one uses QKD post-processing application to imitate the network activity of a QKD protocol. The goal was to build an application that credibly imitates the traffic from the existing post-processing applications to reduce the simulation time and computational resources. Such implementation of QKD post-processing allows analyzing the influence of various parameters on the state of the network, such as: the impact of key generation rate, the impact of traffic volume of the reconciled protocol on network capacity and others.

Config Paths

ns3::QKDPostprocessingApplication is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/ApplicationList/[i]/$ns3::QKDPostprocessingApplication"

Attributes

  • DataRate: The average data rate of communication.
    • Set with class: ns3::DataRateValue
    • Underlying type: DataRate
    • Initial value: 650000bps
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • KeyRate: The average QKD key rate.
    • Set with class: ns3::DataRateValue
    • Underlying type: DataRate
    • Initial value: 100000bps
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • KeySize: The amount of data to be added to QKD Buffer(in bytes).
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1:4294967295
    • Initial value: 8092
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Local: The local address on which to bind the listening socket.
    • Set with class: ns3::AddressValue
    • Underlying type: Address
    • Initial value:
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Local_KMS: The local KSM address.
    • Set with class: ns3::AddressValue
    • Underlying type: Address
    • Initial value:
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Local_Sifting: The local address on which to bind the listening sifting socket.
    • Set with class: ns3::AddressValue
    • Underlying type: Address
    • Initial value:
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • MaxSiftingPackets: The size of packets sent in sifting state
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1:4294967295
    • Initial value: 5
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • PacketSize: The size of packets sent in post-processing state
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1:4294967295
    • Initial value: 320
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Protocol: The type of protocol to use(TCP by default).
  • ProtocolSifting: The type of protocol to use for sifting(UDP by default).
  • Remote: The address of the destination
    • Set with class: ns3::AddressValue
    • Underlying type: Address
    • Initial value:
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • Remote_Sifting: The address of the destination for sifting traffic.
    • Set with class: ns3::AddressValue
    • Underlying type: Address
    • Initial value:
    • Flags: constructwriteread
    • Support level: SUPPORTED

Attributes defined in parent class ns3::Application

  • StartTime: Time at which the application will start
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED
  • StopTime: Time at which the application will stop
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
    • Support level: SUPPORTED

TraceSources

  • Rx: A packet has been received
    • Callback signature: ns3::QKDPostprocessingApplication::Rx
    • Support level: SUPPORTED
  • RxKMS: A packet has been received from LKMS
    • Callback signature: ns3::QKDPostprocessingApplication::RxLKMS
    • Support level: SUPPORTED
  • Tx: A new packet is created and is sent
    • Callback signature: ns3::QKDPostprocessingApplication::Tx
    • Support level: SUPPORTED
  • TxKMS: A new packet is created and is sent to LKMS
    • Callback signature: ns3::QKDPostprocessingApplication::TxKMS
    • Support level: SUPPORTED

Group: Applications

Size of this type is 696 bytes (on a 64-bit architecture).

Definition at line 72 of file qkd-postprocessing-application.h.

Constructor & Destructor Documentation

◆ QKDPostprocessingApplication()

ns3::QKDPostprocessingApplication::QKDPostprocessingApplication ( )

◆ ~QKDPostprocessingApplication()

ns3::QKDPostprocessingApplication::~QKDPostprocessingApplication ( )
override

Definition at line 123 of file qkd-postprocessing-application.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ ConnectionFailed()

void ns3::QKDPostprocessingApplication::ConnectionFailed ( Ptr< Socket socket)
private

Definition at line 964 of file qkd-postprocessing-application.cc.

◆ ConnectionFailedKMS()

void ns3::QKDPostprocessingApplication::ConnectionFailedKMS ( Ptr< Socket socket)
private

Definition at line 984 of file qkd-postprocessing-application.cc.

◆ ConnectionFailedSifting()

void ns3::QKDPostprocessingApplication::ConnectionFailedSifting ( Ptr< Socket socket)
private

◆ ConnectionSucceeded()

void ns3::QKDPostprocessingApplication::ConnectionSucceeded ( Ptr< Socket socket)
private

Definition at line 932 of file qkd-postprocessing-application.cc.

◆ ConnectionSucceededKMS()

void ns3::QKDPostprocessingApplication::ConnectionSucceededKMS ( Ptr< Socket socket)
private

Definition at line 977 of file qkd-postprocessing-application.cc.

◆ ConnectionSucceededSifting()

void ns3::QKDPostprocessingApplication::ConnectionSucceededSifting ( Ptr< Socket socket)
private

Definition at line 957 of file qkd-postprocessing-application.cc.

◆ DataSend()

void ns3::QKDPostprocessingApplication::DataSend ( Ptr< Socket s,
uint32_t  value 
)
private

Definition at line 971 of file qkd-postprocessing-application.cc.

◆ DataSendKMS()

void ns3::QKDPostprocessingApplication::DataSendKMS ( Ptr< Socket s,
uint32_t  value 
)
private

Definition at line 991 of file qkd-postprocessing-application.cc.

◆ DoDispose()

void ns3::QKDPostprocessingApplication::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Application.

Definition at line 220 of file qkd-postprocessing-application.cc.

References ns3::Simulator::Cancel(), ns3::Application::DoDispose(), m_sendEvent, m_sendSocket, m_sendSocket_sifting, m_sinkSocket, m_sinkSocket_sifting, m_sinkSocketList, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GenerateRandomKeyId()

void ns3::QKDPostprocessingApplication::GenerateRandomKeyId ( )
private

Generate Random Seed Used to Generate Key Values.

Definition at line 143 of file qkd-postprocessing-application.cc.

References m_random, and m_randomSeed.

Referenced by QKDPostprocessingApplication().

+ Here is the caller graph for this function:

◆ GenerateRandomString()

std::string ns3::QKDPostprocessingApplication::GenerateRandomString ( const int  len)
private

Internal help function.

Definition at line 1011 of file qkd-postprocessing-application.cc.

◆ GetAcceptedSockets()

std::list< Ptr< Socket > > ns3::QKDPostprocessingApplication::GetAcceptedSockets ( ) const
Returns
list of pointers to accepted sockets

Definition at line 177 of file qkd-postprocessing-application.cc.

References m_sinkSocketList, and NS_LOG_FUNCTION.

◆ GetDst()

Ptr< Node > ns3::QKDPostprocessingApplication::GetDst ( )

pointer to associated destination node

Returns
Ptr<Node> pointer to associated destination node

Definition at line 166 of file qkd-postprocessing-application.cc.

References m_dst.

◆ GetId()

std::string ns3::QKDPostprocessingApplication::GetId ( )
inline

Get QKD module ID.

Returns
string QKD module ID

Definition at line 166 of file qkd-postprocessing-application.h.

References m_module_id.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ GetLastAckTime()

Time ns3::QKDPostprocessingApplication::GetLastAckTime ( )

Definition at line 1004 of file qkd-postprocessing-application.cc.

◆ GetListeningSocket()

Ptr< Socket > ns3::QKDPostprocessingApplication::GetListeningSocket ( ) const
Returns
pointer to listening socket

◆ GetPeerId()

std::string ns3::QKDPostprocessingApplication::GetPeerId ( )
inline

Get matching QKD module ID.

Returns
string QKD module ID

Definition at line 190 of file qkd-postprocessing-application.h.

References m_matching_module_id.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ GetSendSocket()

Ptr< Socket > ns3::QKDPostprocessingApplication::GetSendSocket ( ) const
Returns
pointer to associated socket

Definition at line 191 of file qkd-postprocessing-application.cc.

References m_sendSocket, and NS_LOG_FUNCTION.

◆ GetSinkSocket()

Ptr< Socket > ns3::QKDPostprocessingApplication::GetSinkSocket ( ) const

set the sink socket

Definition at line 184 of file qkd-postprocessing-application.cc.

References m_sinkSocket, and NS_LOG_FUNCTION.

◆ GetSrc()

Ptr< Node > ns3::QKDPostprocessingApplication::GetSrc ( )

pointer to associated source node

Returns
Ptr<Node> pointer to associated source node

Definition at line 155 of file qkd-postprocessing-application.cc.

References m_src.

◆ GetStringAddress()

std::string ns3::QKDPostprocessingApplication::GetStringAddress ( Address  m_address)
private

Obtain IPv4 address in string type.

Parameters
m_addressinput Address type
Returns
string IPv4 address as string

Definition at line 575 of file qkd-postprocessing-application.cc.

◆ GetTotalRx()

uint32_t ns3::QKDPostprocessingApplication::GetTotalRx ( ) const
Returns
the total bytes received in this sink app

Definition at line 148 of file qkd-postprocessing-application.cc.

References m_totalRx, and NS_LOG_FUNCTION.

◆ GetTypeId()

◆ HandleAccept()

void ns3::QKDPostprocessingApplication::HandleAccept ( Ptr< Socket socket,
const Address from 
)
private

Handle an incoming connection.

Parameters
socketthe incoming connection socket
fromthe address the connection is from

Definition at line 902 of file qkd-postprocessing-application.cc.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ HandleAcceptKMS()

void ns3::QKDPostprocessingApplication::HandleAcceptKMS ( Ptr< Socket socket,
const Address from 
)
private

Handle an incoming connection from KMS.

Parameters
socketthe incoming connection socket
fromthe address the connection is from

Definition at line 910 of file qkd-postprocessing-application.cc.

◆ HandleAcceptQiskit()

void ns3::QKDPostprocessingApplication::HandleAcceptQiskit ( Ptr< Socket socket,
const Address from 
)
private

Handle an incoming connection.

Parameters
socketthe incoming connection socket
fromthe address the connection is from

Definition at line 917 of file qkd-postprocessing-application.cc.

◆ HandleAcceptSifting()

void ns3::QKDPostprocessingApplication::HandleAcceptSifting ( Ptr< Socket socket,
const Address from 
)
private

Handle an incoming connection.

Parameters
socketthe incoming connection socket
fromthe address the connection is from

Definition at line 924 of file qkd-postprocessing-application.cc.

◆ HandlePeerClose()

void ns3::QKDPostprocessingApplication::HandlePeerClose ( Ptr< Socket socket)
private

Handle an connection close.

Parameters
socketthe connected socket

Definition at line 865 of file qkd-postprocessing-application.cc.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ HandlePeerCloseKMS()

void ns3::QKDPostprocessingApplication::HandlePeerCloseKMS ( Ptr< Socket socket)
private

Handle an connection close.

Parameters
socketthe connected socket

Definition at line 871 of file qkd-postprocessing-application.cc.

◆ HandlePeerCloseQiskit()

void ns3::QKDPostprocessingApplication::HandlePeerCloseQiskit ( Ptr< Socket socket)
private

Handle an connection close.

Parameters
socketthe connected socket

Definition at line 877 of file qkd-postprocessing-application.cc.

◆ HandlePeerError()

void ns3::QKDPostprocessingApplication::HandlePeerError ( Ptr< Socket socket)
private

Handle an connection error KMS.

Parameters
socketthe connected socket

Definition at line 883 of file qkd-postprocessing-application.cc.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ HandlePeerErrorKMS()

void ns3::QKDPostprocessingApplication::HandlePeerErrorKMS ( Ptr< Socket socket)
private

Handle an connection error KMS.

Parameters
socketthe connected socket

Definition at line 896 of file qkd-postprocessing-application.cc.

◆ HandlePeerErrorQiskit()

void ns3::QKDPostprocessingApplication::HandlePeerErrorQiskit ( Ptr< Socket socket)
private

Handle an connection error KMS.

Parameters
socketthe connected socket

Definition at line 889 of file qkd-postprocessing-application.cc.

◆ HandleRead()

void ns3::QKDPostprocessingApplication::HandleRead ( Ptr< Socket socket)
private

Handle a packet received by the application.

Parameters
socketthe receiving socket

Definition at line 765 of file qkd-postprocessing-application.cc.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ HandleReadKMS()

void ns3::QKDPostprocessingApplication::HandleReadKMS ( Ptr< Socket socket)
private

Handle a packet received by the application from KMS.

Parameters
socketthe receiving socket

Definition at line 602 of file qkd-postprocessing-application.cc.

◆ HandleReadQiskit()

void ns3::QKDPostprocessingApplication::HandleReadQiskit ( Ptr< Socket socket)
private

Handle a packet received by the application.

Parameters
socketthe receiving socket

Definition at line 631 of file qkd-postprocessing-application.cc.

◆ HandleReadSifting()

void ns3::QKDPostprocessingApplication::HandleReadSifting ( Ptr< Socket socket)
private

Handle a packet received by the application.

Parameters
socketthe receiving socket

Definition at line 851 of file qkd-postprocessing-application.cc.

◆ PacketReceived()

void ns3::QKDPostprocessingApplication::PacketReceived ( const Ptr< Packet > &  p,
const Address from,
Ptr< Socket socket 
)
private

Definition at line 649 of file qkd-postprocessing-application.cc.

◆ PrepareOutput()

void ns3::QKDPostprocessingApplication::PrepareOutput ( std::string  value,
std::string  action 
)
private

Help function to prepare output values.

Parameters
stringvalue
stringaction

Definition at line 494 of file qkd-postprocessing-application.cc.

◆ ProcessIncomingPacket()

void ns3::QKDPostprocessingApplication::ProcessIncomingPacket ( Ptr< Packet packet)
private

Process data received.

Parameters
Packetto be processed

POST PROCESSING

Definition at line 798 of file qkd-postprocessing-application.cc.

◆ ProcessQiskitRequest()

void ns3::QKDPostprocessingApplication::ProcessQiskitRequest ( HTTPMessage  headerIn,
Ptr< Packet packet,
Ptr< Socket socket 
)
private

Definition at line 695 of file qkd-postprocessing-application.cc.

◆ RegisterAckTime()

void ns3::QKDPostprocessingApplication::RegisterAckTime ( Time  oldRtt,
Time  newRtt 
)
private

Callback for ack messages.

Definition at line 997 of file qkd-postprocessing-application.cc.

◆ ResetCounter()

void ns3::QKDPostprocessingApplication::ResetCounter ( )
private

After completing post-processing round, reset counters.

Definition at line 417 of file qkd-postprocessing-application.cc.

◆ ScheduleNextReset()

void ns3::QKDPostprocessingApplication::ScheduleNextReset ( )
private

Schedule reset of post-processing round.

Definition at line 407 of file qkd-postprocessing-application.cc.

◆ SendData()

void ns3::QKDPostprocessingApplication::SendData ( )
private

Schedule data to be sent.

Definition at line 430 of file qkd-postprocessing-application.cc.

◆ SendPacket()

void ns3::QKDPostprocessingApplication::SendPacket ( Ptr< Packet packet)
private

Send packet to the socket.

Parameters
Packetto be sent

Definition at line 525 of file qkd-postprocessing-application.cc.

◆ SendSiftingPacket()

void ns3::QKDPostprocessingApplication::SendSiftingPacket ( )
private

Send SIFTING packet to the socket.

Parameters
Packetto be sent

Definition at line 586 of file qkd-postprocessing-application.cc.

◆ SetDst()

void ns3::QKDPostprocessingApplication::SetDst ( Ptr< Node node)
Returns
Set the destination node
Parameters
<Ptr>destinationNode

Definition at line 171 of file qkd-postprocessing-application.cc.

References m_dst, and NS_LOG_FUNCTION.

◆ SetId() [1/2]

void ns3::QKDPostprocessingApplication::SetId ( std::string  id)
inline

Set QKD module ID.

Parameters
idstring ID

Definition at line 158 of file qkd-postprocessing-application.h.

References m_module_id.

◆ SetId() [2/2]

void ns3::QKDPostprocessingApplication::SetId ( UUID  id)
inline

Set QKD module ID.

Parameters
idUUID ID

Definition at line 150 of file qkd-postprocessing-application.h.

References m_module_id.

◆ SetPeerId() [1/2]

void ns3::QKDPostprocessingApplication::SetPeerId ( std::string  id)
inline

Set matching QKD module ID.

Parameters
idstring ID

Definition at line 182 of file qkd-postprocessing-application.h.

References m_matching_module_id.

◆ SetPeerId() [2/2]

void ns3::QKDPostprocessingApplication::SetPeerId ( UUID  id)
inline

Set matching QKD module ID.

Parameters
idUUID ID

Definition at line 174 of file qkd-postprocessing-application.h.

References m_matching_module_id.

◆ SetSiftingSocket()

void ns3::QKDPostprocessingApplication::SetSiftingSocket ( std::string  type,
Ptr< Socket socket 
)
Parameters
socketpointer to socket to be set

Definition at line 210 of file qkd-postprocessing-application.cc.

References m_sendSocket_sifting, m_sinkSocket_sifting, and NS_LOG_FUNCTION.

◆ SetSocket()

void ns3::QKDPostprocessingApplication::SetSocket ( std::string  type,
Ptr< Socket socket,
bool  isMaster 
)
Parameters
socketpointer to socket to be set

Definition at line 198 of file qkd-postprocessing-application.cc.

References ns3::Create(), m_master, m_sendSocket, m_sinkSocket, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetSrc()

void ns3::QKDPostprocessingApplication::SetSrc ( Ptr< Node node)
Returns
Set the source node
Parameters
<Ptr>sourceNode

Definition at line 160 of file qkd-postprocessing-application.cc.

References m_src, and NS_LOG_FUNCTION.

◆ StartApplication()

◆ StopApplication()

void ns3::QKDPostprocessingApplication::StopApplication ( )
overrideprivatevirtual

Called at time specified by Stop.

Reimplemented from ns3::Application.

Definition at line 383 of file qkd-postprocessing-application.cc.

◆ StoreKey()

void ns3::QKDPostprocessingApplication::StoreKey ( std::string  keyId,
std::string  keyValue 
)
private

Store generated key at KMS.

Parameters
keyIdunique key identifier
keyValuegenerated key in byte format

Definition at line 535 of file qkd-postprocessing-application.cc.

Member Data Documentation

◆ m_applicationCounts

uint32_t ns3::QKDPostprocessingApplication::m_applicationCounts = 0
staticprivate

Definition at line 385 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_buffer

std::unordered_map<Address, Ptr<Packet>, AddressHash> ns3::QKDPostprocessingApplication::m_buffer
private

Buffer for received packets(TCP segmentation)

Definition at line 437 of file qkd-postprocessing-application.h.

◆ m_connected

bool ns3::QKDPostprocessingApplication::m_connected
private

Connection Status.

Definition at line 418 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_dataRate

DataRate ns3::QKDPostprocessingApplication::m_dataRate
private

Rate that data is generatedm_pktSize.

Definition at line 427 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_dst

Ptr<Node> ns3::QKDPostprocessingApplication::m_dst
private

Definition at line 390 of file qkd-postprocessing-application.h.

Referenced by GetDst(), and SetDst().

◆ m_encryptor

Ptr<QKDEncryptor> ns3::QKDPostprocessingApplication::m_encryptor
private

Definition at line 462 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_keyRate

DataRate ns3::QKDPostprocessingApplication::m_keyRate
private

QKD Key rate.

Definition at line 428 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_keySize

uint32_t ns3::QKDPostprocessingApplication::m_keySize
private

KeyRate of the QKDlink.

Definition at line 417 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_kms

Address ns3::QKDPostprocessingApplication::m_kms
private

Definition at line 415 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_lastAck

Time ns3::QKDPostprocessingApplication::m_lastAck
private

Definition at line 422 of file qkd-postprocessing-application.h.

◆ m_lastUUID

std::string ns3::QKDPostprocessingApplication::m_lastUUID
private

The latest UUID of the key.

Definition at line 436 of file qkd-postprocessing-application.h.

◆ m_local

Address ns3::QKDPostprocessingApplication::m_local
private

Local address to bind to.

Definition at line 411 of file qkd-postprocessing-application.h.

Referenced by GetTypeId(), and StartApplication().

◆ m_local_sifting

Address ns3::QKDPostprocessingApplication::m_local_sifting
private

Local address for sifting to bind to.

Definition at line 414 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_master

bool ns3::QKDPostprocessingApplication::m_master
private

Alice(1) or Bob(0)

Definition at line 419 of file qkd-postprocessing-application.h.

Referenced by SetSocket().

◆ m_matching_module_id

std::string ns3::QKDPostprocessingApplication::m_matching_module_id
private

Unique UUID of matching QKD module.

Definition at line 434 of file qkd-postprocessing-application.h.

Referenced by GetPeerId(), SetPeerId(), and SetPeerId().

◆ m_maxPackets_sifting

uint32_t ns3::QKDPostprocessingApplication::m_maxPackets_sifting
private

Limitation for the number of sifting packets.

Definition at line 447 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_module_id

std::string ns3::QKDPostprocessingApplication::m_module_id
private

Unique UUID of QKD module.

Definition at line 433 of file qkd-postprocessing-application.h.

Referenced by GetId(), SetId(), and SetId().

◆ m_packetNumber

uint32_t ns3::QKDPostprocessingApplication::m_packetNumber
private

Definition at line 420 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_packetNumber_sifting

uint32_t ns3::QKDPostprocessingApplication::m_packetNumber_sifting
private

How many sifting packets have been sent.

Definition at line 446 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_peer

Address ns3::QKDPostprocessingApplication::m_peer
private

Peer address.

Definition at line 410 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_peer_sifting

Address ns3::QKDPostprocessingApplication::m_peer_sifting
private

Peer address for sifting.

Definition at line 413 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_pktSize

uint32_t ns3::QKDPostprocessingApplication::m_pktSize
private

Size of packets.

Definition at line 429 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_ppId

uint32_t ns3::QKDPostprocessingApplication::m_ppId
private

Definition at line 387 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_random

Ptr<UniformRandomVariable> ns3::QKDPostprocessingApplication::m_random
private

◆ m_randomSeed

uint64_t ns3::QKDPostprocessingApplication::m_randomSeed
private

Random seed used when generating key values.

Definition at line 448 of file qkd-postprocessing-application.h.

Referenced by GenerateRandomKeyId().

◆ m_rxTrace

TracedCallback<Ptr<const Packet>, const Address &> ns3::QKDPostprocessingApplication::m_rxTrace
private

Traced Callback: received packets, source address.

Definition at line 440 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_rxTraceKMS

TracedCallback<Ptr<const Packet>, const Address &> ns3::QKDPostprocessingApplication::m_rxTraceKMS
private

Definition at line 443 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_sendEvent

EventId ns3::QKDPostprocessingApplication::m_sendEvent
private

Event id of pending "send packet" event.

Definition at line 425 of file qkd-postprocessing-application.h.

Referenced by DoDispose().

◆ m_sendSocket

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sendSocket
private

IMITATE post-processing traffic(CASCADE, PRIVACY AMPLIFICATION and etc.

) Associated socket

Definition at line 395 of file qkd-postprocessing-application.h.

Referenced by DoDispose(), GetSendSocket(), SetSocket(), and StartApplication().

◆ m_sendSocket_sifting

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sendSocket_sifting
private

Sockets used for SIFTING.

Associated socket for sifting

Definition at line 400 of file qkd-postprocessing-application.h.

Referenced by DoDispose(), and SetSiftingSocket().

◆ m_sendSocketKMS

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sendSocketKMS
private

Sockets to talk with LKMS.

Associated socket

Definition at line 405 of file qkd-postprocessing-application.h.

◆ m_sinkSocket

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sinkSocket
private

Associated socket.

Definition at line 396 of file qkd-postprocessing-application.h.

Referenced by DoDispose(), GetSinkSocket(), SetSocket(), and StartApplication().

◆ m_sinkSocket_sifting

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sinkSocket_sifting
private

Associated socket for sifting.

Definition at line 401 of file qkd-postprocessing-application.h.

Referenced by DoDispose(), and SetSiftingSocket().

◆ m_sinkSocketKMS

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sinkSocketKMS
private

Associated socket.

Definition at line 406 of file qkd-postprocessing-application.h.

Referenced by StartApplication().

◆ m_sinkSocketList

std::list<Ptr<Socket> > ns3::QKDPostprocessingApplication::m_sinkSocketList
private

the accepted sockets

Definition at line 424 of file qkd-postprocessing-application.h.

Referenced by DoDispose(), and GetAcceptedSockets().

◆ m_sinkSocketQiskit

Ptr<Socket> ns3::QKDPostprocessingApplication::m_sinkSocketQiskit
private

Associated socket.

Definition at line 408 of file qkd-postprocessing-application.h.

◆ m_src

Ptr<Node> ns3::QKDPostprocessingApplication::m_src
private

Definition at line 389 of file qkd-postprocessing-application.h.

Referenced by GetSrc(), and SetSrc().

◆ m_tid

TypeId ns3::QKDPostprocessingApplication::m_tid
private

Definition at line 430 of file qkd-postprocessing-application.h.

Referenced by GetTypeId(), and StartApplication().

◆ m_tidSifting

TypeId ns3::QKDPostprocessingApplication::m_tidSifting
private

Definition at line 431 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_totalRx

uint32_t ns3::QKDPostprocessingApplication::m_totalRx
private

Total bytes received.

Definition at line 421 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication(), and GetTotalRx().

◆ m_txTrace

TracedCallback<Ptr<const Packet> > ns3::QKDPostprocessingApplication::m_txTrace
private

Definition at line 441 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_txTraceKMS

TracedCallback<Ptr<const Packet> > ns3::QKDPostprocessingApplication::m_txTraceKMS
private

Definition at line 444 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().


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