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

QKDConnectionRegister is a class used to keep details about distant QKD links and applications. More...

#include "qkd-connection-register.h"

+ Inheritance diagram for ns3::QKDConnectionRegister:
+ Collaboration diagram for ns3::QKDConnectionRegister:

Public Member Functions

 QKDConnectionRegister ()
 Constructor. More...
 
bool AddApplicationEntry (QKDApplicationEntry &r)
 Add the QKD application entry if it doesn't yet exist in the table. More...
 
bool AddKeyAssociationEntry (QKDKeyAssociationLinkEntry &r)
 Add the key association entry if it doesn't yet exist in the table. More...
 
bool AssignKeyAssociation (UUID srcSaeId, UUID dstSaeId, std::string type, uint32_t priority, QKDKeyAssociationLinkEntry &rt)
 Assign the key association. More...
 
bool DeleteApplicationEntry (UUID dst)
 Delete the application entry, if it exists. More...
 
bool DeleteKeyAssociationLinkEntry (uint32_t dst)
 Delete the key association table entry with a given destination, if it exists. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the type ID for the instance. More...
 
uint32_t GetNumberOfApplications ()
 Get the number of the applications present in the applications table. More...
 
uint32_t GetNumberOfKeyAssociations ()
 \briet Get the number of the key associations present in the associations table. More...
 
bool LookupApplication (UUID dstSaeId, QKDApplicationEntry &rt)
 Lookup the application entry with the destination (receiver) application identifier (UUID). More...
 
bool LookupApplicationBySaeIDsAndType (UUID srcSaeId, UUID dstSaeId, QKDApplicationEntry::ConnectionType type, QKDApplicationEntry &rt)
 Lookup the application entry with the application identifiers and the connection type. More...
 
bool LookupKeyAssociationByApplicationId (UUID saeId, QKDKeyAssociationLinkEntry &rt)
 Lookup the key association entry with the application identifier (UUID). More...
 
bool LookupKeyAssociationByDestinationNodeId (uint32_t srcNodeId, uint32_t dstNodeId, QKDKeyAssociationLinkEntry &rt)
 Lookup the key association entry with the source and destination identifiers. More...
 
bool LookupKeyAssociationById (UUID keyAssociationId, QKDKeyAssociationLinkEntry &rt)
 Lookup the key association entry with destination node identifier. More...
 
bool LookupKeyAssociationBySaeId (UUID id, QKDKeyAssociationLinkEntry &rt)
 Lookup the key association entry with the application identifier (UUID). More...
 
void Print (Ptr< OutputStreamWrapper > stream) const
 Print the location table. More...
 
void PrintListOfAllKeyAssociations ()
 Print the key association list. More...
 
bool SaveKeyAssociation (QKDKeyAssociationLinkEntry &rt)
 Store the key association entry. More...
 
void UpdateQKDApplications (UUID keyAssociationId, UUID saeId)
 Update the key association list of QKD applications. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
 ~Object () override
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose ()
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one. More...
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated 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...
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized () 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 () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () 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 errors. 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 ()
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Private Attributes

std::map< UUID, QKDApplicationEntrym_applications
 The list of applications. More...
 
std::map< uint32_t, QKDKeyAssociationLinkEntrym_keyAssociations
 The list of key associations. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose ()
 Destructor implementation. More...
 
virtual void DoInitialize ()
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate ()
 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 ()
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

QKDConnectionRegister is a class used to keep details about distant QKD links and applications.

Note
QKDNetSim KMS implements a location register table that is used to define paths to distant node. It is a early version of routing table that will be updated via routing protocol.

Definition at line 60 of file qkd-connection-register.h.

Constructor & Destructor Documentation

◆ QKDConnectionRegister()

ns3::QKDConnectionRegister::QKDConnectionRegister ( )

Constructor.

Definition at line 57 of file qkd-connection-register.cc.

Member Function Documentation

◆ AddApplicationEntry()

bool ns3::QKDConnectionRegister::AddApplicationEntry ( QKDApplicationEntry r)

Add the QKD application entry if it doesn't yet exist in the table.

