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

QKD control is a network component with the knowledge of the network status. More...

#include "qkd-control.h"

+ Inheritance diagram for ns3::QKDControl:
+ Collaboration diagram for ns3::QKDControl:

Classes

struct  QKDLink
 Description of a QKD link. More...
 

Public Member Functions

 QKDControl ()
 Constructor. More...
 
virtual ~QKDControl ()
 Destructor. More...
 
void AddLinkRecord (struct QKDControl::QKDLink)
 Record details about the new QKD link. More...
 
struct QKDControl::QKDLink AddNewLink (Ptr< Node > Alice, Ptr< Node > Bob, Ptr< Node > AliceKMS, Ptr< Node > BobKMS, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurrent, bool isMaster, bool useRealStorages)
 Establish new QKD link. More...
 
void Dispose (void)
 Destroy a QKDControl object. More...
 
Ptr< QKDBufferGetBufferByDestinationNode (Ptr< Node >)
 Get the QKDBuffer for the given destination node. More...
 
Ptr< QKDBufferGetBufferByPosition (const uint32_t &bufferPosition)
 Get the QKDBuffer with given position. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the type ID for the instance. More...
 
Ptr< NodeGetNode ()
 Get the controller node. More...
 
uint32_t GetNQKDBuffers (void) const
 Get the number of QKDBuffers associated to this QKDControl. More...
 
std::vector< std::string > RegisterQKDApplications (Ptr< QKDApp004 > alice, Ptr< QKDApp004 > bob, Ptr< QKDKeyManagerSystemApplication > kmsA, Ptr< QKDKeyManagerSystemApplication > kmsB)
 Register the QKD application pair (that implements ETSI QKD 004 API) on the site. More...
 
std::vector< std::string > RegisterQKDApplications (Ptr< QKDApp014 > alice, Ptr< QKDApp014 > bob, Ptr< QKDKeyManagerSystemApplication > kmsA, Ptr< QKDKeyManagerSystemApplication > kmsB)
 Register the QKD application pair (that implements ETSI QKD 014 API) on the site. More...
 
void SetNode (Ptr< Node >)
 Set the controller node. 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...
 
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::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)
 The dispose method. More...
 
virtual void DoInitialize (void)
 Initialization function. 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 Attributes

std::map< uint32_t, QKDLinkm_destinations
 
Ptr< Nodem_node
 The controller node. More...
 
std::vector< Ptr< QKDBuffer > > m_qkdbuffers
 The list of associated QKDBuffers. More...
 

Additional Inherited Members

Detailed Description

QKD control is a network component with the knowledge of the network status.

Introspection did not find any typical Config paths.

It should perform network management through distributed protocols or centralized entities.

Note
In the current version of QKDNetSim, QKDControl can be installed on an independent node without a direct QKD connection. It is in charge of establishing QKD links, and it contains a list of QKD links with associated QKD buffers implemented in a QKD network.


Attributes

No TraceSources are defined for this type.
Size of this type is 112 bytes (on a 64-bit architecture).

Definition at line 72 of file qkd-control.h.

Constructor & Destructor Documentation

◆ QKDControl()

ns3::QKDControl::QKDControl ( )

Constructor.

Definition at line 60 of file qkd-control.cc.

References NS_LOG_FUNCTION_NOARGS.

◆ ~QKDControl()

ns3::QKDControl::~QKDControl ( )
virtual

Destructor.

Definition at line 66 of file qkd-control.cc.

References m_destinations.

Member Function Documentation

◆ AddLinkRecord()

void ns3::QKDControl::AddLinkRecord ( struct QKDControl::QKDLink  newLink)

Record details about the new QKD link.

This function is called from qkd/helper/qkd-helper.cc

Parameters
TheQKDLink details.

Definition at line 191 of file qkd-control.cc.

References ns3::QKDControl::QKDLink::alice, ns3::QKDControl::QKDLink::bob, ns3::Node::GetId(), GetNode(), m_destinations, m_qkdbuffers, NS_LOG_FUNCTION, and ns3::QKDControl::QKDLink::qkdBufferBob.

+ Here is the call graph for this function:

◆ AddNewLink()

struct QKDControl::QKDLink ns3::QKDControl::AddNewLink ( Ptr< Node Alice,
Ptr< Node Bob,
Ptr< Node AliceKMS,
Ptr< Node BobKMS,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  Mcurrent,
bool  isMaster,
bool  useRealStorages 
)

Establish new QKD link.

This function is called from qkd/helper/qkd-helper.cc

Parameters
AliceThe source node.
BobThe destination (detector) node.
AliceKMSThe source key management node.
BobKMSThe destination key management node.
MminThe lower buffer threshold value.
MthrThe buffer threshold value.
MmaxThe buffer capacity.
McurrentThe current amount of key material in the buffer.
isMasterIs this a master node?
Returns
The QKDLink object.

Definition at line 86 of file qkd-control.cc.

