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

Introspection did not find any typical Config paths. More...

#include "qkd-manager.h"

+ Inheritance diagram for ns3::QKDManager:
+ Collaboration diagram for ns3::QKDManager:

Classes

struct  addressGroup
 
struct  Connection
 

Public Member Functions

 QKDManager ()
 Constructor. More...
 
virtual ~QKDManager ()
 Destructor. More...
 
bool AddNewKeyMaterial (const Address sourceAddress, uint32_t &newKey)
 Add new key material to the corresponding QKD Buffer. More...
 
void AddNewLink (Ptr< QKDNetDevice > NetDeviceSrc, Ptr< QKDNetDevice > NetDeviceDst, Ptr< NetDevice > IPNetDeviceSrc, Ptr< NetDevice > IPNetDeviceDst, Ptr< QKDCrypto > Crypto, Ptr< Socket > socket, Ptr< Socket > socketSink, std::string socketType, uint32_t underlayPortNumber, Ipv4InterfaceAddress IPQKDSrc, Ipv4InterfaceAddress IPQKDDst, Ipv4InterfaceAddress IPSrc, Ipv4InterfaceAddress IPDst, bool isMaster, uint32_t Mmin, uint32_t Mthr, uint32_t Mmax, uint32_t Mcurrent, uint32_t channelID)
 Establish new QKD connection by adding new QKD link and record connection details This function is called from internet/helper/qkd-helper.cc. More...
 
void CalculateLinkThresholdHelpValue ()
 Help function. More...
 
bool CheckForResourcesToProcessThePacket (Ptr< Packet > p, const Address sourceAddress)
 Help function used to call determine TOSband and call original CheckForResourcesToProcessThePacket with all params. More...
 
bool CheckForResourcesToProcessThePacket (Ptr< Packet > p, const Address sourceAddress, const uint32_t &TOSband)
 Used to chech whether there are enough resources to encrypt/decrypt the packet. More...
 
void ConnectionFailed (Ptr< Socket > socket)
 Indicates that the TCP connection for socket in param failed to establish. More...
 
void ConnectionSucceeded (Ptr< Socket > socket)
 Indicates that the TCP connection for socket in param is established. More...
 
std::map< Address, QKDManager::Connection >::iterator FetchConnection (const Address sourceAddress)
 Help function. More...
 
uint32_t FetchLinkThresholdHelpValue ()
 Help function. More...
 
uint32_t FetchMaxNumberOfRecordedKeyChargingTimePeriods (Ipv4Address nextHop)
 Help Function (not used) More...
 
uint32_t FetchPacketTos (Ptr< Packet > p)
 Help function used to fetch TOS value from the packet. More...
 
double FetchPublicChannelPerformance (Ipv4Address nextHop)
 Fetch performances of the public channel. More...
 
uint8_t FetchStatusForDestinationBuffer (Ptr< NetDevice > src)
 Called from traffic-control/module/qkd-pfifo-fast-queue-disc This function needs to check the status of QKDBuffer. More...
 
bool ForwardToSocket (Ptr< Packet > originalPacket, Ptr< Packet > packet, const Address &source, const Address &dst, uint16_t protocolNumber, uint8_t TxQueueIndex)
 Deliver the processed packet to the underlying socket. More...
 
Ptr< QKDBufferGetBufferByBufferPosition (const uint32_t &index)
 Return QKDBuffer by the buffer position. More...
 
Ptr< QKDBufferGetBufferBySourceAddress (const Address &sourceAddress)
 Return QKDBuffer Position in m_buffers on the basis of source IPv4Address. More...
 
uint32_t GetBufferPosition (const Address &sourceAddress)
 Help function that returns QKDBuffer Position in m_buffers on the basis of source IPv4Address . More...
 
QKDManager::Connection GetConnectionDetails (const uint32_t &bufferId)
 Get connection details based on destination IPv4Address. More...
 
