22 #include "ns3/object-vector.h"
23 #include "ns3/pointer.h"
24 #include "ns3/uinteger.h"
46 .AddConstructor<QKDAppHeader> ()
60 return 2 *
sizeof(uint32_t)
62 + 3 * 32 *
sizeof(uint8_t);
102 char tmpBuffer1 [len1];
103 i.
Read ((uint8_t*)tmpBuffer1, len1);
107 char tmpBuffer2 [len2];
108 i.
Read ((uint8_t*)tmpBuffer2, len2);
112 char tmpBuffer3 [len3];
113 i.
Read ((uint8_t*)tmpBuffer3, len3);
114 m_authTag = std::string(tmpBuffer3).substr(0, len3);
120 <<
" m_valid: " << (uint32_t)
m_valid
134 <<
"MESSAGE ID: " << (uint32_t)
m_messageId <<
"\t"
135 <<
"Length: " << (uint32_t)
m_length <<
"\t"
138 <<
"Encrypted: " << (uint32_t)
m_encryped <<
"\t"
193 if (value.size() < 32) {
194 uint32_t diff = 32-value.size();
195 std::string newValue = std::string(diff,
'0') + value;
215 if (value.size() < 32) {
216 uint32_t diff = 32-value.size();
217 std::string newValue = std::string(diff,
'0') + value;
iterator in a Buffer instance
void WriteU8(uint8_t data)
void Write(const uint8_t *buffer, uint32_t size)
void Read(uint8_t *buffer, uint32_t size)
void WriteHtonU32(uint32_t data)
uint32_t GetDistanceFrom(const Iterator &o) const
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)