A Discrete-Event Network Simulator
API
ns3::QKDPostprocessingApplication Class Reference

#include "qkd-postprocessing-application.h"

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

Public Member Functions

 QKDPostprocessingApplication ()
 Constructor. More...
 
virtual ~QKDPostprocessingApplication ()
 Donstructor. More...
 
std::list< Ptr< Socket > > GetAcceptedSockets (void) const
 Get the list of the accepted sockets. More...
 
Ptr< NodeGetDst ()
 Get the destination node. More...
 
Time GetLastAckTime ()
 Get the timestamp of the last acknowledgement. More...
 
Ptr< SocketGetListeningSocket (void) const
 Get the listening socket. More...
 
Ptr< SocketGetSendSocket (void) const
 Get the send socket. More...
 
Ptr< SocketGetSinkSocket (void) const
 Get the sink socket. More...
 
Ptr< NodeGetSrc ()
 Get the source node. More...
 
uint32_t GetTotalRx () const
 Get the total amount of data received (in bytes). More...
 
void PrepareOutput (std::string value, std::string action)
 Prepare the output data. More...
 
void SetDst (Ptr< Node >)
 
void SetSiftingSocket (std::string type, Ptr< Socket > socket)
 Set the sifting socket. More...
 
void SetSocket (std::string type, Ptr< Socket > socket, bool isMaster)
 Set the socket. More...
 
void SetSrc (Ptr< Node >)
 Set the source node. More...
 
- Public Member Functions inherited from ns3::Application
 Application ()
 
virtual ~Application ()
 
Ptr< NodeGetNode () const
 
void SetNode (Ptr< Node > node)
 
void SetStartTime (Time start)
 Specify application start time. More...
 
void SetStopTime (Time stop)
 Specify application stop time. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

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

Protected Member Functions

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

Private Member Functions

void ConnectionFailed (Ptr< Socket > socket)
 Callback function after the connection to the peer application has failed. More...
 
void ConnectionFailedKMS (Ptr< Socket > socket)
 Callback function after the connection to the KMS has failed. More...
 
void ConnectionFailedSifting (Ptr< Socket > socket)
 Callback function after the sifting connection has failed. More...
 
void ConnectionSucceeded (Ptr< Socket > socket)
 Callback function after the connection to the peer application is complete. More...
 
void ConnectionSucceededKMS (Ptr< Socket > socket)
 Callback function after the connection to the KMS is complete. More...
 
void ConnectionSucceededSifting (Ptr< Socket > socket)
 Callback function after the sifting connection is complete. More...
 
void DataSend (Ptr< Socket > s, uint32_t)
 
void DataSendKMS (Ptr< Socket > s, uint32_t)
 
void GenerateRandomKeyId ()
 Generate a random seed that will be used to generate key values. More...
 
std::string GenerateRandomString (const int len)
 Generate a random string with a given length. More...
 