QKDManager::Connection GetConnectionDetails (const Address sourceAddress)
 Return QKDBufferID on the basis of destination IPv4Address . More...
 
Ptr< NodeGetDestinationNode (const Address dst)
 Get destination node where destination ndoe is pointing to. More...
 
uint32_t GetLinkThresholdValue (const Address sourceAddress)
 Help function. More...
 
std::vector< QKDManager::addressGroupGetMapOfSourceDestinationAddresses ()
 Help function called from routing protocol to fetch the map of source and destination addresses. More...
 
uint32_t GetNBuffers (void) const
 Return the number of buffers connected with QKD Manager of the node. More...
 
uint32_t GetNumberOfDestinations ()
 Help function called from routing protocol to count the number of neighbors. More...
 
Ptr< NetDeviceGetSourceNetDevice (const Address address)
 Help function used to detect netDevice by using MAC address when the packet is encrypted. More...
 
void HandleAccept (Ptr< Socket > socket, const Address &from)
 Handle an incoming connection. More...
 
bool IsMarkedAsEncrypt (Ptr< Packet > p)
 Check whether packet is marked to be encrypted. More...
 
Ptr< PacketMarkAuthenticate (Ptr< Packet > p)
 Mark packet to be authenticated only! More...
 
Ptr< PacketMarkEncrypt (Ptr< Packet > p)
 Mark packet to be encrypted and authenticated Note: All encrypted packets MUST be authenticated as well! More...
 
Ptr< PacketMarkEncrypt (Ptr< Packet > p, uint8_t encryptionType, uint8_t authneticationType)
 Mark packet to be encrypted and authenticated Note: All encrypted packets MUST be authenticated as well! More...
 
Ptr< PacketMarkMaxDelay (Ptr< Packet > p, uint32_t delay)
 Mark maxDelay of packet to be tolerated (in miliseconds) More...
 
Ipv4Address PopulateLinkStatusesForNeighbors (Ptr< Packet > p, std::map< Ipv4Address, NeigborDetail > distancesToDestination, uint8_t tos, uint32_t &outputInterface)
 Help function. More...
 
std::vector< Ptr< Packet > > ProcessIncomingRequest (Ptr< NetDevice > src, Ptr< Packet > p)
 Called from QKDManager::VirtualReceive This function is used to decrypt the packet after receiving from the underlay network. More...
 
std::vector< Ptr< Packet > > ProcessOutgoingRequest (Ptr< NetDevice > src, Ptr< Packet > p)
 Called from QKDManager::VirtualSend This function is used to encrypt the packet prior sending to the underlay network. More...
 
void SetLinkThresholdValue (const uint32_t &proposedLaValue, const Address sourceAddress)
 Help function. More...
 
uint32_t TosToBand (const uint32_t &tos)
 Help function used to convert TOS value to TOS band which is used for determing the priority of the delivery. More...
 
void UseRealStorages (const bool &useRealStorages)
 Do we use real storages (save QKDKey on hard-drive)? More...
 
void VirtualReceive (Ptr< Socket > socket)
 Forward packet from underlay network through the socket to the QKDNetDevice Note: USED ONLY IN OVERLAY NETWORK. More...
 
void VirtualReceiveSimpleNetwork (Ptr< NetDevice > device, Ptr< const Packet > p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType)
 Process packet (Decrypt and authentication check) after receiving at NetDevice, and forward it to upper layer. More...
 
bool VirtualSend (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber, uint8_t TxQueueIndex)
 Forward packet from device to the underlay network through the socket Thus, this is L2 of Overlay network. More...
 
bool VirtualSendOverlay (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
 Forward packet from device to the underlay network through the socket. 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<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. 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)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (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)
 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 Member Functions

void UpdatePublicChannelMetric (const Address sourceAddress)
 Help function. More...
 
void UpdateQuantumChannelMetric (const Address sourceAddress)
 Help function. More...
 

Private Attributes

std::vector< Ptr< QKDBuffer > > m_buffers
 
std::map< Address, Connectionm_destinations
 