Parameters
rThe location table entry.
Returns
The success indicator.

Definition at line 60 of file qkd-connection-register.cc.

References ns3::QKDApplicationEntry::GetId(), m_applications, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ AddKeyAssociationEntry()

bool ns3::QKDConnectionRegister::AddKeyAssociationEntry ( QKDKeyAssociationLinkEntry r)

Add the key association entry if it doesn't yet exist in the table.

Parameters
rThe location table entry.
Returns
The success indicator.

Definition at line 84 of file qkd-connection-register.cc.

References ns3::QKDKeyAssociationLinkEntry::GetDestinationNodeId(), ns3::QKDKeyAssociationLinkEntry::GetId(), m_keyAssociations, NS_LOG_FUNCTION, and ns3::UUID::string().

+ Here is the call graph for this function:

◆ AssignKeyAssociation()

bool ns3::QKDConnectionRegister::AssignKeyAssociation ( UUID  srcSaeId,
UUID  dstSaeId,
std::string  type,
uint32_t  priority,
QKDKeyAssociationLinkEntry rt 
)

Assign the key association.

Parameters
srdSaeIdThe soruce (sender) application identifier (UUID).
dstSaeIdThe destination (receiver) application identifier (UUID).
typeThe key association type.
priorityThe key association priority.
rtThe entry with the application dstId, if exists.
Returns
The success indicator.

Definition at line 257 of file qkd-connection-register.cc.

References m_keyAssociations, NS_LOG_FUNCTION, PrintListOfAllKeyAssociations(), and check-style-clang-format::type.

+ Here is the call graph for this function:

◆ DeleteApplicationEntry()

bool ns3::QKDConnectionRegister::DeleteApplicationEntry ( UUID  dst)

Delete the application entry, if it exists.

Parameters
dstThe destination (receiver) application identifier (UUID).
Returns
The success indicator.

Definition at line 94 of file qkd-connection-register.cc.

References m_applications.

◆ DeleteKeyAssociationLinkEntry()

bool ns3::QKDConnectionRegister::DeleteKeyAssociationLinkEntry ( uint32_t  dst)

Delete the key association table entry with a given destination, if it exists.

Parameters
dstThe destination node identifier
Returns
The success indicator.

Definition at line 101 of file qkd-connection-register.cc.

References m_keyAssociations.

◆ GetInstanceTypeId()

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

Get the type ID for the instance.

Returns
The instance TypeId

Reimplemented from ns3::Object.

Definition at line 52 of file qkd-connection-register.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetNumberOfApplications()

uint32_t ns3::QKDConnectionRegister::GetNumberOfApplications ( )
inline

Get the number of the applications present in the applications table.

Returns
The number of the applications.

Definition at line 225 of file qkd-connection-register.h.

References m_applications.

◆ GetNumberOfKeyAssociations()

uint32_t ns3::QKDConnectionRegister::GetNumberOfKeyAssociations ( )
inline

\briet Get the number of the key associations present in the associations table.

Returns
The number of the key associations.

Definition at line 216 of file qkd-connection-register.h.

References m_keyAssociations.

◆ GetTypeId()

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

Get the type ID.

Returns
The object TypeId.

Definition at line 41 of file qkd-connection-register.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

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

◆ LookupApplication()

bool ns3::QKDConnectionRegister::LookupApplication ( UUID  dstSaeId,
QKDApplicationEntry rt 
)

Lookup the application entry with the destination (receiver) application identifier (UUID).

Parameters
dstThe destination (receiver) application identifier (UUID).
rtThe entry with the destination address dst, if exists.
Returns
The lookup success indicator.

Definition at line 108 of file qkd-connection-register.cc.

References m_applications, and NS_LOG_FUNCTION.

◆ LookupApplicationBySaeIDsAndType()

bool ns3::QKDConnectionRegister::LookupApplicationBySaeIDsAndType ( UUID  srcSaeId,
UUID  dstSaeId,
QKDApplicationEntry::ConnectionType  type,
QKDApplicationEntry rt 
)

Lookup the application entry with the application identifiers and the connection type.

