A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
qkd-location-register-entry.h
Go to the documentation of this file.
1
/*
2
* Copyright(c) 2020 DOTFEESA www.tk.etf.unsa.ba
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
*
7
*
8
* Author: Emir Dervisevic <emir.dervisevic@etf.unsa.ba>
9
* Miralem Mehic <miralem.mehic@ieee.org>
10
*/
11
#ifndef QKD_LOCATION_REGISTER_ENTRY_H
12
#define QKD_LOCATION_REGISTER_ENTRY_H
13
14
#include "ns3/event-id.h"
15
#include "ns3/ptr.h"
16
#include "ns3/data-rate.h"
17
#include "ns3/traced-callback.h"
18
#include "ns3/output-stream-wrapper.h"
19
#include "ns3/packet.h"
20
#include "ns3/object.h"
21
#include "ns3/traced-value.h"
22
#include "ns3/trace-source-accessor.h"
23
#include "ns3/node.h"
24
#include "ns3/core-module.h"
25
#include "ns3/log.h"
26
27
#include "ns3/qkd-key-manager-system-application.h"
28
29
#include <map>
30
#include <iostream>
31
#include <sstream>
32
33
namespace
ns3
{
34
35
class
QKDKeyManagerSystemApplication;
36
37
/**
38
* @ingroup applications
39
* @class QKD QKDLocationRegister
40
* @brief QKD QKDLocationRegister is a class used to
41
* keep details about distant QKD nodes and their connectivity.
42
*
43
* @note QKDNetSim KMS implements a location register table that is used
44
* to define paths to distant node. It is a early version of routing table
45
* that will be updated via routing protocol.
46
*/
47
class
QKDLocationRegisterEntry
:
public
Object
48
{
49
public
:
50
51
/**
52
* @brief Get the type ID.
53
* @return the object TypeId
54
*/
55
static
TypeId
GetTypeId
();
56
57
/**
58
* @brief Get the type ID for the instance
59
* @return the instance TypeId
60
*/
61
TypeId
GetInstanceTypeId
()
const override
;
62
63
QKDLocationRegisterEntry
();
64
65
QKDLocationRegisterEntry
(
66
uint32_t
nextHopKmNodeId
,
67
Ipv4Address
nextHopKmNodeAddress
,
68
uint32_t
hops
,
69
uint32_t
dstKmNodeId
,
70
Ipv4Address
dstKmAddress
,
71
std::string
dstKmId
72
);
73
74
~QKDLocationRegisterEntry
()
override
;
75
76
std::string
77
GetRemoteAppId
()
const
78
{
79
return
m_dstAppId
;
80
}
81
82
std::string
83
GetSourceAppId
()
const
84
{
85
return
m_srcAppId
;
86
}
87
88
/**
89
* Get destination KMS Address
90
* @returns the destination KMS Address
91
*/
92
Ipv4Address
93
GetDestinationKmsAddress
()
const
94
{
95
return
m_dstAddress
;
96
}
97
98
uint32_t
GetDestinationKmNodeId
()
const
99
{
100
return
m_dstKmNodeId
;
101
}
102
103
uint32_t
GetNextHopKMNodeId
()
const
104
{
105
return
m_nextHop
;
106
}
107
108
/**
109
* Set next hop
110
* @param nextHop the ID of the next hop
111
*/
112
void
113
SetNextHop
(
uint32_t
nextHop)
114
{
115
m_nextHop
= nextHop;
116
}
117
/**
118
* Get next hop
119
* @returns the ID of the next hop
120
*/
121
uint32_t
122
GetNextHop
()
const
123
{
124
return
m_nextHop
;
125
}
126
127
Ipv4Address
128
GetNextHopAddress
()
const
129
{
130
return
m_nextHopAddress
;
131
}
132
133
std::string
GetKmId
();
134
135
/**
136
* Set hop
137
* @param hopCount the hop count
138
*/
139
void
140
SetHop
(
uint32_t
hopCount)
141
{
142
m_hops
= hopCount;
143
}
144
/**
145
* Get hop
146
* @returns the hop count
147
*/
148
uint32_t
149
GetHop
()
const
150
{
151
return
m_hops
;
152
}
153
/**
154
* @brief Print registry info
155
*/
156
void
157
PrintRegistryInfo
();
158
/**
159
* Print routing table entry
160
* @param stream the output stream
161
*/
162
void
163
Print
(
Ptr<OutputStreamWrapper>
stream)
const
;
164
165
private
:
166
std::string
m_srcAppId
;
167
std::string
m_dstAppId
;
168
uint32_t
m_nextHop
;
169
Ipv4Address
m_nextHopAddress
;
170
uint32_t
m_hops
;
171
uint32_t
m_dstKmNodeId
;
172
Ipv4Address
m_dstAddress
;
173
std::string
m_dstKmId
;
174
};
175
176
177
178
}
// namespace ns3
179
180
#endif
/* QKD_LOCATION_REGISTER_ENTRY_H */
181
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition
ipv4-address.h:31
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
ptr.h:66
ns3::QKDLocationRegisterEntry
Introspection did not find any typical Config paths.
Definition
qkd-location-register-entry.h:48
ns3::QKDLocationRegisterEntry::m_dstAddress
Ipv4Address m_dstAddress
Definition
qkd-location-register-entry.h:172
ns3::QKDLocationRegisterEntry::m_srcAppId
std::string m_srcAppId
Definition
qkd-location-register-entry.h:166
ns3::QKDLocationRegisterEntry::SetHop
void SetHop(uint32_t hopCount)
Set hop.
Definition
qkd-location-register-entry.h:140
ns3::QKDLocationRegisterEntry::QKDLocationRegisterEntry
QKDLocationRegisterEntry()
Definition
qkd-location-register-entry.cc:47
ns3::QKDLocationRegisterEntry::GetNextHopAddress
Ipv4Address GetNextHopAddress() const
Definition
qkd-location-register-entry.h:128
ns3::QKDLocationRegisterEntry::GetNextHopKMNodeId
uint32_t GetNextHopKMNodeId() const
Definition
qkd-location-register-entry.h:103
ns3::QKDLocationRegisterEntry::GetDestinationKmNodeId
uint32_t GetDestinationKmNodeId() const
Definition
qkd-location-register-entry.h:98
ns3::QKDLocationRegisterEntry::GetSourceAppId
std::string GetSourceAppId() const
Definition
qkd-location-register-entry.h:83
ns3::QKDLocationRegisterEntry::SetNextHop
void SetNextHop(uint32_t nextHop)
Set next hop.
Definition
qkd-location-register-entry.h:113
ns3::QKDLocationRegisterEntry::~QKDLocationRegisterEntry
~QKDLocationRegisterEntry() override
Definition
qkd-location-register-entry.cc:75
ns3::QKDLocationRegisterEntry::Print
void Print(Ptr< OutputStreamWrapper > stream) const
Print routing table entry.
Definition
qkd-location-register-entry.cc:86
ns3::QKDLocationRegisterEntry::m_dstKmNodeId
uint32_t m_dstKmNodeId
Definition
qkd-location-register-entry.h:171
ns3::QKDLocationRegisterEntry::GetDestinationKmsAddress
Ipv4Address GetDestinationKmsAddress() const
Get destination KMS Address.
Definition
qkd-location-register-entry.h:93
ns3::QKDLocationRegisterEntry::m_dstAppId
std::string m_dstAppId
Definition
qkd-location-register-entry.h:167
ns3::QKDLocationRegisterEntry::GetNextHop
uint32_t GetNextHop() const
Get next hop.
Definition
qkd-location-register-entry.h:122
ns3::QKDLocationRegisterEntry::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
qkd-location-register-entry.cc:31
ns3::QKDLocationRegisterEntry::PrintRegistryInfo
void PrintRegistryInfo()
Print registry info.
Definition
qkd-location-register-entry.cc:80
ns3::QKDLocationRegisterEntry::GetKmId
std::string GetKmId()
Definition
qkd-location-register-entry.cc:70
ns3::QKDLocationRegisterEntry::m_dstKmId
std::string m_dstKmId
Definition
qkd-location-register-entry.h:173
ns3::QKDLocationRegisterEntry::GetHop
uint32_t GetHop() const
Get hop.
Definition
qkd-location-register-entry.h:149
ns3::QKDLocationRegisterEntry::m_nextHopAddress
Ipv4Address m_nextHopAddress
Definition
qkd-location-register-entry.h:169
ns3::QKDLocationRegisterEntry::GetRemoteAppId
std::string GetRemoteAppId() const
Definition
qkd-location-register-entry.h:77
ns3::QKDLocationRegisterEntry::m_nextHop
uint32_t m_nextHop
Definition
qkd-location-register-entry.h:168
ns3::QKDLocationRegisterEntry::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the type ID for the instance.
Definition
qkd-location-register-entry.cc:42
ns3::QKDLocationRegisterEntry::m_hops
uint32_t m_hops
Definition
qkd-location-register-entry.h:170
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:49
uint32_t
ns3::Create
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition
ptr.h:436
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
qkd
model
qkd-location-register-entry.h
Generated on Mon Dec 15 2025 15:22:03 for ns-3 by
1.9.8