References ns3::Object::DoInitialize(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Dispose()

void ns3::QKDControl::Dispose ( void  )

Destroy a QKDControl object.

This is the pre-destructor function of the QKDControl.

◆ DoDispose()

void ns3::QKDControl::DoDispose ( void  )
protectedvirtual

The dispose method.

Subclasses must override this method and must chain up to it by calling Node::DoDispose at the end of their own DoDispose method.

Reimplemented from ns3::Object.

Definition at line 72 of file qkd-control.cc.

References ns3::Object::DoDispose(), and m_qkdbuffers.

+ Here is the call graph for this function:

◆ DoInitialize()

void ns3::QKDControl::DoInitialize ( void  )
protectedvirtual

Initialization function.

Reimplemented from ns3::Object.

Definition at line 86 of file qkd-control.cc.

◆ GetBufferByDestinationNode()

Ptr< QKDBuffer > ns3::QKDControl::GetBufferByDestinationNode ( Ptr< Node dst)

Get the QKDBuffer for the given destination node.

Parameters
Thedestination node.
Returns
The QKDBuffer.

Definition at line 217 of file qkd-control.cc.

References ns3::Node::GetId(), GetNode(), m_destinations, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetBufferByPosition()

Ptr<QKDBuffer> ns3::QKDControl::GetBufferByPosition ( const uint32_t &  bufferPosition)

Get the QKDBuffer with given position.

Parameters
bufferPositionThe buffer position within m_buffers list.
Returns
The QKDBuffer.

◆ GetInstanceTypeId()

TypeId ns3::QKDControl::GetInstanceTypeId ( void  ) const
virtual

Get the type ID for the instance.

Returns
The instance TypeId.

Reimplemented from ns3::Object.

Definition at line 55 of file qkd-control.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetNode()

Ptr< Node > ns3::QKDControl::GetNode ( void  )

Get the controller node.

Returns
The node.

Definition at line 238 of file qkd-control.cc.

References m_node.

Referenced by AddLinkRecord(), and GetBufferByDestinationNode().

+ Here is the caller graph for this function:

◆ GetNQKDBuffers()

uint32_t ns3::QKDControl::GetNQKDBuffers ( void  ) const

Get the number of QKDBuffers associated to this QKDControl.

Returns
The number of QKDBuffers.

Definition at line 231 of file qkd-control.cc.

References m_qkdbuffers, and NS_LOG_FUNCTION.

◆ GetTypeId()

TypeId ns3::QKDControl::GetTypeId ( void  )
static

Get the type ID.

Returns
The object TypeId.

Definition at line 40 of file qkd-control.cc.

References m_qkdbuffers, ns3::MakeObjectVectorAccessor(), and ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

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

◆ RegisterQKDApplications() [1/2]

std::vector< std::string > ns3::QKDControl::RegisterQKDApplications ( Ptr< QKDApp004 alice,
Ptr< QKDApp004 bob,
Ptr< QKDKeyManagerSystemApplication kmsA,
Ptr< QKDKeyManagerSystemApplication kmsB 
)

Register the QKD application pair (that implements ETSI QKD 004 API) on the site.

Parameters
aliceThe sender application.
bobThe receiver application.
kmsAThe key manager system at the sender side.
kmsBThe key manager system at the receiver side.

Definition at line 249 of file qkd-control.cc.

References ns3::UintegerValue::Get(), ns3::QKDApplicationEntry::GetId(), ns3::QKDApplicationEntry::GetKeyAssociationId(), NS_ASSERT, NS_LOG_FUNCTION, ns3::QKDEncryptor::QKDCRYPTO_AES, ns3::QKDEncryptor::QKDCRYPTO_AUTH_VMAC, ns3::QKDEncryptor::QKDCRYPTO_OTP, and ns3::UUID::string().

+ Here is the call graph for this function:

◆ RegisterQKDApplications() [2/2]

std::vector< std::string > ns3::QKDControl::RegisterQKDApplications ( Ptr< QKDApp014 alice,
Ptr< QKDApp014 bob,
Ptr< QKDKeyManagerSystemApplication kmsA,
Ptr< QKDKeyManagerSystemApplication kmsB 
)

Register the QKD application pair (that implements ETSI QKD 014 API) on the site.

Parameters
aliceThe sender application.
bobThe receiver application.
kmsAThe key manager system at the sender side.
kmsBThe key manager system at the receiver side.

Definition at line 351 of file qkd-control.cc.

References ns3::UintegerValue::Get(), ns3::QKDApplicationEntry::GetId(), ns3::QKDApplicationEntry::GetKeyAssociationId(), NS_ASSERT, NS_LOG_FUNCTION, ns3::QKDEncryptor::QKDCRYPTO_AES, ns3::QKDEncryptor::QKDCRYPTO_AUTH_VMAC, ns3::QKDEncryptor::QKDCRYPTO_OTP, and ns3::UUID::string().

+ Here is the call graph for this function:

◆ SetNode()

void ns3::QKDControl::SetNode ( Ptr< Node node)

Set the controller node.

Parameters
Thenode.

Definition at line 243 of file qkd-control.cc.

References m_node.

Member Data Documentation

◆ m_destinations

std::map<uint32_t, QKDLink> ns3::QKDControl::m_destinations
private

Definition at line 235 of file qkd-control.h.

Referenced by ~QKDControl(), AddLinkRecord(), and GetBufferByDestinationNode().

◆ m_node

Ptr<Node> ns3::QKDControl::m_node
private

The controller node.

Definition at line 231 of file qkd-control.h.

Referenced by GetNode(), and SetNode().

◆ m_qkdbuffers

std::vector<Ptr<QKDBuffer> > ns3::QKDControl::m_qkdbuffers
private

The list of associated QKDBuffers.

Definition at line 233 of file qkd-control.h.

Referenced by AddLinkRecord(), DoDispose(), GetNQKDBuffers(), and GetTypeId().


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