Introspection did not find any typical Config paths. More...
#include "qkd-manager.h"
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< QKDBuffer > | GetBufferByBufferPosition (const uint32_t &index) |
Return QKDBuffer by the buffer position. More... | |
Ptr< QKDBuffer > | GetBufferBySourceAddress (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< Node > | GetDestinationNode (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::addressGroup > | GetMapOfSourceDestinationAddresses () |
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< NetDevice > | GetSourceNetDevice (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< Packet > | MarkAuthenticate (Ptr< Packet > p) |
Mark packet to be authenticated only! More... | |
Ptr< Packet > | MarkEncrypt (Ptr< Packet > p) |
Mark packet to be encrypted and authenticated Note: All encrypted packets MUST be authenticated as well! More... | |
Ptr< Packet > | 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! More... | |
Ptr< Packet > | MarkMaxDelay (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... | |
![]() | |
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... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
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 TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
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, Connection > | m_destinations |
uint32_t | m_linksThresholdHelpValue |
bool | m_useRealStorages |
Additional Inherited Members | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Introspection did not find any typical Config paths.
QKD manager is installed at each QKD node and it represents the backbone of QKDNetSim.
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.
ns3::QKDManager::QKDManager | ( | ) |
Constructor.
Definition at line 55 of file qkd-manager.cc.
References m_linksThresholdHelpValue, and NS_LOG_FUNCTION.
|
virtual |
Destructor.
Definition at line 61 of file qkd-manager.cc.
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.
Ptr<NetDevice> | |
uint32_t& |
Definition at line 988 of file qkd-manager.cc.
References CalculateLinkThresholdHelpValue(), FetchConnection(), m_destinations, NS_LOG_DEBUG, NS_LOG_FUNCTION, UpdatePublicChannelMetric(), and UpdateQuantumChannelMetric().
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 | ||
) |
Establish new QKD connection by adding new QKD link and record connection details This function is called from internet/helper/qkd-helper.cc.
Ptr<QKDNetDevice> | |
Ptr<QKDNetDevice> | |
Ptr<NetDevice> | |
Ptr<NetDevice> | |
Ptr<QKDCrypto> | |
Ptr<Socket> | |
Ipv4InterfaceAddress | |
Ipv4InterfaceAddress | |
Ipv4InterfaceAddress | |
Ipv4InterfaceAddress | |
bool | |
bool | |
bool | |
uint32_t | |
uint32_t | |
uint32_t | |
uint32_t |
Definition at line 106 of file qkd-manager.cc.
References ns3::QKDManager::Connection::buffer, ns3::QKDManager::Connection::bufferId, ns3::QKDManager::Connection::channelID, ns3::QKDManager::Connection::crypto, ns3::Node::GetId(), ns3::Ipv4InterfaceAddress::GetMask(), ns3::QKDManager::Connection::IPDst, ns3::QKDManager::Connection::IPNetDeviceDst, ns3::QKDManager::Connection::IPNetDeviceSrc, ns3::QKDManager::Connection::IPQKDDst, ns3::QKDManager::Connection::IPQKDSrc, ns3::QKDManager::Connection::IPSrc, ns3::QKDManager::Connection::isMaster, m_buffers, m_destinations, m_useRealStorages, NS_ASSERT, NS_LOG_FUNCTION, ns3::QKDManager::Connection::publicChannelMetric, ns3::QKDManager::Connection::QKDNetDeviceDst, ns3::QKDManager::Connection::QKDNetDeviceSrc, ns3::QKDManager::Connection::quantumChannelMetric, ns3::QKDManager::Connection::socket, ns3::QKDManager::Connection::socketSink, ns3::QKDManager::Connection::socketType, and ns3::QKDManager::Connection::underlayPortNumber.
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().
bool ns3::QKDManager::CheckForResourcesToProcessThePacket | ( | Ptr< Packet > | p, |
const Address | sourceAddress | ||
) |
Help function used to call determine TOSband and call original CheckForResourcesToProcessThePacket with all params.
Ptr<Packet> | |
Ipv4Address |
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().
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.
Ptr<Packet> | |
Ipv4Address |
Definition at line 1088 of file qkd-manager.cc.
References FetchConnection(), m_destinations, NS_ASSERT, and NS_LOG_WARN.
Indicates that the TCP connection for socket in param failed to establish.
Ptr<Socket> |
Definition at line 715 of file qkd-manager.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::QKDHelper::InstallOverlayQKD().
Indicates that the TCP connection for socket in param is established.
Ptr<Socket> |
Definition at line 707 of file qkd-manager.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::QKDHelper::InstallOverlayQKD().
|
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.
|
protectedvirtual |
function
Reimplemented from ns3::Object.
Definition at line 66 of file qkd-manager.cc.
References ns3::Object::DoInitialize(), and NS_LOG_FUNCTION.
std::map< Address, QKDManager::Connection >::iterator ns3::QKDManager::FetchConnection | ( | const Address | sourceAddress | ) |
Help function.
Definition at line 294 of file qkd-manager.cc.
References m_destinations, and NS_LOG_FUNCTION.
Referenced by AddNewKeyMaterial(), CheckForResourcesToProcessThePacket(), ForwardToSocket(), GetBufferBySourceAddress(), GetBufferPosition(), GetConnectionDetails(), GetDestinationNode(), and VirtualReceiveSimpleNetwork().
uint32_t ns3::QKDManager::FetchLinkThresholdHelpValue | ( | ) |
Help function.
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)
Ipv4Address |
Definition at line 963 of file qkd-manager.cc.
References NS_LOG_FUNCTION.
Help function used to fetch TOS value from the packet.
Ptr<Packet> | p |
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().
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.
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
Ptr<NetDevice> | QKDNetDevice |
Definition at line 812 of file qkd-manager.cc.
References ns3::Node::GetId(), m_destinations, and NS_LOG_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.
Ptr<Packet> | |
Ptr<Packet> | |
Address | |
Address | |
uint16_t | TxQueueIndex |
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().
Return QKDBuffer by the buffer position.
Usually called from QKDGraphManager
uint32_t | bufferId |
Definition at line 794 of file qkd-manager.cc.
References m_buffers, and NS_LOG_FUNCTION.
Return QKDBuffer Position in m_buffers on the basis of source IPv4Address.
Address |
Definition at line 782 of file qkd-manager.cc.
References FetchConnection(), m_destinations, and NS_LOG_FUNCTION.
uint32_t ns3::QKDManager::GetBufferPosition | ( | const Address & | sourceAddress | ) |
Help function that returns QKDBuffer Position in m_buffers on the basis of source IPv4Address .
Definition at line 759 of file qkd-manager.cc.
References FetchConnection(), m_buffers, m_destinations, and NS_LOG_FUNCTION.
QKDManager::Connection ns3::QKDManager::GetConnectionDetails | ( | const uint32_t & | bufferId | ) |
Get connection details based on destination IPv4Address.
Ipv4Address |
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 .
Definition at line 732 of file qkd-manager.cc.
References FetchConnection(), m_destinations, and NS_LOG_FUNCTION.
Get destination node where destination ndoe is pointing to.
The information is obtained from connection details of the link Currently not in use anywhere!
Ipv4Address |
Definition at line 722 of file qkd-manager.cc.
References FetchConnection(), m_destinations, and NS_LOG_FUNCTION.
uint32_t ns3::QKDManager::GetLinkThresholdValue | ( | const Address | sourceAddress | ) |
Help function.
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
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.
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.
Definition at line 211 of file qkd-manager.cc.
References m_destinations.
Help function used to detect netDevice by using MAC address when the packet is encrypted.
const | Address address |
Definition at line 316 of file qkd-manager.cc.
References first::address, m_destinations, and NS_LOG_FUNCTION.
Referenced by VirtualSend().
|
static |
Get the type ID.
Definition at line 43 of file qkd-manager.cc.
References m_buffers, ns3::MakeObjectVectorAccessor(), and ns3::TypeId::SetParent().
Handle an incoming connection.
socket | the incoming connection socket |
from | the 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().
Check whether packet is marked to be encrypted.
Ptr<Packet> |
Definition at line 1009 of file qkd-manager.cc.
References ns3::Packet::GetUid(), NS_LOG_FUNCTION, and ns3::Packet::PeekPacketTag().
Mark packet to be authenticated only!
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.
Mark packet to be encrypted and authenticated Note: All encrypted packets MUST be authenticated as well!
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().
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!
Ptr<Packet> | |
uint_8_t | encryptionType |
uint_8_t | authenticationType |
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().
Mark maxDelay of packet to be tolerated (in miliseconds)
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().
Ipv4Address ns3::QKDManager::PopulateLinkStatusesForNeighbors | ( | Ptr< Packet > | p, |
std::map< Ipv4Address, NeigborDetail > | distancesToDestination, | ||
uint8_t | tos, | ||
uint32_t & | outputInterface | ||
) |
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.
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().
std::vector< Ptr< Packet > > ns3::QKDManager::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.
Ptr<NetDevice> | src |
Definition at line 884 of file qkd-manager.cc.
References ns3::Packet::AddPacketTag(), ns3::Packet::Copy(), ns3::QKDInternalTag::GetAuthenticateValue(), ns3::QKDInternalTag::GetEncryptValue(), ns3::QKDInternalTag::GetMaxDelayValue(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_destinations, NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), ns3::QKDInternalTag::SetAuthenticateValue(), ns3::QKDInternalTag::SetEncryptValue(), ns3::QKDInternalTag::SetMaxDelayValue(), UpdatePublicChannelMetric(), and UpdateQuantumChannelMetric().
Referenced by VirtualSend().
void ns3::QKDManager::SetLinkThresholdValue | ( | const uint32_t & | proposedLaValue, |
const Address | sourceAddress | ||
) |
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.
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().
|
private |
Help function.
Definition at line 974 of file qkd-manager.cc.
References NS_LOG_FUNCTION.
Referenced by AddNewKeyMaterial(), ProcessIncomingRequest(), and ProcessOutgoingRequest().
|
private |
Help function.
Definition at line 982 of file qkd-manager.cc.
References NS_LOG_FUNCTION.
Referenced by AddNewKeyMaterial(), ProcessIncomingRequest(), and ProcessOutgoingRequest().
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.
Forward packet from underlay network through the socket to the QKDNetDevice Note: USED ONLY IN OVERLAY NETWORK.
Ptr<Socket> |
Definition at line 588 of file qkd-manager.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::Socket::GetBoundNetDevice(), ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), ns3::InetSocketAddress::IsMatchingType(), m_destinations, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::NetDevice::PACKET_HOST, ProcessIncomingRequest(), ns3::Socket::Recv(), and ns3::Socket::RecvFrom().
Referenced by HandleAccept(), and ns3::QKDHelper::InstallOverlayQKD().
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!
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().
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.
Ptr<Packet> | |
Address | |
Address | |
uint16_t | TxQueueIndex |
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().
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
Ptr<Packet> | |
Address | |
Address | |
uint16_t |
Definition at line 340 of file qkd-manager.cc.
References VirtualSend().
Referenced by ns3::QKDHelper::InstallOverlayQKD().
Definition at line 550 of file qkd-manager.h.
Referenced by AddNewLink(), DoDispose(), GetBufferByBufferPosition(), GetBufferPosition(), GetNBuffers(), and GetTypeId().
|
private |
Definition at line 548 of file qkd-manager.h.
Referenced by AddNewKeyMaterial(), AddNewLink(), CheckForResourcesToProcessThePacket(), DoDispose(), FetchConnection(), FetchStatusForDestinationBuffer(), ForwardToSocket(), GetBufferBySourceAddress(), GetBufferPosition(), GetConnectionDetails(), GetDestinationNode(), GetMapOfSourceDestinationAddresses(), GetNumberOfDestinations(), GetSourceNetDevice(), ProcessIncomingRequest(), ProcessOutgoingRequest(), VirtualReceive(), and VirtualReceiveSimpleNetwork().
|
private |
Definition at line 544 of file qkd-manager.h.
Referenced by CalculateLinkThresholdHelpValue(), FetchLinkThresholdHelpValue(), and QKDManager().
|
private |
Definition at line 546 of file qkd-manager.h.
Referenced by AddNewLink(), and UseRealStorages().