QKDConnectionRegister is a class used to keep details about distant QKD links and applications. More...
#include "qkd-connection-register.h"
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... | |
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< Object > | GetObject () 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< Object > | GetObject (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... | |
SimpleRefCount & | operator= ([[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... | |
Private Attributes | |
std::map< UUID, QKDApplicationEntry > | m_applications |
The list of applications. More... | |
std::map< uint32_t, QKDKeyAssociationLinkEntry > | m_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 (void) |
Destructor implementation. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. 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... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
QKDConnectionRegister is a class used to keep details about distant QKD links and applications.
Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 128 bytes (on a 64-bit architecture).
Definition at line 60 of file qkd-connection-register.h.
ns3::QKDConnectionRegister::QKDConnectionRegister | ( | ) |
Constructor.
Definition at line 57 of file qkd-connection-register.cc.
bool ns3::QKDConnectionRegister::AddApplicationEntry | ( | QKDApplicationEntry & | r | ) |
Add the QKD application entry if it doesn't yet exist in the table.
r | The location table entry. |
Definition at line 60 of file qkd-connection-register.cc.
References ns3::QKDApplicationEntry::GetId(), m_applications, NS_LOG_FUNCTION, and test-ns3::result.
bool ns3::QKDConnectionRegister::AddKeyAssociationEntry | ( | QKDKeyAssociationLinkEntry & | r | ) |
Add the key association entry if it doesn't yet exist in the table.
r | The location table entry. |
Definition at line 84 of file qkd-connection-register.cc.
References ns3::QKDKeyAssociationLinkEntry::GetDestinationNodeId(), ns3::QKDKeyAssociationLinkEntry::GetId(), m_keyAssociations, NS_LOG_FUNCTION, test-ns3::result, and ns3::UUID::string().
bool ns3::QKDConnectionRegister::AssignKeyAssociation | ( | UUID | srcSaeId, |
UUID | dstSaeId, | ||
std::string | type, | ||
uint32_t | priority, | ||
QKDKeyAssociationLinkEntry & | rt | ||
) |
Assign the key association.
srdSaeId | The soruce (sender) application identifier (UUID). |
dstSaeId | The destination (receiver) application identifier (UUID). |
type | The key association type. |
priority | The key association priority. |
rt | The entry with the application dstId, if exists. |
Definition at line 257 of file qkd-connection-register.cc.
References m_keyAssociations, NS_LOG_FUNCTION, and PrintListOfAllKeyAssociations().
bool ns3::QKDConnectionRegister::DeleteApplicationEntry | ( | UUID | dst | ) |
Delete the application entry, if it exists.
dst | The destination (receiver) application identifier (UUID). |
Definition at line 94 of file qkd-connection-register.cc.
References m_applications.
bool ns3::QKDConnectionRegister::DeleteKeyAssociationLinkEntry | ( | uint32_t | dst | ) |
Delete the key association table entry with a given destination, if it exists.
dst | The destination node identifier |
Definition at line 101 of file qkd-connection-register.cc.
References m_keyAssociations.
|
virtual |
Get the type ID for the instance.
Reimplemented from ns3::Object.
Definition at line 52 of file qkd-connection-register.cc.
References GetTypeId().
|
inline |
Get the number of the applications present in the applications table.
Definition at line 225 of file qkd-connection-register.h.
References m_applications.
|
inline |
\briet Get the number of the key associations present in the associations table.
Definition at line 216 of file qkd-connection-register.h.
References m_keyAssociations.
|
static |
Get the type ID.
Definition at line 41 of file qkd-connection-register.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
bool ns3::QKDConnectionRegister::LookupApplication | ( | UUID | dstSaeId, |
QKDApplicationEntry & | rt | ||
) |
Lookup the application entry with the destination (receiver) application identifier (UUID).
dst | The destination (receiver) application identifier (UUID). |
rt | The entry with the destination address dst, if exists. |
Definition at line 108 of file qkd-connection-register.cc.
References m_applications, and NS_LOG_FUNCTION.
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.
src | The source (sender) application identifier (UUID). |
dst | The destination (receiver) application identifier (UUID). |
type | The conncetion type. |
rt | The entry with the destination address dst, if exists. |
Definition at line 144 of file qkd-connection-register.cc.
References m_applications, and NS_LOG_FUNCTION.
bool ns3::QKDConnectionRegister::LookupKeyAssociationByApplicationId | ( | UUID | saeId, |
QKDKeyAssociationLinkEntry & | rt | ||
) |
Lookup the key association entry with the application identifier (UUID).
saeId | The application identifier (UUID). |
rt | The entry with the application saeId, if exists. |
Definition at line 221 of file qkd-connection-register.cc.
References m_keyAssociations, NS_LOG_FUNCTION, and PrintListOfAllKeyAssociations().
bool ns3::QKDConnectionRegister::LookupKeyAssociationByDestinationNodeId | ( | uint32_t | srcNodeId, |
uint32_t | dstNodeId, | ||
QKDKeyAssociationLinkEntry & | rt | ||
) |
Lookup the key association entry with the source and destination identifiers.
srcNodeId | The source node identifier. |
dstNodeId | The destination node identifier. |
rt | The entry with either the source or destination node identifier, if exists. |
Definition at line 198 of file qkd-connection-register.cc.
References m_keyAssociations, and NS_LOG_FUNCTION.
bool ns3::QKDConnectionRegister::LookupKeyAssociationById | ( | UUID | keyAssociationId, |
QKDKeyAssociationLinkEntry & | rt | ||
) |
Lookup the key association entry with destination node identifier.
dst | The destination node identifier. |
rt | The entry with the destination address dst, if exists. |
Definition at line 180 of file qkd-connection-register.cc.
References m_keyAssociations, and NS_LOG_FUNCTION.
bool ns3::QKDConnectionRegister::LookupKeyAssociationBySaeId | ( | UUID | id, |
QKDKeyAssociationLinkEntry & | rt | ||
) |
void ns3::QKDConnectionRegister::Print | ( | Ptr< OutputStreamWrapper > | stream | ) | const |
Print the location table.
stream | The output stream. |
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().
bool ns3::QKDConnectionRegister::SaveKeyAssociation | ( | QKDKeyAssociationLinkEntry & | rt | ) |
Store the key association entry.
The | key association entry. |
Definition at line 279 of file qkd-connection-register.cc.
References ns3::QKDKeyAssociationLinkEntry::GetId(), m_keyAssociations, NS_LOG_FUNCTION, and PrintListOfAllKeyAssociations().
Update the key association list of QKD applications.
keyAssociationId | The key association identifier. |
saeId | The application identifier (UUID). |
Definition at line 308 of file qkd-connection-register.cc.
References m_keyAssociations, and NS_LOG_FUNCTION.
|
private |
The list of applications.
Definition at line 248 of file qkd-connection-register.h.
Referenced by AddApplicationEntry(), DeleteApplicationEntry(), GetNumberOfApplications(), LookupApplication(), and LookupApplicationBySaeIDsAndType().
|
private |
The list of key associations.
Definition at line 247 of file qkd-connection-register.h.
Referenced by AddKeyAssociationEntry(), AssignKeyAssociation(), DeleteKeyAssociationLinkEntry(), GetNumberOfKeyAssociations(), LookupKeyAssociationByApplicationId(), LookupKeyAssociationByDestinationNodeId(), LookupKeyAssociationById(), PrintListOfAllKeyAssociations(), SaveKeyAssociation(), and UpdateQKDApplications().