Establish secure communication on application lavel to use the key and test LKSM. More...
#include "qkd-app-014.h"
Classes | |
struct | AddressHash |
Hashing for the Address class. More... | |
struct | QKDApp014Key |
The cryptographic key at the application layer. More... | |
struct | QKDApp014KeyBuffer |
The key buffer at the application layer. More... | |
Public Types | |
enum | QKDApp014State { NOT_STARTED , INITIALIZED , READY , WAIT , SEND_DATA , DECRYPT_DATA , STOPPED } |
The application states. More... | |
Public Types inherited from ns3::Application | |
typedef void(* | DelayAddressCallback) (const Time &delay, const Address &from) |
Common callback signature for packet delay and address. More... | |
typedef void(* | StateTransitionCallback) (const std::string &oldState, const std::string &newState) |
Common signature used by callbacks to application's state transition trace source. More... | |
Public Member Functions | |
QKDApp014 () | |
Constructor. More... | |
virtual | ~QKDApp014 () |
Destructor. More... | |
void | AddAuthKeyInKeyStore (QKDApp014::QKDApp014Key &key) |
Add a new key to the authentication key store. More... | |
void | AddEncKeyInKeyStore (QKDApp014::QKDApp014Key &key) |
Add a new key to the encryption key store. More... | |
void | AddKeyInInboundKeyStore (QKDApp014::QKDApp014Key &key) |
Add a new key to the inbound key store. More... | |
void | CancelScheduledAction (uint32_t eventId) |
Cancel the scheduled event/action. More... | |
void | CheckAppBufferState () |
Check the state of the application key buffer. More... | |
void | CheckAppState () |
Check the conditions to change the application state. More... | |
bool | ConnectionRequestedFromKMS (Ptr< Socket > socket, const Address &address) |
Callback function after the connection response from the KMS has been received. More... | |
void | ConnectionSignalingToAppFailed (Ptr< Socket > socket) |
Callback function after the signaling connection to the APP has failed. More... | |
void | ConnectionSignalingToAppSucceeded (Ptr< Socket > socket) |
Callback function after the signaling connection to the APP is complete. More... | |
void | ConnectionToAppFailed (Ptr< Socket > socket) |
Callback function after the connection to the APP has failed. More... | |
void | ConnectionToAppSucceeded (Ptr< Socket > socket) |
Callback function after the connection to the APP is complete. More... | |
void | ConnectionToKMSFailed (Ptr< Socket > socket) |
Callback function after the connection to the KMS has failed. More... | |
void | ConnectionToKMSSucceeded (Ptr< Socket > socket) |
Callback function after the connection to the KMS is complete. More... | |
void | DataPacketReceivedFromApp (const Ptr< Packet > &p, const Address &from, Ptr< Socket > socket) |
Check for the TCP segmentation of the data packets received from the peer QKD application. More... | |
void | DataToKMSSend (Ptr< Socket >, uint32_t) |
Callback function to notify that data to KMS has been sent. More... | |
QKDApp014State | GetAppState () const |
Get the current state of the application. More... | |
std::string | GetAppStateString () const |
Get the current state of the application in the string format. More... | |
uint32_t | GetAuthenticationKeySize () |
Get required key size for the choosen authentication algorithm. More... | |
uint32_t | GetEncryptionKeySize () |
Get required key size for the choosen encryption algorithm. More... | |
UUID | GetId (void) |
Get the application identifier. More... | |
QKDApp014::QKDApp014Key | GetKeyFromAppKeyBuffer (std::string keyId, std::string keyType) |
Get the key from the application key buffer. More... | |
QKDApp014::QKDApp014Key | GetKeyFromAppKeyBuffer (uint32_t keyType) |
Get the key from the application key buffer. More... | |
void | GetKeysFromKMS (uint32_t keyType) |
Request keys from the KMS (ETSI QKD 014 - Get key method). More... | |
void | GetKeyWithKeyIDs () |
Requests keys with given identifiers from the KMS (ETSI QKD 014 - Get key with key IDs method). More... | |
std::string | GetPacketContent (uint32_t msgLength=0) |
Generate a random packet (message) of a given size. More... | |
void | GetStatusFromKMS (uint32_t keyType) |
Request status information from the KMS (ETSI QKD 014 - Get status method). More... | |
void | HandleAcceptFromApp (Ptr< Socket > s, const Address &from) |
Handle an incoming connection from the peer QKD application. More... | |
void | HandleAcceptFromKMS (Ptr< Socket > s, const Address &from) |
Handle an incoming connection from the KMS. More... | |
void | HandleAcceptSignalingFromApp (Ptr< Socket > s, const Address &from) |
Handle a signaling incoming connection from the peer QKD application. More... | |
void | HandlePeerCloseFromApp (Ptr< Socket > socket) |
Handle a connection close from the peer QKD application. More... | |
void | HandlePeerCloseFromKMS (Ptr< Socket > socket) |
Handle a connection close from the KMS. More... | |
void | HandlePeerCloseSignalingFromApp (Ptr< Socket > socket) |
Handle a signaling connection close from the peer QKD application. More... | |
void | HandlePeerErrorFromApp (Ptr< Socket > socket) |
Handle a connection error from the peer QKD application. More... | |
void | HandlePeerErrorFromKMS (Ptr< Socket > socket) |
Handle a connection error from the KMS. More... | |
void | HandlePeerErrorSignalingFromApp (Ptr< Socket > socket) |
Handle a signaling connection error from the peer QKD application. More... | |
void | HandleReadFromApp (Ptr< Socket > socket) |
Handle a packet received from the peer QKD application. More... | |
void | HandleReadFromKMS (Ptr< Socket > socket) |
Handle a packet received from the KMS application. More... | |
void | HandleReadSignalingFromApp (Ptr< Socket > socket) |
Handle a signaling packet received from the peer QKD application. More... | |
void | InitializeAppKeyBuffer () |
Initialize the application key buffer. More... | |
void | PacketReceivedFromKMS (const Ptr< Packet > &p, const Address &from, Ptr< Socket > socket) |
Check for the TCP segmentation of the packets received from the KMS. More... | |
void | PrepareSendSocketToApp () |
Prepare the send socket to communicate with the peer QKD Application. More... | |
void | PrepareSendSocketToKMS () |
Prepare the send socket to communicate with the KMS Application. More... | |
void | PrepareSinkSocketFromApp () |
Prepare the sink socket to listen from the peer QKD Application. More... | |
void | PrepareSinkSocketFromKMS () |
Prepare the sink socket to listen from the KMS Application. More... | |
void | PrintAppBufferStatusInformation () |
Print the status information on the application key buffer. More... | |
void | PrintTemporaryKeyStoreContent () |
Print the content of the temporary key store. More... | |
void | ProcessDataPacketFromApp (QKDAppHeader header, Ptr< Packet > packet, Ptr< Socket > socket) |
Process the data packets from the peer QKD application. More... | |
void | ProcessGetKeyResponse (HTTPMessage &header, nlohmann::json jGetKeyResponse) |
Process the GET_KEY response from the KMS. More... | |
void | ProcessGetKeyWithKeyIDsResponse (HTTPMessage &header, nlohmann::json jGetKeyWithKeyIDsResponse) |
Process the Get Key with Key IDs response from the KMS. More... | |
void | ProcessResponseFromKMS (HTTPMessage &header, Ptr< Packet > packet, Ptr< Socket > socket) |
Process the response from the KMS application. More... | |
void | ProcessSignalingPacketFromApp (HTTPMessage &header, Ptr< Packet > packet, Ptr< Socket > socket) |
Process the signaling packets received from the peer QKD application. More... | |
void | ProcessStatusResponse (HTTPMessage &header, nlohmann::json jstatusResponse) |
Process the status response from the KMS. More... | |
void | RemoveKeysFromTemporaryKeyStore (std::vector< std::string > keyIds) |
Remove keys from the temporary key store. More... | |
uint32_t | ScheduleAction (Time t, std::string action) |
Schedule the action. More... | |
void | SetEncryptionAndAuthenticationSettings (uint32_t encryptionType, uint32_t authenticationType, uint32_t authenticationTagLengthInBits) |
Set the encryption and the authentication algorithms. More... | |
void | SetKsidAuthentication (UUID val) |
Set the authentication identifier. More... | |
void | SetKsidEncryption (UUID val) |
Set the encryption identifier. More... | |
void | Setup (std::string socketType, Address src, Address dst, Address kms, UUID dstSaeId, std::string type) |
Configure the application. More... | |
void | Setup (std::string socketType, Address src, Address dst, Address kms, UUID dstSaeId, uint32_t packetSize, uint32_t nPackets, DataRate dataRate, std::string type) |
Configure the application. More... | |
void | SignalingPacketReceivedFromApp (const Ptr< Packet > &p, const Address &from, Ptr< Socket > socket) |
Check for the TCP segmentation of the signaling packets received from the peer QKD application. More... | |
void | SwitchAppState (QKDApp014State state) |
Change the state of the application. More... | |
Public Member Functions inherited from ns3::Application | |
Application () | |
~Application () override | |
Ptr< Node > | GetNode () const |
void | SetNode (Ptr< Node > node) |
void | SetStartTime (Time start) |
Specify application start time. More... | |
void | SetStopTime (Time stop) |
Specify application stop time. 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... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. 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... | |
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... | |
SimpleRefCount & | operator= (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 std::string | GetAppStateString (QKDApp014State state) |
Convert application state to the string format. More... | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Application | |
static TypeId | GetTypeId () |
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... | |
Public Attributes | |
TracedCallback< Ptr< const Packet >, std::string > | m_mxTrace |
A trace for the missed time slots to send data packets. More... | |
TracedCallback< Ptr< const Packet > > | m_rxKmsTrace |
A trace for received packets from the KMS. More... | |
TracedCallback< Ptr< const Packet > > | m_rxSigTrace |
A trace for received signaling packets. More... | |
TracedCallback< Ptr< const Packet >, std::string > | m_rxTrace |
A trace for received data packets. More... | |
ns3::TracedCallback< const std::string &, const std::string & > | m_stateTransitionTrace |
The posible application state transitions. More... | |
TracedCallback< Ptr< const Packet > > | m_txKmsTrace |
A trace for transmitted packets to the KMS. More... | |
TracedCallback< Ptr< const Packet > > | m_txSigTrace |
A trace for transmitted signaling packets. More... | |
TracedCallback< Ptr< const Packet >, std::string > | m_txTrace |
A trace for transmitted data packets. More... | |
Private Member Functions | |
void | AppTransitionTree (void) |
Transition through a tree of the application states and trigger actions. More... | |
std::string | CreateKeyIdField (std::string keyId) |
Adjust the encryption key identifier for the QKDApp header. More... | |
void | ExchangeInfoMessages (std::string ksid, std::vector< std::string > keyIds, HTTPMessage::HttpStatus statusCode=HTTPMessage::Ok) |
Exchange key identifiers between sending and receiving application. More... | |
uint32_t | GetETSIMethod (void) |
Map the HTTP response and obtrain the request method. More... | |
uint32_t | GetKeyType (void) |
Map the HTTP response and obtain the key type. More... | |
void | MemoriesRequestApp (std::vector< std::string > keyIds) |
Memories the HTTP request made to the peer QKD application. More... | |
void | MemoriesRequestKMS (uint32_t methodType, uint32_t keyType=0) |
Memories the HTTP request made to the local KMS. More... | |
std::string | ReadKeyIdField (std::string keyId) |
Rebuild the key identifier for the QKDApp header. More... | |
void | RequestProcessedApp (void) |
Remove request from the HTTP requests store (once the response from the peer application has been processed). More... | |
void | RequestProcessedKMS (void) |
Remove the request from the HTTP requests store (once the response from the KMS has been processed). More... | |
void | ScheduleTx (void) |
Schedule the time slot to send the data packets. More... | |
void | SendPacket (void) |
Send the application packet (includes the generation of a random message and optional encryption or/and authentication on the message). More... | |
virtual void | StartApplication (void) |
virtual void | StopApplication (void) |
Application specific shutdown code. More... | |
Private Attributes | |
uint64_t | m_aesLifetime |
The AES key lifetime. More... | |
QKDApp014KeyBuffer | m_appKeyBuffer |
The application key buffer. More... | |
QKDApp014State | m_appState |
The application state. More... | |
uint32_t | m_authenticationTagLengthInBits |
The size of the authentication tag in bits (32 by default). More... | |
TracedCallback< Ptr< Packet >, std::string > | m_authenticationTrace |
A trace callback for the authentication event. More... | |
QKDEncryptor::AuthenticationType | m_authenticationType |
The authentication algorithm. More... | |
uint32_t | m_authenticationTypeInt |
The authentication algorithm. More... | |
std::unordered_map< Address, Ptr< Packet >, AddressHash > | m_buffer_kms |
The buffer for the received packets from the KMS (fragmentation). More... | |
std::unordered_map< Address, Ptr< Packet >, AddressHash > | m_buffer_QKDApp014 |
The buffer for received data packets (fragmentation). More... | |
std::unordered_map< Address, Ptr< Packet >, AddressHash > | m_buffer_sig |
The buffer for the received signaling packets (fragmentation). More... | |
DataRate | m_dataRate |
The application data rate. More... | |
uint32_t | m_dataSent |
The amount of the sent data. More... | |
TracedCallback< Ptr< Packet >, std::string > | m_deauthenticationTrace |
A trace callback for the authentication check event. More... | |
TracedCallback< Ptr< Packet > > | m_decryptionTrace |
A trace callback for the decryption event. More... | |
UUID | m_dstSaeId |
The peer application identifier. More... | |
TracedCallback< Ptr< Packet > > | m_encryptionTrace |
A trace callback for the encryption event. More... | |
QKDEncryptor::EncryptionType | m_encryptionType |
The encryption algorithm. More... | |
uint32_t | m_encryptionTypeInt |
The encryption algorithm. More... | |
Ptr< QKDEncryptor > | m_encryptor |
The QKD encryptor. More... | |
std::vector< std::vector< std::string > > | m_httpRequestsApp |
A vector of HTTP requests sent to the peer application. More... | |
std::vector< std::pair< uint32_t, uint32_t > > | m_httpRequestsKMS |
A vector of HTTP requests set to the KMS. More... | |
UUID | m_id |
The application identifier. More... | |
bool | m_internalAppWait |
The indicator for the longer wait (used after the GetKey error!). More... | |
nlohmann::json | m_keyIDs |
The latest received key identifiers from the sender application. More... | |
Address | m_kms |
The local KMS address. More... | |
UUID | m_ksid_auth |
The authentication key stream identifier. More... | |
UUID | m_ksid_enc |
The encryption key stream identifier. More... | |
Address | m_local |
The local address for the data transmission. More... | |
Address | m_localSignaling |
The local address for the signaling data transmission. More... | |
uint32_t | m_master |
Is a master (sender/primary) application? More... | |
uint32_t | m_numberOfKeysKMS |
The number of keys to fetch per request. More... | |
TracedCallback< const uint32_t & > | m_obtainedKeyMaterialTrace |
A trace callback for the obtained key material. More... | |
uint32_t | m_packetSize |
The data packet size. More... | |
uint32_t | m_packetsSent |
The number of sent data packets. More... | |
Address | m_peer |
The address of the peer for the data transmission. More... | |
Address | m_peerSignaling |
The address of the peer for the signaling data transmission. More... | |
Ptr< UniformRandomVariable > | m_random |
The uniform random variable. More... | |
std::map< uint32_t, EventId > | m_scheduledEvents |
The map of scheduled events. More... | |
Ptr< Socket > | m_sendDataSocketApp |
The sending socket for the data. More... | |
EventId | m_sendEvent |
The data transmission event. More... | |
Ptr< Socket > | m_sendSignalingSocketApp |
The sending socket for the signaling messages. More... | |
Ptr< Socket > | m_sendSocketToKMS |
The sending socket to the KMS. More... | |
Ptr< Socket > | m_sinkDataSocketApp |
The receiving socket for the data. More... | |
Ptr< Socket > | m_sinkSignalingSocketApp |
The receiving socket for the signaling messages. More... | |
Ptr< Socket > | m_sinkSocketFromKMS |
The receiving socket from the KMS. More... | |
std::string | m_socketType |
The sockets type. More... | |
TypeId | m_tid |
The type identifier. More... | |
std::multimap< std::string, std::string > | m_transitionMatrix |
The map of the possible state transitions. More... | |
uint32_t | m_useCrypto |
Execute actual cryptographic algorithms? More... | |
Time | m_waitInsufficient |
The amount of time spent waiting before issuing a new GET_KEY request when the previous one resulted in an error "inssuficient amount of keys". More... | |
Time | m_waitTransform |
The amount of time spent waiting before issuing a new GET_KEY request when the previous one resulted in an error "keys are being transformed". More... | |
Static Private Attributes | |
static uint32_t | m_applicationCounts = 0 |
The number of running applications. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Application | |
void | DoDispose () override |
Destructor implementation. More... | |
void | DoInitialize () override |
Initialize() implementation. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. 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... | |
Protected Attributes inherited from ns3::Application | |
Ptr< Node > | m_node |
The node that this application is installed on. More... | |
EventId | m_startEvent |
The event that will fire at m_startTime to start the application. More... | |
Time | m_startTime |
The simulation time that the application will start. More... | |
EventId | m_stopEvent |
The event that will fire at m_stopTime to end the application. More... | |
Time | m_stopTime |
The simulation time that the application will end. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Establish secure communication on application lavel to use the key and test LKSM.
This application was written to complement simple application to consume keys so a generic QKDApp014 name was selected. The application (Alice) implements sockets for connection with counter-party application (Bob) and implements sockets for communication with local key management system. At the moment, application follows ETSI QKD 014 standardization exchanging HTTP requests/responses to obtain details about the key from its local key management system. Obtained keys from Get key response are stored in temporary memory on master QKDApp014 (Alice) in JSON data structure, from where they are moved to an application key buffer when confirmation of keys from peer application (Bob) is recieved. Keys obtained from Get key with key IDs are directly stored to the application key buffer and confirmation message for keys is sent to its peer application (Alice). Application (Alice) use keys from the application key buffer to apply security services on its data. QKD application header is then added to the protected data and sent to peer application. Slave QKD application (Bob) will process recieved protected packet based on information in QKD header and keys from the application key buffer. Communication between peers needed to negotiate keys was not included in ETSI014, and this application use HTTP messages for this purpose.
Definition at line 81 of file qkd-app-014.h.
The application states.
Enumerator | |
---|---|
NOT_STARTED | |
INITIALIZED | |
READY | |
WAIT | |
SEND_DATA | |
DECRYPT_DATA | |
STOPPED |
Definition at line 143 of file qkd-app-014.h.
ns3::QKDApp014::QKDApp014 | ( | ) |
Constructor.
SETUP
Definition at line 153 of file qkd-app-014.cc.
References m_applicationCounts, m_id, m_random, m_transitionMatrix, and ns3::UUID::Random().
|
virtual |
Destructor.
Definition at line 190 of file qkd-app-014.cc.
References m_sendDataSocketApp, m_sendSignalingSocketApp, m_sendSocketToKMS, m_sinkDataSocketApp, m_sinkSignalingSocketApp, and m_sinkSocketFromKMS.
void ns3::QKDApp014::AddAuthKeyInKeyStore | ( | QKDApp014::QKDApp014Key & | key | ) |
Add a new key to the authentication key store.
key | The application authentication key. |
Definition at line 781 of file qkd-app-014.cc.
References m_appKeyBuffer, NS_LOG_FUNCTION, and ns3::QKDApp014::QKDApp014KeyBuffer::outboundAuthKeyStore.
Referenced by ProcessSignalingPacketFromApp().
void ns3::QKDApp014::AddEncKeyInKeyStore | ( | QKDApp014::QKDApp014Key & | key | ) |
Add a new key to the encryption key store.
key | The application encryption key. |
Definition at line 774 of file qkd-app-014.cc.
References m_appKeyBuffer, NS_LOG_FUNCTION, and ns3::QKDApp014::QKDApp014KeyBuffer::outboundEncKeyStore.
Referenced by ProcessSignalingPacketFromApp().
void ns3::QKDApp014::AddKeyInInboundKeyStore | ( | QKDApp014::QKDApp014Key & | key | ) |
Add a new key to the inbound key store.
key | The application key. |
Definition at line 767 of file qkd-app-014.cc.
References ns3::QKDApp014::QKDApp014KeyBuffer::inboundKeyStore, m_appKeyBuffer, and NS_LOG_FUNCTION.
Referenced by ProcessGetKeyWithKeyIDsResponse().
|
private |
Transition through a tree of the application states and trigger actions.
STATE functions
Definition at line 1978 of file qkd-app-014.cc.
References GetAuthenticationKeySize(), GetEncryptionKeySize(), GetStatusFromKMS(), INITIALIZED, m_appState, m_master, NS_FATAL_ERROR, NS_LOG_FUNCTION, PrepareSendSocketToApp(), PrepareSendSocketToKMS(), READY, SendPacket(), SwitchAppState(), and WAIT.
Referenced by StartApplication().
void ns3::QKDApp014::CancelScheduledAction | ( | uint32_t | eventId | ) |
Cancel the scheduled event/action.
eventId | The identifier of the scheduled action. |
Definition at line 318 of file qkd-app-014.cc.
References ns3::Simulator::Cancel(), m_scheduledEvents, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
void ns3::QKDApp014::CheckAppBufferState | ( | ) |
Check the state of the application key buffer.
This function checks the state of the application key buffer and submits a new GET_KEY request if neccessary.
Definition at line 806 of file qkd-app-014.cc.
References CheckAppState(), GetAuthenticationKeySize(), GetEncryptionKeySize(), GetKeysFromKMS(), m_appKeyBuffer, m_internalAppWait, m_master, NS_LOG_FUNCTION, ns3::QKDApp014::QKDApp014KeyBuffer::outboundAuthKeyStore, and ns3::QKDApp014::QKDApp014KeyBuffer::outboundEncKeyStore.
Referenced by ProcessStatusResponse(), ScheduleAction(), and SendPacket().
void ns3::QKDApp014::CheckAppState | ( | ) |
Check the conditions to change the application state.
Based on the state of the application key buffer, the application changes the state between READY and WAIT.
Definition at line 821 of file qkd-app-014.cc.
References GetAuthenticationKeySize(), GetEncryptionKeySize(), m_appKeyBuffer, m_appState, NS_LOG_FUNCTION, ns3::QKDApp014::QKDApp014KeyBuffer::outboundAuthKeyStore, ns3::QKDApp014::QKDApp014KeyBuffer::outboundEncKeyStore, READY, SwitchAppState(), and WAIT.
Referenced by CheckAppBufferState(), and ProcessSignalingPacketFromApp().
Callback function after the connection response from the KMS has been received.
socket | The connected socket. |
address | The address of the KMS. |
Definition at line 510 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), and NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromKMS().
Callback function after the signaling connection to the APP has failed.
socket | The connected socket. |
Definition at line 588 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToApp().
Callback function after the signaling connection to the APP is complete.
socket | The connected socket. |
Definition at line 582 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToApp().
Callback function after the connection to the APP has failed.
socket | The connected socket. |
Definition at line 576 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToApp().
Callback function after the connection to the APP is complete.
socket | The connected socket. |
Definition at line 570 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToApp().
Callback function after the connection to the KMS has failed.
socket | The connected socket. |
Definition at line 564 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToKMS().
Callback function after the connection to the KMS is complete.
socket | The connected socket. |
Definition at line 558 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToKMS().
|
private |
Adjust the encryption key identifier for the QKDApp header.
keyId | The key identifier. |
This function only removes '-' symbols from the key identifier which is in UUID format.
Definition at line 2179 of file qkd-app-014.cc.
Referenced by SendPacket().
void ns3::QKDApp014::DataPacketReceivedFromApp | ( | const Ptr< Packet > & | p, |
const Address & | from, | ||
Ptr< Socket > | socket | ||
) |
Check for the TCP segmentation of the data packets received from the peer QKD application.
p | The received data packet. |
from | The address of the peer application. |
socket | The connected socket. |
Definition at line 1122 of file qkd-app-014.cc.
References ns3::Packet::AddAtEnd(), ns3::Packet::CreateFragment(), GetAppStateString(), ns3::QKDAppHeader::GetLength(), ns3::QKDAppHeader::GetSerializedSize(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_appState, m_buffer_QKDApp014, m_dstSaeId, m_master, m_rxTrace, NS_ABORT_IF, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::PeekHeader(), ProcessDataPacketFromApp(), READY, ns3::Packet::RemoveAtStart(), ns3::Packet::RemoveHeader(), and ns3::UUID::string().
Referenced by HandleReadFromApp().
Callback function to notify that data to KMS has been sent.
The | connected socket. |
The | amount of data. |
Definition at line 726 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSendSocketToKMS().
|
private |
Exchange key identifiers between sending and receiving application.
ksid | The key stream identifier. |
keyIds | The vector cointaning key identifiers to negotiate. |
statusCode | The HTTP status code of the response (the default status is 200:Ok). |
Primary (sender) application sends vector of key identifiers previously obtained from the KMS. Replica (receiver) application obtains the keys from the KMS using received identifiers. The success of this operation is reported to the primary application.
Definition at line 1908 of file qkd-app-014.cc.
References ns3::HTTPMessage::CreateRequest(), ns3::HTTPMessage::CreateResponse(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_dataSent, m_master, m_packetsSent, m_sendSignalingSocketApp, m_sinkSignalingSocketApp, m_txSigTrace, MemoriesRequestApp(), NS_ASSERT, NS_LOG_FUNCTION, PrepareSendSocketToApp(), PrepareSinkSocketFromApp(), ns3::Socket::Send(), and ns3::HTTPMessage::ToString().
Referenced by ProcessGetKeyResponse(), and ProcessGetKeyWithKeyIDsResponse().
QKDApp014::QKDApp014State ns3::QKDApp014::GetAppState | ( | ) | const |
Get the current state of the application.
Definition at line 2020 of file qkd-app-014.cc.
References m_appState.
std::string ns3::QKDApp014::GetAppStateString | ( | ) | const |
Get the current state of the application in the string format.
Definition at line 2060 of file qkd-app-014.cc.
References m_appState.
Referenced by DataPacketReceivedFromApp(), ScheduleTx(), SendPacket(), StartApplication(), and SwitchAppState().
|
static |
Convert application state to the string format.
state | The state. |
Definition at line 2026 of file qkd-app-014.cc.
References DECRYPT_DATA, INITIALIZED, NOT_STARTED, NS_FATAL_ERROR, READY, SEND_DATA, STOPPED, and WAIT.
uint32_t ns3::QKDApp014::GetAuthenticationKeySize | ( | ) |
Get required key size for the choosen authentication algorithm.
Definition at line 2221 of file qkd-app-014.cc.
References m_authenticationType, ns3::QKDEncryptor::QKDCRYPTO_AUTH_MD5, ns3::QKDEncryptor::QKDCRYPTO_AUTH_SHA1, ns3::QKDEncryptor::QKDCRYPTO_AUTH_VMAC, and ns3::QKDEncryptor::UNAUTHENTICATED.
Referenced by AppTransitionTree(), CheckAppBufferState(), CheckAppState(), GetKeysFromKMS(), ProcessDataPacketFromApp(), and SendPacket().
uint32_t ns3::QKDApp014::GetEncryptionKeySize | ( | ) |
Get required key size for the choosen encryption algorithm.
Definition at line 2198 of file qkd-app-014.cc.
References m_encryptionType, m_packetSize, NS_LOG_FUNCTION, ns3::QKDEncryptor::QKDCRYPTO_AES, ns3::QKDEncryptor::QKDCRYPTO_OTP, and ns3::QKDEncryptor::UNENCRYPTED.
Referenced by AppTransitionTree(), CheckAppBufferState(), CheckAppState(), and GetKeysFromKMS().
|
private |
Map the HTTP response and obtrain the request method.
Definition at line 937 of file qkd-app-014.cc.
References m_httpRequestsKMS.
Referenced by ProcessResponseFromKMS().
|
inline |
Get the application identifier.
Definition at line 561 of file qkd-app-014.h.
References m_id.
Referenced by PrepareSinkSocketFromApp().
QKDApp014::QKDApp014Key ns3::QKDApp014::GetKeyFromAppKeyBuffer | ( | std::string | keyId, |
std::string | keyType | ||
) |
Get the key from the application key buffer.
keyId | The key identifier. |
keyType | The key type. |
Definition at line 874 of file qkd-app-014.cc.
References ns3::QKDApp014::QKDApp014KeyBuffer::inboundKeyStore, m_appKeyBuffer, m_encryptionTypeInt, m_packetSize, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
QKDApp014::QKDApp014Key ns3::QKDApp014::GetKeyFromAppKeyBuffer | ( | uint32_t | keyType | ) |
Get the key from the application key buffer.
keyType | The type of the key to obtain: 0-encryption key, 1-authentication key. |
Definition at line 837 of file qkd-app-014.cc.
References m_appKeyBuffer, m_packetSize, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::QKDApp014::QKDApp014KeyBuffer::outboundAuthKeyStore, and ns3::QKDApp014::QKDApp014KeyBuffer::outboundEncKeyStore.
Referenced by ProcessDataPacketFromApp(), and SendPacket().
void ns3::QKDApp014::GetKeysFromKMS | ( | uint32_t | keyType | ) |
Request keys from the KMS (ETSI QKD 014 - Get key method).
keyType | The key type (encryption or authentication). |
Definition at line 1329 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::HTTPMessage::CreateRequest(), GetAuthenticationKeySize(), GetEncryptionKeySize(), ns3::InetSocketAddress::GetIpv4(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_kms, m_ksid_auth, m_ksid_enc, m_master, m_numberOfKeysKMS, m_sendSocketToKMS, m_sinkSocketFromKMS, m_txKmsTrace, MemoriesRequestKMS(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, PrepareSendSocketToKMS(), PrepareSinkSocketFromKMS(), ns3::Ipv4Address::Print(), ns3::Socket::Send(), ns3::UUID::string(), nlohmann::to_string(), and ns3::HTTPMessage::ToString().
Referenced by CheckAppBufferState(), and ProcessSignalingPacketFromApp().
|
private |
Map the HTTP response and obtain the key type.
Definition at line 943 of file qkd-app-014.cc.
References m_httpRequestsKMS.
Referenced by ProcessGetKeyResponse().
void ns3::QKDApp014::GetKeyWithKeyIDs | ( | ) |
Requests keys with given identifiers from the KMS (ETSI QKD 014 - Get key with key IDs method).
The key identifiers are locally stored at the application, and that's why the input to this function is void.
Definition at line 1476 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::HTTPMessage::CreateRequest(), ns3::InetSocketAddress::GetIpv4(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_keyIDs, m_kms, m_master, m_sendSocketToKMS, m_sinkSocketFromKMS, m_txKmsTrace, MemoriesRequestKMS(), NS_ASSERT, NS_LOG_FUNCTION, PrepareSendSocketToKMS(), PrepareSinkSocketFromKMS(), ns3::Ipv4Address::Print(), ns3::Socket::Send(), and ns3::HTTPMessage::ToString().
Referenced by ProcessSignalingPacketFromApp().
std::string ns3::QKDApp014::GetPacketContent | ( | uint32_t | msgLength = 0 | ) |
Generate a random packet (message) of a given size.
msgLength | The message size. |
Definition at line 2154 of file qkd-app-014.cc.
References ns3::UniformRandomVariable::GetValue(), m_packetSize, m_random, and NS_LOG_FUNCTION.
Referenced by SendPacket().
void ns3::QKDApp014::GetStatusFromKMS | ( | uint32_t | keyType | ) |
Request status information from the KMS (ETSI QKD 014 - Get status method).
keyType | The key type (encryption or authentication). |
KEY MANAGEMENT functions
Definition at line 1284 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::HTTPMessage::CreateRequest(), ns3::InetSocketAddress::GetIpv4(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), m_kms, m_ksid_auth, m_ksid_enc, m_sendSocketToKMS, m_sinkSocketFromKMS, m_txKmsTrace, MemoriesRequestKMS(), NS_ASSERT, NS_LOG_FUNCTION, PrepareSendSocketToKMS(), PrepareSinkSocketFromKMS(), ns3::Ipv4Address::Print(), ns3::Socket::Send(), ns3::UUID::string(), and ns3::HTTPMessage::ToString().
Referenced by AppTransitionTree().
|
static |
Get the type ID.
Definition at line 44 of file qkd-app-014.cc.
References ns3::TcpSocketFactory::GetTypeId(), m_aesLifetime, m_authenticationTagLengthInBits, m_authenticationTrace, m_authenticationTypeInt, m_deauthenticationTrace, m_decryptionTrace, m_encryptionTrace, m_encryptionTypeInt, m_mxTrace, m_numberOfKeysKMS, m_obtainedKeyMaterialTrace, m_rxKmsTrace, m_rxSigTrace, m_rxTrace, m_stateTransitionTrace, m_tid, m_txKmsTrace, m_txSigTrace, m_txTrace, m_useCrypto, m_waitInsufficient, m_waitTransform, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeTypeIdAccessor(), ns3::MakeTypeIdChecker(), ns3::MakeUintegerAccessor(), ns3::Seconds(), and ns3::TypeId::SetParent().
Handle an incoming connection from the peer QKD application.
s | The incoming connection socket. |
from | The address the connection is from. |
Definition at line 534 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), HandleReadFromApp(), ns3::MakeCallback(), NS_LOG_FUNCTION, and ns3::Socket::SetRecvCallback().
Referenced by PrepareSinkSocketFromApp().
Handle an incoming connection from the KMS.
s | The incoming connection socket. |
from | The address the connection is from. |
Definition at line 522 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), HandleReadFromKMS(), ns3::MakeCallback(), NS_LOG_FUNCTION, and ns3::Socket::SetRecvCallback().
Referenced by PrepareSinkSocketFromKMS().
Handle a signaling incoming connection from the peer QKD application.
s | The incoming connection socket. |
from | The address the connection is from. |
Definition at line 546 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), HandleReadSignalingFromApp(), ns3::MakeCallback(), NS_LOG_FUNCTION, and ns3::Socket::SetRecvCallback().
Referenced by PrepareSinkSocketFromApp().
Handle a connection close from the peer QKD application.
socket | The connected socket. |
Definition at line 606 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromApp().
Handle a connection close from the KMS.
socket | The connected socket. |
Definition at line 594 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromKMS().
Handle a signaling connection close from the peer QKD application.
socket | The connected socket. |
Definition at line 617 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromApp().
Handle a connection error from the peer QKD application.
socket | The connected socket. |
Definition at line 611 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromApp().
Handle a connection error from the KMS.
socket | The connected socket. |
Definition at line 600 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromKMS().
Handle a signaling connection error from the peer QKD application.
socket | the connected socket. |
Definition at line 623 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareSinkSocketFromApp().
Handle a packet received from the peer QKD application.
socket | The receiving socket. |
Definition at line 662 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), DataPacketReceivedFromApp(), ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), ns3::InetSocketAddress::IsMatchingType(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::Socket::RecvFrom().
Referenced by HandleAcceptFromApp(), and PrepareSinkSocketFromApp().
Handle a packet received from the KMS application.
socket | The receiving socket. |
Definition at line 629 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), ns3::InetSocketAddress::IsMatchingType(), ns3::Simulator::Now(), NS_LOG_FUNCTION, PacketReceivedFromKMS(), and ns3::Socket::RecvFrom().
Referenced by HandleAcceptFromKMS(), and PrepareSinkSocketFromKMS().
Handle a signaling packet received from the peer QKD application.
socket | The receiving socket. |
Definition at line 694 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), ns3::InetSocketAddress::GetPort(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), ns3::InetSocketAddress::IsMatchingType(), ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Socket::RecvFrom(), and SignalingPacketReceivedFromApp().
Referenced by HandleAcceptSignalingFromApp(), and PrepareSinkSocketFromApp().
void ns3::QKDApp014::InitializeAppKeyBuffer | ( | ) |
Initialize the application key buffer.
KEY BUFFER functions
Definition at line 740 of file qkd-app-014.cc.
References ns3::QKDApp014::QKDApp014KeyBuffer::inboundKeyStore, m_appKeyBuffer, NS_LOG_FUNCTION, ns3::QKDApp014::QKDApp014KeyBuffer::outboundAuthKeyStore, ns3::QKDApp014::QKDApp014KeyBuffer::outboundEncKeyStore, and ns3::QKDApp014::QKDApp014KeyBuffer::temporaryKeyStoreMaster.
Referenced by Setup(), and StopApplication().
|
private |
Memories the HTTP request made to the peer QKD application.
keyIds | The vector of key identifiers. |
Definition at line 919 of file qkd-app-014.cc.
References m_httpRequestsApp.
Referenced by ExchangeInfoMessages().
|
private |
Memories the HTTP request made to the local KMS.
methodType | The request method. |
keyType | The key type. |
HTTP requests are memorised in a vector in order to map the responses.
HTTP mapping
Definition at line 913 of file qkd-app-014.cc.
References m_httpRequestsKMS.
Referenced by GetKeysFromKMS(), GetKeyWithKeyIDs(), and GetStatusFromKMS().
void ns3::QKDApp014::PacketReceivedFromKMS | ( | const Ptr< Packet > & | p, |
const Address & | from, | ||
Ptr< Socket > | socket | ||
) |
Check for the TCP segmentation of the packets received from the KMS.
p | The received packet. |
from | The address of the KMS. |
socket | The connected socket. |
Definition at line 1523 of file qkd-app-014.cc.
References ns3::Packet::AddAtEnd(), ns3::Packet::CopyData(), ns3::Packet::CreateFragment(), ns3::HTTPMessage::GetSize(), ns3::Packet::GetSize(), ns3::HTTPMessage::GetStatusMessage(), ns3::Packet::GetUid(), ns3::HTTPMessage::IsFragmented(), m_buffer_kms, m_rxKmsTrace, NS_LOG_DEBUG, NS_LOG_FUNCTION, check-style-clang-format::parser, ProcessResponseFromKMS(), ns3::Packet::RemoveAtStart(), ns3::HTTPMessage::ToString(), and ns3::Packet::ToString().
Referenced by HandleReadFromKMS().
void ns3::QKDApp014::PrepareSendSocketToApp | ( | ) |
Prepare the send socket to communicate with the peer QKD Application.
Definition at line 404 of file qkd-app-014.cc.
References ns3::Socket::Bind(), ns3::Socket::Connect(), ConnectionSignalingToAppFailed(), ConnectionSignalingToAppSucceeded(), ConnectionToAppFailed(), ConnectionToAppSucceeded(), ns3::Socket::CreateSocket(), ns3::Application::GetNode(), ns3::TcpSocketFactory::GetTypeId(), ns3::UdpSocketFactory::GetTypeId(), m_peer, m_peerSignaling, m_sendDataSocketApp, m_sendSignalingSocketApp, m_socketType, ns3::MakeCallback(), NS_LOG_FUNCTION, and ns3::Socket::SetConnectCallback().
Referenced by AppTransitionTree(), ExchangeInfoMessages(), and SendPacket().
void ns3::QKDApp014::PrepareSendSocketToKMS | ( | ) |
Prepare the send socket to communicate with the KMS Application.
Definition at line 378 of file qkd-app-014.cc.
References ns3::Socket::Bind(), ns3::Socket::Connect(), ConnectionToKMSFailed(), ConnectionToKMSSucceeded(), ns3::InetSocketAddress::ConvertFrom(), ns3::Socket::CreateSocket(), DataToKMSSend(), ns3::Application::GetNode(), ns3::TcpSocketFactory::GetTypeId(), m_kms, m_sendSocketToKMS, ns3::MakeCallback(), NS_LOG_FUNCTION, ns3::Socket::SetConnectCallback(), ns3::Socket::SetDataSentCallback(), and ns3::Socket::ShutdownRecv().
Referenced by AppTransitionTree(), GetKeysFromKMS(), GetKeyWithKeyIDs(), and GetStatusFromKMS().
void ns3::QKDApp014::PrepareSinkSocketFromApp | ( | ) |
Prepare the sink socket to listen from the peer QKD Application.
Definition at line 448 of file qkd-app-014.cc.
References ns3::Socket::Bind(), ns3::Socket::CreateSocket(), GetId(), ns3::Application::GetNode(), ns3::TcpSocketFactory::GetTypeId(), ns3::UdpSocketFactory::GetTypeId(), HandleAcceptFromApp(), HandleAcceptSignalingFromApp(), HandlePeerCloseFromApp(), HandlePeerCloseSignalingFromApp(), HandlePeerErrorFromApp(), HandlePeerErrorSignalingFromApp(), HandleReadFromApp(), HandleReadSignalingFromApp(), ns3::Socket::Listen(), m_local, m_localSignaling, m_sinkDataSocketApp, m_sinkSignalingSocketApp, m_socketType, ns3::MakeCallback(), ns3::MakeNullCallback(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Socket::SetAcceptCallback(), ns3::Socket::SetCloseCallbacks(), ns3::Socket::SetRecvCallback(), and ns3::Socket::ShutdownSend().
Referenced by ExchangeInfoMessages(), and StartApplication().
void ns3::QKDApp014::PrepareSinkSocketFromKMS | ( | ) |
Prepare the sink socket to listen from the KMS Application.
SOCKET functions
Definition at line 340 of file qkd-app-014.cc.
References ns3::Socket::Bind(), ConnectionRequestedFromKMS(), ns3::InetSocketAddress::ConvertFrom(), ns3::Socket::CreateSocket(), ns3::Ipv4Address::GetAny(), ns3::Application::GetNode(), ns3::TcpSocketFactory::GetTypeId(), HandleAcceptFromKMS(), HandlePeerCloseFromKMS(), HandlePeerErrorFromKMS(), HandleReadFromKMS(), ns3::Socket::Listen(), m_sinkSocketFromKMS, ns3::MakeCallback(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Socket::SetAcceptCallback(), ns3::Socket::SetCloseCallbacks(), ns3::Socket::SetRecvCallback(), and ns3::Socket::ShutdownSend().
Referenced by GetKeysFromKMS(), GetKeyWithKeyIDs(), and GetStatusFromKMS().
void ns3::QKDApp014::PrintAppBufferStatusInformation | ( | ) |
Print the status information on the application key buffer.
Definition at line 798 of file qkd-app-014.cc.
References ns3::QKDApp014::QKDApp014KeyBuffer::inboundKeyStore, m_appKeyBuffer, NS_LOG_FUNCTION, ns3::QKDApp014::QKDApp014KeyBuffer::outboundAuthKeyStore, and ns3::QKDApp014::QKDApp014KeyBuffer::outboundEncKeyStore.
Referenced by ProcessSignalingPacketFromApp().
void ns3::QKDApp014::PrintTemporaryKeyStoreContent | ( | ) |
Print the content of the temporary key store.
Definition at line 788 of file qkd-app-014.cc.
References m_appKeyBuffer, NS_LOG_FUNCTION, and ns3::QKDApp014::QKDApp014KeyBuffer::temporaryKeyStoreMaster.
Referenced by ProcessGetKeyResponse(), and ProcessSignalingPacketFromApp().
void ns3::QKDApp014::ProcessDataPacketFromApp | ( | QKDAppHeader | header, |
Ptr< Packet > | packet, | ||
Ptr< Socket > | socket | ||
) |
Process the data packets from the peer QKD application.
header | The QKDApp014 packet header. |
packet | The received packet. |
socket | The receiving socket. |
Definition at line 1175 of file qkd-app-014.cc.
References ns3::Packet::CopyData(), DECRYPT_DATA, ns3::QKDAppHeader::GetAuthenticated(), ns3::QKDAppHeader::GetAuthenticationKeyId(), GetAuthenticationKeySize(), ns3::QKDAppHeader::GetAuthTag(), ns3::QKDAppHeader::GetEncrypted(), ns3::QKDAppHeader::GetEncryptionKeyId(), GetKeyFromAppKeyBuffer(), ns3::Packet::GetSize(), m_authenticationTagLengthInBits, m_encryptor, m_master, m_packetSize, m_useCrypto, NS_FATAL_ERROR, NS_LOG_FUNCTION, ReadKeyIdField(), READY, SetEncryptionAndAuthenticationSettings(), and SwitchAppState().
Referenced by DataPacketReceivedFromApp().
void ns3::QKDApp014::ProcessGetKeyResponse | ( | HTTPMessage & | header, |
nlohmann::json | jGetKeyResponse | ||
) |
Process the GET_KEY response from the KMS.
header | The received HTTP message. |
jGetKeyResponse | The JSON response payload. |
Definition at line 1649 of file qkd-app-014.cc.
References ExchangeInfoMessages(), GetKeyType(), ns3::HTTPMessage::GetStatus(), m_aesLifetime, m_appKeyBuffer, m_encryptionType, m_encryptor, m_obtainedKeyMaterialTrace, m_packetSize, m_waitInsufficient, m_waitTransform, NS_FATAL_ERROR, NS_LOG_FUNCTION, PrintTemporaryKeyStoreContent(), RequestProcessedKMS(), ScheduleAction(), and ns3::QKDApp014::QKDApp014KeyBuffer::temporaryKeyStoreMaster.
Referenced by ProcessResponseFromKMS().
void ns3::QKDApp014::ProcessGetKeyWithKeyIDsResponse | ( | HTTPMessage & | header, |
nlohmann::json | jGetKeyWithKeyIDsResponse | ||
) |
Process the Get Key with Key IDs response from the KMS.
header | The received HTTP message. |
jGetKeyWithKeyIDsResponse | The JSON response payload. |
Definition at line 1715 of file qkd-app-014.cc.
References AddKeyInInboundKeyStore(), ExchangeInfoMessages(), ns3::HTTPMessage::GetStatus(), m_aesLifetime, m_encryptor, m_obtainedKeyMaterialTrace, NS_FATAL_ERROR, NS_LOG_FUNCTION, and RequestProcessedKMS().
Referenced by ProcessResponseFromKMS().
void ns3::QKDApp014::ProcessResponseFromKMS | ( | HTTPMessage & | header, |
Ptr< Packet > | packet, | ||
Ptr< Socket > | socket | ||
) |
Process the response from the KMS application.
header | The received HTTP message. |
packet | The received packet. |
socket | The receiving socket. |
Definition at line 1587 of file qkd-app-014.cc.
References GetETSIMethod(), ns3::HTTPMessage::GetMessageBodyString(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ProcessGetKeyResponse(), ProcessGetKeyWithKeyIDsResponse(), and ProcessStatusResponse().
Referenced by PacketReceivedFromKMS().
void ns3::QKDApp014::ProcessSignalingPacketFromApp | ( | HTTPMessage & | header, |
Ptr< Packet > | packet, | ||
Ptr< Socket > | socket | ||
) |
Process the signaling packets received from the peer QKD application.
header | The received HTTP message. |
packet | The received packet. |
socket | The receiving socket. |
Definition at line 1827 of file qkd-app-014.cc.
References AddAuthKeyInKeyStore(), AddEncKeyInKeyStore(), CheckAppState(), GetKeysFromKMS(), GetKeyWithKeyIDs(), ns3::HTTPMessage::GetMessageBodyString(), ns3::Packet::GetSize(), ns3::HTTPMessage::GetStatus(), ns3::Packet::GetUid(), m_appKeyBuffer, m_httpRequestsApp, m_internalAppWait, m_keyIDs, m_master, NS_LOG_DEBUG, NS_LOG_FUNCTION, PrintAppBufferStatusInformation(), PrintTemporaryKeyStoreContent(), RemoveKeysFromTemporaryKeyStore(), RequestProcessedApp(), and ns3::QKDApp014::QKDApp014KeyBuffer::temporaryKeyStoreMaster.
Referenced by SignalingPacketReceivedFromApp().
void ns3::QKDApp014::ProcessStatusResponse | ( | HTTPMessage & | header, |
nlohmann::json | jstatusResponse | ||
) |
Process the status response from the KMS.
header | The received HTTP message. |
jstatusResponse | The JSON response payload. |
Definition at line 1622 of file qkd-app-014.cc.
References CheckAppBufferState(), ns3::HTTPMessage::GetStatus(), NS_FATAL_ERROR, NS_LOG_FUNCTION, and RequestProcessedKMS().
Referenced by ProcessResponseFromKMS().
|
private |
Rebuild the key identifier for the QKDApp header.
keyId | The key identifier from the QKDApp header. |
Definition at line 2186 of file qkd-app-014.cc.
References NS_LOG_FUNCTION.
Referenced by ProcessDataPacketFromApp().
void ns3::QKDApp014::RemoveKeysFromTemporaryKeyStore | ( | std::vector< std::string > | keyIds | ) |
Remove keys from the temporary key store.
keyIds | The key identifiers. |
Definition at line 752 of file qkd-app-014.cc.
References m_appKeyBuffer, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::QKDApp014::QKDApp014KeyBuffer::temporaryKeyStoreMaster.
Referenced by ProcessSignalingPacketFromApp().
|
private |
Remove request from the HTTP requests store (once the response from the peer application has been processed).
Definition at line 931 of file qkd-app-014.cc.
References m_httpRequestsApp.
Referenced by ProcessSignalingPacketFromApp().
|
private |
Remove the request from the HTTP requests store (once the response from the KMS has been processed).
Definition at line 925 of file qkd-app-014.cc.
References m_httpRequestsKMS.
Referenced by ProcessGetKeyResponse(), ProcessGetKeyWithKeyIDsResponse(), and ProcessStatusResponse().
uint32_t ns3::QKDApp014::ScheduleAction | ( | Time | t, |
std::string | action | ||
) |
Schedule the action.
t | The time slot to perform action. |
action | The action. |
Definition at line 296 of file qkd-app-014.cc.
References check-style-clang-format::action, CheckAppBufferState(), m_internalAppWait, m_scheduledEvents, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().
Referenced by ProcessGetKeyResponse().
|
private |
Schedule the time slot to send the data packets.
SCHEDULE functions
Definition at line 279 of file qkd-app-014.cc.
References GetAppStateString(), ns3::DataRate::GetBitRate(), m_appState, m_dataRate, m_packetSize, m_sendEvent, NOT_STARTED, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::Seconds(), SendPacket(), and STOPPED.
Referenced by SendPacket().
|
private |
Send the application packet (includes the generation of a random message and optional encryption or/and authentication on the message).
Definition at line 1025 of file qkd-app-014.cc.
References ns3::Packet::AddHeader(), CheckAppBufferState(), CreateKeyIdField(), GetAppStateString(), GetAuthenticationKeySize(), GetKeyFromAppKeyBuffer(), GetPacketContent(), ns3::QKDAppHeader::GetSerializedSize(), ns3::Packet::GetSize(), ns3::Packet::GetUid(), ns3::QKDApp014::QKDApp014Key::key, ns3::QKDApp014::QKDApp014Key::keyId, m_appState, m_authenticationTrace, m_authenticationType, m_dataSent, m_dstSaeId, m_encryptionType, m_encryptor, m_mxTrace, m_packetsSent, m_sendDataSocketApp, m_txTrace, m_useCrypto, NS_ASSERT, NS_LOG_FUNCTION, PrepareSendSocketToApp(), READY, ScheduleTx(), ns3::Socket::Send(), SEND_DATA, ns3::QKDAppHeader::SetAuthenticated(), ns3::QKDAppHeader::SetAuthenticationKeyId(), ns3::QKDAppHeader::SetAuthTag(), ns3::QKDAppHeader::SetEncrypted(), ns3::QKDAppHeader::SetEncryptionKeyId(), ns3::QKDAppHeader::SetLength(), ns3::UUID::string(), SwitchAppState(), and WAIT.
Referenced by AppTransitionTree(), and ScheduleTx().
void ns3::QKDApp014::SetEncryptionAndAuthenticationSettings | ( | uint32_t | encryptionType, |
uint32_t | authenticationType, | ||
uint32_t | authenticationTagLengthInBits | ||
) |
Set the encryption and the authentication algorithms.
ecryptionType | The encryption algorithm. |
authenticationType | The authentication algorithm. |
authenticationTagLengthInBits | The size of the authentication tag. |
ADDTIONAL functions
Definition at line 2102 of file qkd-app-014.cc.
References m_authenticationType, m_encryptionType, m_encryptor, NS_LOG_FUNCTION, ns3::QKDEncryptor::QKDCRYPTO_AES, ns3::QKDEncryptor::QKDCRYPTO_AUTH_MD5, ns3::QKDEncryptor::QKDCRYPTO_AUTH_SHA1, ns3::QKDEncryptor::QKDCRYPTO_AUTH_VMAC, ns3::QKDEncryptor::QKDCRYPTO_OTP, ns3::QKDEncryptor::UNAUTHENTICATED, and ns3::QKDEncryptor::UNENCRYPTED.
Referenced by ProcessDataPacketFromApp(), and StartApplication().
|
inline |
Set the authentication identifier.
val | The authentication identifier. |
Definition at line 112 of file qkd-app-014.h.
References m_ksid_auth.
|
inline |
Set the encryption identifier.
val | The encryption identifier. |
Definition at line 104 of file qkd-app-014.h.
References m_ksid_enc.
void ns3::QKDApp014::Setup | ( | std::string | socketType, |
Address | src, | ||
Address | dst, | ||
Address | kms, | ||
UUID | dstSaeId, | ||
std::string | type | ||
) |
Configure the application.
socketType | The socket type. |
src | The source application address. |
dst | The destination application address. |
kms | The local KMS address. |
dstSaeId | The peer application identifier. |
type | The application type, the sender or the receiver. |
Definition at line 204 of file qkd-app-014.cc.
References check-style-clang-format::type.
void ns3::QKDApp014::Setup | ( | std::string | socketType, |
Address | src, | ||
Address | dst, | ||
Address | kms, | ||
UUID | dstSaeId, | ||
uint32_t | packetSize, | ||
uint32_t | nPackets, | ||
DataRate | dataRate, | ||
std::string | type | ||
) |
Configure the application.
socketType | The socket type. |
src | The source application address. |
dst | The destination application address. |
kms | The local KMS address. |
dstSaeId | The peer application identifier. |
packetSize | The size of the data packet. |
nPackets | The number of data packets. |
dataRate | The data rate. |
type | The application type, the sender or the receiver. |
Definition at line 226 of file qkd-app-014.cc.
References ns3::InetSocketAddress::ConvertFrom(), InitializeAppKeyBuffer(), INITIALIZED, m_applicationCounts, m_appState, m_dataRate, m_dstSaeId, m_internalAppWait, m_kms, m_local, m_localSignaling, m_master, m_packetSize, m_peer, m_peerSignaling, m_socketType, NS_LOG_FUNCTION, packetSize, SwitchAppState(), and check-style-clang-format::type.
void ns3::QKDApp014::SignalingPacketReceivedFromApp | ( | const Ptr< Packet > & | p, |
const Address & | from, | ||
Ptr< Socket > | socket | ||
) |
Check for the TCP segmentation of the signaling packets received from the peer QKD application.
p | The received signaling packet. |
from | The address of the peer application. |
socket | The connected socket. |
Definition at line 1762 of file qkd-app-014.cc.
References ns3::Packet::AddAtEnd(), ns3::Packet::CopyData(), ns3::Packet::CreateFragment(), ns3::HTTPMessage::GetSize(), ns3::Packet::GetSize(), ns3::HTTPMessage::GetStatusMessage(), ns3::Packet::GetUid(), ns3::HTTPMessage::IsFragmented(), m_buffer_kms, m_rxSigTrace, NS_LOG_DEBUG, NS_LOG_FUNCTION, check-style-clang-format::parser, ProcessSignalingPacketFromApp(), ns3::Packet::RemoveAtStart(), ns3::HTTPMessage::ToString(), and ns3::Packet::ToString().
Referenced by HandleReadSignalingFromApp().
|
privatevirtual |
APPLICATION functions
Reimplemented from ns3::Application.
Definition at line 957 of file qkd-app-014.cc.
References AppTransitionTree(), GetAppStateString(), INITIALIZED, m_aesLifetime, m_appState, m_authenticationTagLengthInBits, m_authenticationTypeInt, m_encryptionTypeInt, m_local, m_master, m_packetSize, m_packetsSent, m_peer, NS_FATAL_ERROR, NS_LOG_FUNCTION, PrepareSinkSocketFromApp(), and SetEncryptionAndAuthenticationSettings().
|
privatevirtual |
Application specific shutdown code.
The StopApplication method is called at the stop time specified by Stop This method should be overridden by all or most application subclasses.
Reimplemented from ns3::Application.
Definition at line 996 of file qkd-app-014.cc.
References ns3::Simulator::Cancel(), ns3::Socket::Close(), InitializeAppKeyBuffer(), ns3::EventId::IsRunning(), m_sendDataSocketApp, m_sendEvent, m_sendSignalingSocketApp, m_sendSocketToKMS, m_sinkDataSocketApp, m_sinkSignalingSocketApp, m_sinkSocketFromKMS, NS_LOG_FUNCTION, STOPPED, and SwitchAppState().
void ns3::QKDApp014::SwitchAppState | ( | QKDApp014::QKDApp014State | state | ) |
Change the state of the application.
state | The new application state. |
Definition at line 2066 of file qkd-app-014.cc.
References GetAppStateString(), m_appState, m_stateTransitionTrace, m_transitionMatrix, NS_FATAL_ERROR, and NS_LOG_DEBUG.
Referenced by AppTransitionTree(), CheckAppState(), ProcessDataPacketFromApp(), SendPacket(), Setup(), and StopApplication().
|
private |
The AES key lifetime.
Definition at line 755 of file qkd-app-014.h.
Referenced by GetTypeId(), ProcessGetKeyResponse(), ProcessGetKeyWithKeyIDsResponse(), and StartApplication().
|
private |
The application key buffer.
Definition at line 732 of file qkd-app-014.h.
Referenced by AddAuthKeyInKeyStore(), AddEncKeyInKeyStore(), AddKeyInInboundKeyStore(), CheckAppBufferState(), CheckAppState(), GetKeyFromAppKeyBuffer(), InitializeAppKeyBuffer(), PrintAppBufferStatusInformation(), PrintTemporaryKeyStoreContent(), ProcessGetKeyResponse(), ProcessSignalingPacketFromApp(), and RemoveKeysFromTemporaryKeyStore().
|
staticprivate |
The number of running applications.
Definition at line 745 of file qkd-app-014.h.
Referenced by QKDApp014(), and Setup().
|
private |
The application state.
Definition at line 766 of file qkd-app-014.h.
Referenced by AppTransitionTree(), CheckAppState(), DataPacketReceivedFromApp(), GetAppState(), GetAppStateString(), ScheduleTx(), SendPacket(), Setup(), StartApplication(), and SwitchAppState().
|
private |
The size of the authentication tag in bits (32 by default).
Definition at line 754 of file qkd-app-014.h.
Referenced by GetTypeId(), ProcessDataPacketFromApp(), and StartApplication().
|
private |
A trace callback for the authentication event.
Definition at line 758 of file qkd-app-014.h.
Referenced by GetTypeId(), and SendPacket().
|
private |
The authentication algorithm.
Definition at line 761 of file qkd-app-014.h.
Referenced by GetAuthenticationKeySize(), SendPacket(), and SetEncryptionAndAuthenticationSettings().
|
private |
The authentication algorithm.
Definition at line 753 of file qkd-app-014.h.
Referenced by GetTypeId(), and StartApplication().
|
private |
The buffer for the received packets from the KMS (fragmentation).
Definition at line 768 of file qkd-app-014.h.
Referenced by PacketReceivedFromKMS(), and SignalingPacketReceivedFromApp().
|
private |
The buffer for received data packets (fragmentation).
Definition at line 770 of file qkd-app-014.h.
Referenced by DataPacketReceivedFromApp().
|
private |
The buffer for the received signaling packets (fragmentation).
Definition at line 769 of file qkd-app-014.h.
|
private |
The application data rate.
Definition at line 720 of file qkd-app-014.h.
Referenced by ScheduleTx(), and Setup().
|
private |
The amount of the sent data.
Definition at line 723 of file qkd-app-014.h.
Referenced by ExchangeInfoMessages(), and SendPacket().
|
private |
A trace callback for the authentication check event.
Definition at line 759 of file qkd-app-014.h.
Referenced by GetTypeId().
|
private |
A trace callback for the decryption event.
Definition at line 757 of file qkd-app-014.h.
Referenced by GetTypeId().
|
private |
The peer application identifier.
Definition at line 740 of file qkd-app-014.h.
Referenced by DataPacketReceivedFromApp(), SendPacket(), and Setup().
|
private |
A trace callback for the encryption event.
Definition at line 756 of file qkd-app-014.h.
Referenced by GetTypeId().
|
private |
The encryption algorithm.
Definition at line 760 of file qkd-app-014.h.
Referenced by GetEncryptionKeySize(), ProcessGetKeyResponse(), SendPacket(), and SetEncryptionAndAuthenticationSettings().
|
private |
The encryption algorithm.
Definition at line 752 of file qkd-app-014.h.
Referenced by GetKeyFromAppKeyBuffer(), GetTypeId(), and StartApplication().
|
private |
The QKD encryptor.
Definition at line 762 of file qkd-app-014.h.
Referenced by ProcessDataPacketFromApp(), ProcessGetKeyResponse(), ProcessGetKeyWithKeyIDsResponse(), SendPacket(), and SetEncryptionAndAuthenticationSettings().
|
private |
A vector of HTTP requests sent to the peer application.
Definition at line 737 of file qkd-app-014.h.
Referenced by MemoriesRequestApp(), ProcessSignalingPacketFromApp(), and RequestProcessedApp().
|
private |
A vector of HTTP requests set to the KMS.
Definition at line 736 of file qkd-app-014.h.
Referenced by GetETSIMethod(), GetKeyType(), MemoriesRequestKMS(), and RequestProcessedKMS().
|
private |
The application identifier.
Definition at line 739 of file qkd-app-014.h.
Referenced by QKDApp014(), and GetId().
|
private |
The indicator for the longer wait (used after the GetKey error!).
Definition at line 772 of file qkd-app-014.h.
Referenced by CheckAppBufferState(), ProcessSignalingPacketFromApp(), ScheduleAction(), and Setup().
|
private |
The latest received key identifiers from the sender application.
Definition at line 733 of file qkd-app-014.h.
Referenced by GetKeyWithKeyIDs(), and ProcessSignalingPacketFromApp().
|
private |
The local KMS address.
Definition at line 715 of file qkd-app-014.h.
Referenced by GetKeysFromKMS(), GetKeyWithKeyIDs(), GetStatusFromKMS(), PrepareSendSocketToKMS(), and Setup().
|
private |
The authentication key stream identifier.
Definition at line 743 of file qkd-app-014.h.
Referenced by GetKeysFromKMS(), GetStatusFromKMS(), and SetKsidAuthentication().
|
private |
The encryption key stream identifier.
Definition at line 742 of file qkd-app-014.h.
Referenced by GetKeysFromKMS(), GetStatusFromKMS(), and SetKsidEncryption().
|
private |
The local address for the data transmission.
Definition at line 712 of file qkd-app-014.h.
Referenced by PrepareSinkSocketFromApp(), Setup(), and StartApplication().
|
private |
The local address for the signaling data transmission.
Definition at line 713 of file qkd-app-014.h.
Referenced by PrepareSinkSocketFromApp(), and Setup().
|
private |
Is a master (sender/primary) application?
Definition at line 725 of file qkd-app-014.h.
Referenced by AppTransitionTree(), CheckAppBufferState(), DataPacketReceivedFromApp(), ExchangeInfoMessages(), GetKeysFromKMS(), GetKeyWithKeyIDs(), ProcessDataPacketFromApp(), ProcessSignalingPacketFromApp(), Setup(), and StartApplication().
TracedCallback<Ptr<const Packet>, std::string > ns3::QKDApp014::m_mxTrace |
A trace for the missed time slots to send data packets.
Definition at line 586 of file qkd-app-014.h.
Referenced by GetTypeId(), and SendPacket().
|
private |
The number of keys to fetch per request.
Definition at line 748 of file qkd-app-014.h.
Referenced by GetKeysFromKMS(), and GetTypeId().
|
private |
A trace callback for the obtained key material.
Definition at line 764 of file qkd-app-014.h.
Referenced by GetTypeId(), ProcessGetKeyResponse(), and ProcessGetKeyWithKeyIDsResponse().
|
private |
The data packet size.
Definition at line 719 of file qkd-app-014.h.
Referenced by GetEncryptionKeySize(), GetKeyFromAppKeyBuffer(), GetPacketContent(), ProcessDataPacketFromApp(), ProcessGetKeyResponse(), ScheduleTx(), Setup(), and StartApplication().
|
private |
The number of sent data packets.
Definition at line 722 of file qkd-app-014.h.
Referenced by ExchangeInfoMessages(), SendPacket(), and StartApplication().
|
private |
The address of the peer for the data transmission.
Definition at line 709 of file qkd-app-014.h.
Referenced by PrepareSendSocketToApp(), Setup(), and StartApplication().
|
private |
The address of the peer for the signaling data transmission.
Definition at line 710 of file qkd-app-014.h.
Referenced by PrepareSendSocketToApp(), and Setup().
|
private |
The uniform random variable.
Definition at line 730 of file qkd-app-014.h.
Referenced by QKDApp014(), and GetPacketContent().
TracedCallback<Ptr<const Packet> > ns3::QKDApp014::m_rxKmsTrace |
A trace for received packets from the KMS.
Definition at line 584 of file qkd-app-014.h.
Referenced by GetTypeId(), and PacketReceivedFromKMS().
TracedCallback<Ptr<const Packet> > ns3::QKDApp014::m_rxSigTrace |
A trace for received signaling packets.
Definition at line 583 of file qkd-app-014.h.
Referenced by GetTypeId(), and SignalingPacketReceivedFromApp().
TracedCallback<Ptr<const Packet>, std::string > ns3::QKDApp014::m_rxTrace |
A trace for received data packets.
Definition at line 582 of file qkd-app-014.h.
Referenced by DataPacketReceivedFromApp(), and GetTypeId().
|
private |
The map of scheduled events.
Definition at line 773 of file qkd-app-014.h.
Referenced by CancelScheduledAction(), and ScheduleAction().
The sending socket for the data.
Definition at line 703 of file qkd-app-014.h.
Referenced by ~QKDApp014(), PrepareSendSocketToApp(), SendPacket(), and StopApplication().
|
private |
The data transmission event.
Definition at line 721 of file qkd-app-014.h.
Referenced by ScheduleTx(), and StopApplication().
The sending socket for the signaling messages.
Definition at line 701 of file qkd-app-014.h.
Referenced by ~QKDApp014(), ExchangeInfoMessages(), PrepareSendSocketToApp(), and StopApplication().
The sending socket to the KMS.
Definition at line 706 of file qkd-app-014.h.
Referenced by ~QKDApp014(), GetKeysFromKMS(), GetKeyWithKeyIDs(), GetStatusFromKMS(), PrepareSendSocketToKMS(), and StopApplication().
The receiving socket for the data.
Definition at line 704 of file qkd-app-014.h.
Referenced by ~QKDApp014(), PrepareSinkSocketFromApp(), and StopApplication().
The receiving socket for the signaling messages.
Definition at line 702 of file qkd-app-014.h.
Referenced by ~QKDApp014(), ExchangeInfoMessages(), PrepareSinkSocketFromApp(), and StopApplication().
The receiving socket from the KMS.
Definition at line 707 of file qkd-app-014.h.
Referenced by ~QKDApp014(), GetKeysFromKMS(), GetKeyWithKeyIDs(), GetStatusFromKMS(), PrepareSinkSocketFromKMS(), and StopApplication().
|
private |
The sockets type.
Definition at line 717 of file qkd-app-014.h.
Referenced by PrepareSendSocketToApp(), PrepareSinkSocketFromApp(), and Setup().
ns3::TracedCallback<const std::string &, const std::string &> ns3::QKDApp014::m_stateTransitionTrace |
The posible application state transitions.
Definition at line 585 of file qkd-app-014.h.
Referenced by GetTypeId(), and SwitchAppState().
|
private |
|
private |
The map of the possible state transitions.
Definition at line 774 of file qkd-app-014.h.
Referenced by QKDApp014(), and SwitchAppState().
TracedCallback<Ptr<const Packet> > ns3::QKDApp014::m_txKmsTrace |
A trace for transmitted packets to the KMS.
Definition at line 581 of file qkd-app-014.h.
Referenced by GetKeysFromKMS(), GetKeyWithKeyIDs(), GetStatusFromKMS(), and GetTypeId().
TracedCallback<Ptr<const Packet> > ns3::QKDApp014::m_txSigTrace |
A trace for transmitted signaling packets.
Definition at line 580 of file qkd-app-014.h.
Referenced by ExchangeInfoMessages(), and GetTypeId().
TracedCallback<Ptr<const Packet>, std::string > ns3::QKDApp014::m_txTrace |
A trace for transmitted data packets.
Definition at line 579 of file qkd-app-014.h.
Referenced by GetTypeId(), and SendPacket().
|
private |
Execute actual cryptographic algorithms?
Definition at line 751 of file qkd-app-014.h.
Referenced by GetTypeId(), ProcessDataPacketFromApp(), and SendPacket().
|
private |
The amount of time spent waiting before issuing a new GET_KEY request when the previous one resulted in an error "inssuficient amount of keys".
Definition at line 727 of file qkd-app-014.h.
Referenced by GetTypeId(), and ProcessGetKeyResponse().
|
private |
The amount of time spent waiting before issuing a new GET_KEY request when the previous one resulted in an error "keys are being transformed".
Definition at line 728 of file qkd-app-014.h.
Referenced by GetTypeId(), and ProcessGetKeyResponse().