void HandleAccept (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection from the application. More...
 
void HandleAcceptKMS (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection from the KMS. More...
 
void HandleAcceptSifting (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection for the sifting. More...
 
void HandlePeerClose (Ptr< Socket > socket)
 Handle a connection close from the peer application. More...
 
void HandlePeerCloseKMS (Ptr< Socket > socket)
 Handle a connection close from the KMS. More...
 
void HandlePeerError (Ptr< Socket > socket)
 Handle a connection error from the peer application. More...
 
void HandlePeerErrorKMS (Ptr< Socket > socket)
 Handle a connection error from the KMS. More...
 
void HandleRead (Ptr< Socket > socket)
 Handle a packet received from the peer application. More...
 
void HandleReadKMS (Ptr< Socket > socket)
 Handle a packet received from the KMS. More...
 
void HandleReadSifting (Ptr< Socket > socket)
 Handle a sifting packet received from the application. More...
 
void ProcessIncomingPacket (Ptr< Packet > packet)
 Process data received. More...
 
void RegisterAckTime (Time oldRtt, Time newRtt)
 Callback for ack messages. More...
 
void ResetCounter ()
 Reset the counter after completing the post-processing round. More...
 
void ScheduleNextReset ()
 Schedule a reset of the post-processing round. More...
 
void SendData ()
 Schedule time slot to send data. More...
 
void SendPacket (Ptr< Packet > packet)
 Send the packet to the socket. More...
 
void SendPacketToKMS (Ptr< QKDKey > packet)
 Send the packet to the local KMS. More...
 
void SendSiftingPacket (void)
 Send the sifting packet to the socket. More...
 
void StartApplication (void)
 Start the post-processing application. More...
 
void StopApplication (void)
 Stop the post-processing application. More...
 

Private Attributes

std::string m_appId
 Random string marking the app ID. More...
 
bool m_connected
 Connection Status. More...
 
DataRate m_dataRate
 Rate that data is generatedm_pktSize. More...
 
Ptr< Nodem_dst
 The destination node. More...
 
uint64_t m_keyId
 ID counter of generated keys. More...
 
DataRate m_keyRate
 QKD Key rate. More...
 
uint32_t m_keySizeInBits
 KeyRate of the QKDlink. More...
 
Address m_kms
 
Time m_lastAck
 
std::string m_lastUUID
 The latest UUID of the key. More...
 
Address m_local
 Local address to bind to. More...
 
Address m_local_sifting
 Local address for sifting to bind to. More...
 
bool m_master
 Alice (1) or Bob (0) More...
 
uint32_t m_maxPackets_sifting
 Limitation for the number of sifting packets. More...
 
uint32_t m_packetNumber
 
uint32_t m_packetNumber_sifting
 How many sifting packets have been sent. More...
 
Address m_peer
 Peer address. More...
 
Address m_peer_sifting
 Peer address for sifting. More...
 
uint32_t m_pktSize
 Size of packets. More...
 
Ptr< UniformRandomVariablem_random
 The uniform random variable. More...
 
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
 Traced Callback: received packets, source address. More...
 
TracedCallback< Ptr< const Packet >, const Address & > m_rxTraceKMS
 
EventId m_sendEvent
 Event id of pending "send packet" event. More...
 
Ptr< Socketm_sendSocket
 IMITATE post-processing traffic (CASCADE, PRIVACY AMPLIFICATION and etc. More...
 
Ptr< Socketm_sendSocket_sifting
 Sockets used for SIFTING. More...
 
Ptr< Socketm_sendSocketKMS
 Sockets to talk with LKMS. More...
 
Ptr< Socketm_sinkSocket
 Associated socket. More...
 
Ptr< Socketm_sinkSocket_sifting
 Associated socket for sifting. More...
 
Ptr< Socketm_sinkSocketKMS
 Associated socket. More...
 
std::list< Ptr< Socket > > m_sinkSocketList
 the accepted sockets More...
 
Ptr< Nodem_src
 The source node. More...
 
TypeId m_tid
 
TypeId m_tidSifting
 
uint32_t m_totalRx
 Total bytes received
More...
 
TracedCallback< Ptr< const Packet > > m_txTrace
 
TracedCallback< Ptr< const Packet > > m_txTraceKMS
 

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. More...
 
typedef void(* StateTransitionCallback) (const std::string &oldState, const std::string &newState)
 Common signature used by callbacks to application's state transition trace source. More...
 
- Protected Attributes inherited from ns3::Application
Ptr< Nodem_node
 The node that this application is installed on. More...
 
EventId m_startEvent
 The event that will fire at m_startTime to start the application. More...
 
Time m_startTime
 The simulation time that the application will start. More...
 
EventId m_stopEvent
 The event that will fire at m_stopTime to end the application. More...
 
Time m_stopTime
 The simulation time that the application will end. More...
 

Detailed Description

Config Paths

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

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

Attributes

  • KeySizeInBits: The amount of data to be added to QKD Buffer (in bits).
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 8192
    • Flags: construct write read
  • KeyRate: The average QKD key rate in bps.
    • Set with class: DataRateValue
    • Underlying type: DataRate
    • Initial value: 1000bps
    • Flags: construct write read
  • DataRate: The average data rate of communication.
    • Set with class: DataRateValue
    • Underlying type: DataRate
    • Initial value: 650000bps
    • Flags: construct write read
  • PacketSize: The size of packets sent in post-processing state
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 320
    • Flags: construct write read
  • MaxSiftingPackets: The size of packets sent in sifting state
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 5
    • Flags: construct write read
  • 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: AddressValue
    • Underlying type: Address
    • Initial value: 00-00-00
    • Flags: construct write read
  • Local: The local address on which to bind the listening socket.
    • Set with class: AddressValue
    • Underlying type: Address
    • Initial value: 00-00-00
    • Flags: construct write read
  • Remote_Sifting: The address of the destination for sifting traffic.
    • Set with class: AddressValue
    • Underlying type: Address
    • Initial value: 00-00-00
    • Flags: construct write read
  • Local_Sifting: The local address on which to bind the listening sifting socket.
    • Set with class: AddressValue
    • Underlying type: Address
    • Initial value: 00-00-00
    • Flags: construct write read
  • Local_KMS: The local KSM address.
    • Set with class: AddressValue
    • Underlying type: Address
    • Initial value: 00-00-00
    • Flags: construct write read

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: construct write read
  • 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: construct write read

TraceSources

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

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

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

Constructor & Destructor Documentation

◆ QKDPostprocessingApplication()

ns3::QKDPostprocessingApplication::QKDPostprocessingApplication ( )

Constructor.

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

References GenerateRandomKeyId(), GenerateRandomString(), m_appId, m_connected, m_packetNumber, m_packetNumber_sifting, m_random, and m_totalRx.

+ Here is the call graph for this function:

◆ ~QKDPostprocessingApplication()

ns3::QKDPostprocessingApplication::~QKDPostprocessingApplication ( )
virtual

Donstructor.

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

References NS_LOG_FUNCTION.

Member Function Documentation

◆ ConnectionFailed()

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

Callback function after the connection to the peer application has failed.

Parameters
socketThe connected socket.

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

◆ ConnectionFailedKMS()

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

Callback function after the connection to the KMS has failed.

Parameters
socketThe connected socket.

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

◆ ConnectionFailedSifting()

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

Callback function after the sifting connection has failed.

Parameters
socketThe connected socket.

◆ ConnectionSucceeded()

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

Callback function after the connection to the peer application is complete.

Parameters
socketThe connected socket.

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

◆ ConnectionSucceededKMS()

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

Callback function after the connection to the KMS is complete.

Parameters
socketThe connected socket.

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

◆ ConnectionSucceededSifting()

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

Callback function after the sifting connection is complete.

Parameters
socketThe connected socket.

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

◆ DataSend()

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

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

◆ DataSendKMS()

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

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

◆ DoDispose()

void ns3::QKDPostprocessingApplication::DoDispose ( void  )
protectedvirtual

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 206 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 a random seed that will be used to generate key values.

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

References ns3::UniformRandomVariable::GetValue(), m_keyId, and m_random.

Referenced by QKDPostprocessingApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateRandomString()

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

Generate a random string with a given length.

Parameters
lenThe length.
Returns
The random string.

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

Referenced by QKDPostprocessingApplication().

+ Here is the caller graph for this function:

◆ GetAcceptedSockets()

std::list< Ptr< Socket > > ns3::QKDPostprocessingApplication::GetAcceptedSockets ( void  ) const

Get the list of the accepted sockets.

Returns
The list of the accepted sockets.

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

References m_sinkSocketList, and NS_LOG_FUNCTION.

◆ GetDst()

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

Get the destination node.

Returns
The destination node.

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

References m_dst.

◆ GetLastAckTime()

Time ns3::QKDPostprocessingApplication::GetLastAckTime ( )

Get the timestamp of the last acknowledgement.

Returns
The timestamp.

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

◆ GetListeningSocket()

Ptr<Socket> ns3::QKDPostprocessingApplication::GetListeningSocket ( void  ) const

Get the listening socket.

Returns
The listening socket.

◆ GetSendSocket()

Ptr< Socket > ns3::QKDPostprocessingApplication::GetSendSocket ( void  ) const

Get the send socket.

Returns
The send socket.

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

References m_sendSocket, and NS_LOG_FUNCTION.

◆ GetSinkSocket()

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

Get the sink socket.

Returns
The sink socket.

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

References m_sinkSocket, and NS_LOG_FUNCTION.

◆ GetSrc()

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

Get the source node.

Returns
The source node.

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

References m_src.

◆ GetTotalRx()

uint32_t ns3::QKDPostprocessingApplication::GetTotalRx ( ) const

Get the total amount of data received (in bytes).

Returns
The received amount in bytes.

Definition at line 135 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 from the application.

Parameters
socketThe incoming connection socket.
fromThe address the connection is from.

Definition at line 705 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 the KMS.

Parameters
socketThe incoming connection socket.
fromThe address the connection is from.

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

◆ HandleAcceptSifting()

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

Handle an incoming connection for the sifting.

Parameters
socketThe incoming connection socket.
fromThe address the connection is from.

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

◆ HandlePeerClose()

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

Handle a connection close from the peer application.

Parameters
socketThe connected socket.

Definition at line 687 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 a connection close from the KMS.

Parameters
socketThe connected socket.

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

◆ HandlePeerError()

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

Handle a connection error from the peer application.

Parameters
socketThe connected socket.

Definition at line 696 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 a connection error from the KMS.

Parameters
socketThe connected socket.

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

◆ HandleRead()

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

Handle a packet received from the peer application.

Parameters
socketThe receiving socket.

Definition at line 574 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 from the KMS.

Parameters
socketThe receiving socket.

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

◆ HandleReadSifting()

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

Handle a sifting packet received from the application.

Parameters
socketThe receiving socket.

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

◆ PrepareOutput()

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

Prepare the output data.

Parameters
valueThe output data.
actionThe action.

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

◆ ProcessIncomingPacket()

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

Process data received.

Parameters
packetThe received packet.

POST PROCESSING

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

◆ RegisterAckTime()

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

Callback for ack messages.

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

◆ ResetCounter()

void ns3::QKDPostprocessingApplication::ResetCounter ( )
private

Reset the counter after completing the post-processing round.

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

◆ ScheduleNextReset()

void ns3::QKDPostprocessingApplication::ScheduleNextReset ( )
private

Schedule a reset of the post-processing round.

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

◆ SendData()

void ns3::QKDPostprocessingApplication::SendData ( void  )
private

Schedule time slot to send data.

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

◆ SendPacket()

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

Send the packet to the socket.

Parameters
packetThe packet.

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

◆ SendPacketToKMS()

void ns3::QKDPostprocessingApplication::SendPacketToKMS ( Ptr< QKDKey packet)
private

Send the packet to the local KMS.

Parameters
packetThe packet.

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

◆ SendSiftingPacket()

void ns3::QKDPostprocessingApplication::SendSiftingPacket ( void  )
private

Send the sifting packet to the socket.

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

◆ SetDst()

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

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

References ns3::Node::GetId(), m_dst, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetSiftingSocket()

void ns3::QKDPostprocessingApplication::SetSiftingSocket ( std::string  type,
Ptr< Socket socket 
)

Set the sifting socket.

Parameters
typeThe socket type.
socketThe socket to set.

Definition at line 195 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 
)

Set the socket.

Parameters
typeThe socket type.
socketThe socket to set.
isMasterThe role of the application.

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

References m_master, m_sendSocket, m_sinkSocket, and NS_LOG_FUNCTION.

◆ SetSrc()

void ns3::QKDPostprocessingApplication::SetSrc ( Ptr< Node node)

Set the source node.

Parameters
Thesource node.

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

References ns3::Node::GetId(), m_src, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ StartApplication()

◆ StopApplication()

void ns3::QKDPostprocessingApplication::StopApplication ( void  )
privatevirtual

Stop the post-processing application.

Called at time specified by Stop

Reimplemented from ns3::Application.

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

Member Data Documentation

◆ m_appId

std::string ns3::QKDPostprocessingApplication::m_appId
private

Random string marking the app ID.

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

Referenced by QKDPostprocessingApplication().

◆ m_connected

bool ns3::QKDPostprocessingApplication::m_connected
private

Connection Status.

Definition at line 352 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 361 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_dst

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

The destination node.

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

Referenced by GetDst(), and SetDst().

◆ m_keyId

uint64_t ns3::QKDPostprocessingApplication::m_keyId
private

ID counter of generated keys.

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

Referenced by GenerateRandomKeyId().

◆ m_keyRate

DataRate ns3::QKDPostprocessingApplication::m_keyRate
private

QKD Key rate.

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

Referenced by GetTypeId().

◆ m_keySizeInBits

uint32_t ns3::QKDPostprocessingApplication::m_keySizeInBits
private

KeyRate of the QKDlink.

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

Referenced by GetTypeId(), and StartApplication().

◆ m_kms

Address ns3::QKDPostprocessingApplication::m_kms
private

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

Referenced by GetTypeId().

◆ m_lastAck

Time ns3::QKDPostprocessingApplication::m_lastAck
private

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

◆ m_lastUUID

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

The latest UUID of the key.

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

◆ m_local

Address ns3::QKDPostprocessingApplication::m_local
private

Local address to bind to.

Definition at line 345 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 348 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 353 of file qkd-postprocessing-application.h.

Referenced by SetSocket().

◆ m_maxPackets_sifting

uint32_t ns3::QKDPostprocessingApplication::m_maxPackets_sifting
private

Limitation for the number of sifting packets.

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

Referenced by GetTypeId().

◆ m_packetNumber

uint32_t ns3::QKDPostprocessingApplication::m_packetNumber
private

Definition at line 354 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 378 of file qkd-postprocessing-application.h.

Referenced by QKDPostprocessingApplication().

◆ m_peer

Address ns3::QKDPostprocessingApplication::m_peer
private

Peer address.

Definition at line 344 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 347 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_pktSize

uint32_t ns3::QKDPostprocessingApplication::m_pktSize
private

Size of packets.

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

Referenced by GetTypeId().

◆ m_random

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

The uniform random variable.

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

Referenced by QKDPostprocessingApplication(), and GenerateRandomKeyId().

◆ m_rxTrace

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

Traced Callback: received packets, source address.

Definition at line 372 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 375 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 359 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 331 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 336 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 341 of file qkd-postprocessing-application.h.

◆ m_sinkSocket

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

Associated socket.

Definition at line 332 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 337 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 342 of file qkd-postprocessing-application.h.

◆ m_sinkSocketList

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

the accepted sockets

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

Referenced by DoDispose(), and GetAcceptedSockets().

◆ m_src

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

The source node.

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

Referenced by GetSrc(), and SetSrc().

◆ m_tid

TypeId ns3::QKDPostprocessingApplication::m_tid
private

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

Referenced by GetTypeId(), and StartApplication().

◆ m_tidSifting

TypeId ns3::QKDPostprocessingApplication::m_tidSifting
private

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

Referenced by GetTypeId().

◆ m_totalRx

uint32_t ns3::QKDPostprocessingApplication::m_totalRx
private

Total bytes received

Definition at line 355 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 373 of file qkd-postprocessing-application.h.

Referenced by GetTypeId().

◆ m_txTraceKMS

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

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

Referenced by GetTypeId().


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