Parameters
srcThe source (sender) application identifier (UUID).
dstThe destination (receiver) application identifier (UUID).
typeThe conncetion type.
rtThe entry with the destination address dst, if exists.
Returns
The lookup success indicator.

Definition at line 144 of file qkd-connection-register.cc.

References m_applications, NS_LOG_FUNCTION, and check-style-clang-format::type.

◆ LookupKeyAssociationByApplicationId()

bool ns3::QKDConnectionRegister::LookupKeyAssociationByApplicationId ( UUID  saeId,
QKDKeyAssociationLinkEntry rt 
)

Lookup the key association entry with the application identifier (UUID).

Parameters
saeIdThe application identifier (UUID).
rtThe entry with the application saeId, if exists.
Returns
The lookup success indicator.

Definition at line 221 of file qkd-connection-register.cc.

References m_keyAssociations, NS_LOG_FUNCTION, and PrintListOfAllKeyAssociations().

+ Here is the call graph for this function:

◆ LookupKeyAssociationByDestinationNodeId()

bool ns3::QKDConnectionRegister::LookupKeyAssociationByDestinationNodeId ( uint32_t  srcNodeId,
uint32_t  dstNodeId,
QKDKeyAssociationLinkEntry rt 
)

Lookup the key association entry with the source and destination identifiers.

Parameters
srcNodeIdThe source node identifier.
dstNodeIdThe destination node identifier.
rtThe entry with either the source or destination node identifier, if exists.
Returns
The lookup success indicator.

Definition at line 198 of file qkd-connection-register.cc.

References m_keyAssociations, and NS_LOG_FUNCTION.

◆ LookupKeyAssociationById()

bool ns3::QKDConnectionRegister::LookupKeyAssociationById ( UUID  keyAssociationId,
QKDKeyAssociationLinkEntry rt 
)

Lookup the key association entry with destination node identifier.

Parameters
dstThe destination node identifier.
rtThe entry with the destination address dst, if exists.
Returns
The lookup success indicator.

Definition at line 180 of file qkd-connection-register.cc.

References m_keyAssociations, and NS_LOG_FUNCTION.

◆ LookupKeyAssociationBySaeId()

bool ns3::QKDConnectionRegister::LookupKeyAssociationBySaeId ( UUID  id,
QKDKeyAssociationLinkEntry rt 
)

Lookup the key association entry with the application identifier (UUID).

Parameters
idThe application identifier (UUID).
rtThe entry with the destination identifier id, if exists.
Returns
The lookup success indicator.

◆ Print()

void ns3::QKDConnectionRegister::Print ( Ptr< OutputStreamWrapper stream) const

Print the location table.

Parameters
streamThe output stream.

◆ PrintListOfAllKeyAssociations()

void ns3::QKDConnectionRegister::PrintListOfAllKeyAssociations ( )

Print the key association list.

Definition at line 297 of file qkd-connection-register.cc.

References m_keyAssociations, and NS_LOG_FUNCTION.

Referenced by AssignKeyAssociation(), LookupKeyAssociationByApplicationId(), and SaveKeyAssociation().

+ Here is the caller graph for this function:

◆ SaveKeyAssociation()

bool ns3::QKDConnectionRegister::SaveKeyAssociation ( QKDKeyAssociationLinkEntry rt)

Store the key association entry.

Parameters
Thekey association entry.
Returns
The success indicator.

Definition at line 279 of file qkd-connection-register.cc.

References ns3::QKDKeyAssociationLinkEntry::GetId(), m_keyAssociations, NS_LOG_FUNCTION, and PrintListOfAllKeyAssociations().

+ Here is the call graph for this function:

◆ UpdateQKDApplications()

void ns3::QKDConnectionRegister::UpdateQKDApplications ( UUID  keyAssociationId,
UUID  saeId 
)

Update the key association list of QKD applications.

Parameters
keyAssociationIdThe key association identifier.
saeIdThe application identifier (UUID).

Definition at line 308 of file qkd-connection-register.cc.

References m_keyAssociations, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_applications

std::map<UUID, QKDApplicationEntry> ns3::QKDConnectionRegister::m_applications
private

◆ m_keyAssociations


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