QKD control is a network component with the knowledge of the network status. More...
#include "qkd-control.h"
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< QKDBuffer > | GetBufferByDestinationNode (Ptr< Node >) |
Get the QKDBuffer for the given destination node. More... | |
Ptr< QKDBuffer > | GetBufferByPosition (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< Node > | GetNode () |
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< 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... | |
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, QKDLink > | m_destinations |
Ptr< Node > | m_node |
The controller node. More... | |
std::vector< Ptr< QKDBuffer > > | m_qkdbuffers |
The list of associated QKDBuffers. More... | |
Additional Inherited Members | |
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... | |
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.
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.
ns3::QKDControl::QKDControl | ( | ) |
|
virtual |
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
The | QKDLink 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.
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
Alice | The source node. |
Bob | The destination (detector) node. |
AliceKMS | The source key management node. |
BobKMS | The destination key management node. |
Mmin | The lower buffer threshold value. |
Mthr | The buffer threshold value. |
Mmax | The buffer capacity. |
Mcurrent | The current amount of key material in the buffer. |
isMaster | Is this a master node? |
Definition at line 86 of file qkd-control.cc.
References ns3::Object::DoInitialize(), and NS_LOG_FUNCTION.
void ns3::QKDControl::Dispose | ( | void | ) |
Destroy a QKDControl object.
This is the pre-destructor function of the QKDControl.
|
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.
|
protectedvirtual |
Initialization function.
Reimplemented from ns3::Object.
Definition at line 86 of file qkd-control.cc.
Get the QKDBuffer for the given destination node.
The | destination node. |
Definition at line 217 of file qkd-control.cc.
References ns3::Node::GetId(), GetNode(), m_destinations, and NS_LOG_FUNCTION.
|
virtual |
Get the type ID for the instance.
Reimplemented from ns3::Object.
Definition at line 55 of file qkd-control.cc.
References GetTypeId().
Get the controller node.
Definition at line 238 of file qkd-control.cc.
References m_node.
Referenced by AddLinkRecord(), and GetBufferByDestinationNode().
uint32_t ns3::QKDControl::GetNQKDBuffers | ( | void | ) | const |
Get the number of QKDBuffers associated to this QKDControl.
Definition at line 231 of file qkd-control.cc.
References m_qkdbuffers, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 40 of file qkd-control.cc.
References m_qkdbuffers, ns3::MakeObjectVectorAccessor(), and ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
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.
alice | The sender application. |
bob | The receiver application. |
kmsA | The key manager system at the sender side. |
kmsB | The 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().
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.
alice | The sender application. |
bob | The receiver application. |
kmsA | The key manager system at the sender side. |
kmsB | The 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().
Set the controller node.
The | node. |
Definition at line 243 of file qkd-control.cc.
References m_node.
|
private |
Definition at line 235 of file qkd-control.h.
Referenced by ~QKDControl(), AddLinkRecord(), and GetBufferByDestinationNode().
The controller node.
Definition at line 231 of file qkd-control.h.
The list of associated QKDBuffers.
Definition at line 233 of file qkd-control.h.
Referenced by AddLinkRecord(), DoDispose(), GetNQKDBuffers(), and GetTypeId().