uint32_t m_linksThresholdHelpValue
 
bool m_useRealStorages
 

Additional Inherited Members

Detailed Description

Introspection did not find any typical Config paths.

QKD manager is installed at each QKD node and it represents the backbone of QKDNetSim.


Attributes

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

It contains a list of QKD Virtual NetDevices from the overlying network, a list of active sockets in the underlying network, a list of IP addresses of interfaces in the overlying and underlying network and a list of associated QKD buffers and QKD cryptos. Therefore, QKD manager serves as a bond between the overlying NetDevices and sockets in the underlying network. Since the QKD link is always realized in a point-to-point manner between exactly two nodes [30], QKD manager stores information about NetDevices of the corresponding link and associated QKD buffers. Using the MAC address of NetDevice, QKD manager unambiguously distinguishes QKD crypto and QKD buffer which are utilized for packet processing. Finally, QKD manager delivers the processed packet to the underlying network. Receiving and processing of incoming packets follows identical procedure but in reverse order.

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

Constructor & Destructor Documentation

ns3::QKDManager::QKDManager ( )

Constructor.

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

References m_linksThresholdHelpValue, and NS_LOG_FUNCTION.

ns3::QKDManager::~QKDManager ( )
virtual

Destructor.

Definition at line 61 of file qkd-manager.cc.

Member Function Documentation

bool ns3::QKDManager::AddNewKeyMaterial ( const Address  sourceAddress,
uint32_t &  newKey 
)

Add new key material to the corresponding QKD Buffer.

Returns true if success, false otherwise.

Parameters
Ptr<NetDevice>
uint32_t&
Returns
bool

Definition at line 988 of file qkd-manager.cc.

References CalculateLinkThresholdHelpValue(), FetchConnection(), m_destinations, NS_LOG_DEBUG, NS_LOG_FUNCTION, UpdatePublicChannelMetric(), and UpdateQuantumChannelMetric().

+ Here is the call graph for this function:

void ns3::QKDManager::AddNewLink ( Ptr< QKDNetDevice NetDeviceSrc,
Ptr< QKDNetDevice NetDeviceDst,
Ptr< NetDevice IPNetDeviceSrc,
Ptr< NetDevice IPNetDeviceDst,
Ptr< QKDCrypto Crypto,
Ptr< Socket socket,
Ptr< Socket socketSink,
std::string  socketType,
uint32_t  underlayPortNumber,
Ipv4InterfaceAddress  IPQKDSrc,
Ipv4InterfaceAddress  IPQKDDst,
Ipv4InterfaceAddress  IPSrc,
Ipv4InterfaceAddress  IPDst,
bool  isMaster,
uint32_t  Mmin,
uint32_t  Mthr,
uint32_t  Mmax,
uint32_t  Mcurrent,
uint32_t  channelID 
)
void ns3::QKDManager::CalculateLinkThresholdHelpValue ( )

Help function.

Definition at line 275 of file qkd-manager.cc.

References m_linksThresholdHelpValue, and NS_LOG_FUNCTION.

Referenced by AddNewKeyMaterial().

+ Here is the caller graph for this function:

bool ns3::QKDManager::CheckForResourcesToProcessThePacket ( Ptr< Packet p,
const Address  sourceAddress 
)

Help function used to call determine TOSband and call original CheckForResourcesToProcessThePacket with all params.

Parameters
Ptr<Packet>
Ipv4Address
Returns
bool

Definition at line 1068 of file qkd-manager.cc.

References FetchPacketTos(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), NS_LOG_WARN, and TosToBand().

Referenced by ForwardToSocket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::QKDManager::CheckForResourcesToProcessThePacket ( Ptr< Packet p,
const Address  sourceAddress,
const uint32_t &  TOSband 
)

Used to chech whether there are enough resources to encrypt/decrypt the packet.

Function calls QKDCrypto to which QKDBuffer is forwarded as parameter. QKDCrypto is in charge to analyze the packet's requirements and QKDBuffer status.

Parameters
Ptr<Packet>
Ipv4Address
Returns
bool

Definition at line 1088 of file qkd-manager.cc.

References FetchConnection(), m_destinations, NS_ASSERT, and NS_LOG_WARN.

+ Here is the call graph for this function:

void ns3::QKDManager::ConnectionFailed ( Ptr< Socket socket)

Indicates that the TCP connection for socket in param failed to establish.

Parameters
Ptr<Socket>

Definition at line 715 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::QKDHelper::InstallOverlayQKD().

+ Here is the caller graph for this function:

void ns3::QKDManager::ConnectionSucceeded ( Ptr< Socket socket)

Indicates that the TCP connection for socket in param is established.

Parameters
Ptr<Socket>

Definition at line 707 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::QKDHelper::InstallOverlayQKD().

+ Here is the caller graph for this function:

void ns3::QKDManager::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 73 of file qkd-manager.cc.

References ns3::Object::DoDispose(), m_buffers, m_destinations, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::QKDManager::DoInitialize ( void  )
protectedvirtual

function

Reimplemented from ns3::Object.

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

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

+ Here is the call graph for this function:

std::map< Address, QKDManager::Connection >::iterator ns3::QKDManager::FetchConnection ( const Address  sourceAddress)
uint32_t ns3::QKDManager::FetchLinkThresholdHelpValue ( )

Help function.

Returns
uint32_t

Definition at line 268 of file qkd-manager.cc.

References m_linksThresholdHelpValue, and NS_LOG_FUNCTION.

uint32_t ns3::QKDManager::FetchMaxNumberOfRecordedKeyChargingTimePeriods ( Ipv4Address  nextHop)

Help Function (not used)

Parameters
Ipv4Address
Returns
uint32_t

Definition at line 963 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

uint32_t ns3::QKDManager::FetchPacketTos ( Ptr< Packet p)

Help function used to fetch TOS value from the packet.

Parameters
Ptr<Packet>p
Returns
uint32_t

Definition at line 1120 of file qkd-manager.cc.

References ns3::Packet::GetSize(), ns3::QKDInternalTOSTag::GetTos(), ns3::SocketIpTosTag::GetTos(), ns3::Packet::GetUid(), NS_LOG_FUNCTION, NS_LOG_WARN, and ns3::Packet::PeekPacketTag().

Referenced by CheckForResourcesToProcessThePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::QKDManager::FetchPublicChannelPerformance ( Ipv4Address  nextHop)

Fetch performances of the public channel.

Definition at line 956 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

uint8_t ns3::QKDManager::FetchStatusForDestinationBuffer ( Ptr< NetDevice src)

Called from traffic-control/module/qkd-pfifo-fast-queue-disc This function needs to check the status of QKDBuffer.

According to the information obtained, packet from corresponding queue will be served

Parameters
Ptr<NetDevice>QKDNetDevice

Definition at line 812 of file qkd-manager.cc.

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

+ Here is the call graph for this function:

bool ns3::QKDManager::ForwardToSocket ( Ptr< Packet originalPacket,
Ptr< Packet packet,
const Address source,
const Address dst,
uint16_t  protocolNumber,
uint8_t  TxQueueIndex 
)

Deliver the processed packet to the underlying socket.

Parameters
Ptr<Packet>
Ptr<Packet>
Address
Address
uint16_tTxQueueIndex

Since some routing protocols might not be aware of QKDbuffers and QKD materials in these buffers, we need to analyze the status of QKD buffers priori processing of packet. If there is enough key material packet is processed. Otherwise, packet is silently discarded

Definition at line 408 of file qkd-manager.cc.

References CheckForResourcesToProcessThePacket(), FetchConnection(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_destinations, NS_LOG_DEBUG, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by VirtualSend().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< QKDBuffer > ns3::QKDManager::GetBufferByBufferPosition ( const uint32_t &  index)

Return QKDBuffer by the buffer position.

Usually called from QKDGraphManager

Parameters
uint32_tbufferId
Returns
Ptr<QKDBuffer>

Definition at line 794 of file qkd-manager.cc.

References m_buffers, and NS_LOG_FUNCTION.

Ptr< QKDBuffer > ns3::QKDManager::GetBufferBySourceAddress ( const Address sourceAddress)

Return QKDBuffer Position in m_buffers on the basis of source IPv4Address.

Parameters
Address
Returns
Ptr<QKDBuffer>

Definition at line 782 of file qkd-manager.cc.

References FetchConnection(), m_destinations, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

uint32_t ns3::QKDManager::GetBufferPosition ( const Address sourceAddress)

Help function that returns QKDBuffer Position in m_buffers on the basis of source IPv4Address .

Returns
uint32_t

Definition at line 759 of file qkd-manager.cc.

References FetchConnection(), m_buffers, m_destinations, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

QKDManager::Connection ns3::QKDManager::GetConnectionDetails ( const uint32_t &  bufferId)

Get connection details based on destination IPv4Address.

Parameters
Ipv4Address
Returns
QKDManager::Connection

Definition at line 744 of file qkd-manager.cc.

References m_destinations, and NS_LOG_FUNCTION.

QKDManager::Connection ns3::QKDManager::GetConnectionDetails ( const Address  sourceAddress)

Return QKDBufferID on the basis of destination IPv4Address .

Returns
uint32_t

Definition at line 732 of file qkd-manager.cc.

References FetchConnection(), m_destinations, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Ptr< Node > ns3::QKDManager::GetDestinationNode ( const Address  dst)

Get destination node where destination ndoe is pointing to.

The information is obtained from connection details of the link Currently not in use anywhere!

Parameters
Ipv4Address
Returns
Ptr<Node>

Definition at line 722 of file qkd-manager.cc.

References FetchConnection(), m_destinations, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

uint32_t ns3::QKDManager::GetLinkThresholdValue ( const Address  sourceAddress)

Help function.

Returns
uint32_t

Definition at line 287 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

std::vector< QKDManager::addressGroup > ns3::QKDManager::GetMapOfSourceDestinationAddresses ( )

Help function called from routing protocol to fetch the map of source and destination addresses.

Used in HELLO process to determin which nodes are neighbors

Returns
std::map<Ipv4Address, Ipv4Address>

Definition at line 216 of file qkd-manager.cc.

References ns3::QKDManager::addressGroup::destinationAddress, ns3::QKDManager::addressGroup::destinationNode, m_destinations, NS_LOG_FUNCTION, and ns3::QKDManager::addressGroup::sourceAddress.

uint32_t ns3::QKDManager::GetNBuffers ( void  ) const

Return the number of buffers connected with QKD Manager of the node.

Returns
uint32_t

Definition at line 805 of file qkd-manager.cc.

References m_buffers, and NS_LOG_FUNCTION.

uint32_t ns3::QKDManager::GetNumberOfDestinations ( )

Help function called from routing protocol to count the number of neighbors.

Returns
uint32_t

Definition at line 211 of file qkd-manager.cc.

References m_destinations.

Ptr< NetDevice > ns3::QKDManager::GetSourceNetDevice ( const Address  address)

Help function used to detect netDevice by using MAC address when the packet is encrypted.

Parameters
constAddress address
Returns
Ptr<NetDevice>

Definition at line 316 of file qkd-manager.cc.

References first::address, m_destinations, and NS_LOG_FUNCTION.

Referenced by VirtualSend().

+ Here is the caller graph for this function:

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

Get the type ID.

Returns
the object TypeId

Definition at line 43 of file qkd-manager.cc.

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

+ Here is the call graph for this function:

void ns3::QKDManager::HandleAccept ( Ptr< Socket socket,
const Address from 
)

Handle an incoming connection.

Parameters
socketthe incoming connection socket
fromthe address the connection is from

Definition at line 700 of file qkd-manager.cc.

References ns3::MakeCallback(), NS_LOG_FUNCTION, ns3::Socket::SetRecvCallback(), and VirtualReceive().

Referenced by ns3::QKDHelper::InstallOverlayQKD().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::QKDManager::IsMarkedAsEncrypt ( Ptr< Packet p)

Check whether packet is marked to be encrypted.

Parameters
Ptr<Packet>
Returns
bool

Definition at line 1009 of file qkd-manager.cc.

References ns3::Packet::GetUid(), NS_LOG_FUNCTION, and ns3::Packet::PeekPacketTag().

+ Here is the call graph for this function:

Ptr< Packet > ns3::QKDManager::MarkAuthenticate ( Ptr< Packet p)

Mark packet to be authenticated only!

Parameters
Ptr<Packet>
Returns
Ptr<Packet>

Definition at line 1046 of file qkd-manager.cc.

References ns3::Packet::GetSize(), ns3::Packet::GetUid(), MarkEncrypt(), NS_LOG_FUNCTION, and QKDCRYPTO_AUTH_VMAC.

+ Here is the call graph for this function:

Ptr< Packet > ns3::QKDManager::MarkEncrypt ( Ptr< Packet p)

Mark packet to be encrypted and authenticated Note: All encrypted packets MUST be authenticated as well!

Parameters
Ptr<Packet>
Returns
Ptr<Packet>

Definition at line 1023 of file qkd-manager.cc.

References ns3::Packet::GetSize(), ns3::Packet::GetUid(), NS_LOG_FUNCTION, QKDCRYPTO_AUTH_VMAC, and QKDCRYPTO_OTP.

Referenced by MarkAuthenticate().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Packet > ns3::QKDManager::MarkEncrypt ( Ptr< Packet p,
uint8_t  encryptionType,
uint8_t  authneticationType 
)

Mark packet to be encrypted and authenticated Note: All encrypted packets MUST be authenticated as well!

Parameters
Ptr<Packet>
uint_8_tencryptionType
uint_8_tauthenticationType
Returns
Ptr<Packet>

Definition at line 1053 of file qkd-manager.cc.

References ns3::Packet::AddPacketTag(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), and ns3::Packet::RemovePacketTag().

+ Here is the call graph for this function:

Ptr< Packet > ns3::QKDManager::MarkMaxDelay ( Ptr< Packet p,
uint32_t  delay 
)

Mark maxDelay of packet to be tolerated (in miliseconds)

Parameters
Ptr<Packet>
Returns
Ptr<Packet>

Definition at line 1032 of file qkd-manager.cc.

References ns3::Packet::AddPacketTag(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), and ns3::Packet::RemovePacketTag().

+ Here is the call graph for this function:

Ipv4Address ns3::QKDManager::PopulateLinkStatusesForNeighbors ( Ptr< Packet p,
std::map< Ipv4Address, NeigborDetail distancesToDestination,
uint8_t  tos,
uint32_t &  outputInterface 
)

Help function.

Definition at line 255 of file qkd-manager.cc.

References NS_LOG_DEBUG.

std::vector< Ptr< Packet > > ns3::QKDManager::ProcessIncomingRequest ( Ptr< NetDevice src,
Ptr< Packet p 
)

Called from QKDManager::VirtualReceive This function is used to decrypt the packet after receiving from the underlay network.

Parameters
Ptr<NetDevice>src

Definition at line 840 of file qkd-manager.cc.

References ns3::Packet::Copy(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_destinations, NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), UpdatePublicChannelMetric(), and UpdateQuantumChannelMetric().

Referenced by VirtualReceive(), and VirtualReceiveSimpleNetwork().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< Ptr< Packet > > ns3::QKDManager::ProcessOutgoingRequest ( Ptr< NetDevice src,
Ptr< Packet p 
)
void ns3::QKDManager::SetLinkThresholdValue ( const uint32_t &  proposedLaValue,
const Address  sourceAddress 
)

Help function.

Definition at line 281 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

uint32_t ns3::QKDManager::TosToBand ( const uint32_t &  tos)

Help function used to convert TOS value to TOS band which is used for determing the priority of the delivery.

Parameters
uint32_t
Returns
uint32_t

Definition at line 1147 of file qkd-manager.cc.

References ns3::Socket::IpTos2Priority(), NS_LOG_FUNCTION, and NS_LOG_WARN.

Referenced by CheckForResourcesToProcessThePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::QKDManager::UpdatePublicChannelMetric ( const Address  sourceAddress)
private

Help function.

Definition at line 974 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

Referenced by AddNewKeyMaterial(), ProcessIncomingRequest(), and ProcessOutgoingRequest().

+ Here is the caller graph for this function:

void ns3::QKDManager::UpdateQuantumChannelMetric ( const Address  sourceAddress)
private

Help function.

Definition at line 982 of file qkd-manager.cc.

References NS_LOG_FUNCTION.

Referenced by AddNewKeyMaterial(), ProcessIncomingRequest(), and ProcessOutgoingRequest().

+ Here is the caller graph for this function:

void ns3::QKDManager::UseRealStorages ( const bool &  useRealStorages)

Do we use real storages (save QKDKey on hard-drive)?

Definition at line 101 of file qkd-manager.cc.

References m_useRealStorages.

void ns3::QKDManager::VirtualReceive ( Ptr< Socket socket)
void ns3::QKDManager::VirtualReceiveSimpleNetwork ( Ptr< NetDevice device,
Ptr< const Packet p,
uint16_t  protocol,
const Address from,
const Address to,
NetDevice::PacketType  packetType 
)

Process packet (Decrypt and authentication check) after receiving at NetDevice, and forward it to upper layer.

USED ONLY IN SINGLE TCP/IP NETWORK!

Parameters
Ptr<NetDevice>device

Definition at line 526 of file qkd-manager.cc.

References ns3::Packet::Copy(), FetchConnection(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_destinations, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ProcessIncomingRequest().

Referenced by ns3::QKDHelper::InstallQKD().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::QKDManager::VirtualSend ( Ptr< Packet packet,
const Address source,
const Address dest,
uint16_t  protocolNumber,
uint8_t  TxQueueIndex 
)

Forward packet from device to the underlay network through the socket Thus, this is L2 of Overlay network.

Also, used in single TCP/IP network and it is called from QKDL2SingleTCPIPPfifoFastQueueDisc::TransmitL2. Since sometimes device queue can be closed but packet was forwarded to processing it is necessery to forward TxQueueIndex and check queue status. For overlay network this is not the case, since packet in overlay network is forwarded to underlying interface. Therefore, TxQueueIndex is set to 0.

Parameters
Ptr<Packet>
Address
Address
uint16_tTxQueueIndex
Returns
bool

Definition at line 346 of file qkd-manager.cc.

References ns3::Packet::Copy(), ForwardToSocket(), ns3::Packet::GetSize(), GetSourceNetDevice(), ns3::Packet::GetUid(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ProcessOutgoingRequest().

Referenced by VirtualSendOverlay().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::QKDManager::VirtualSendOverlay ( Ptr< Packet packet,
const Address source,
const Address dest,
uint16_t  protocolNumber 
)

Forward packet from device to the underlay network through the socket.

Thus, this is L2 of Overlay network

Parameters
Ptr<Packet>
Address
Address
uint16_t
Returns
bool

Definition at line 340 of file qkd-manager.cc.

References VirtualSend().

Referenced by ns3::QKDHelper::InstallOverlayQKD().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<Ptr<QKDBuffer> > ns3::QKDManager::m_buffers
private
uint32_t ns3::QKDManager::m_linksThresholdHelpValue
private
bool ns3::QKDManager::m_useRealStorages
private

Definition at line 546 of file qkd-manager.h.

Referenced by AddNewLink(), and UseRealStorages().


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