Introspection did not find any typical Config paths. More...
#include "qkd-header.h"
Public Member Functions | |
QKDDelimiterHeader () | |
Constructor. More... | |
uint32_t | Deserialize (Buffer::Iterator start) |
uint32_t | GetDelimiterSize (void) const |
TypeId | GetInstanceTypeId () const |
Get the type ID. More... | |
uint32_t | GetSerializedSize () const |
bool | operator== (QKDDelimiterHeader const &o) const |
void | Print (std::ostream &os) const |
Print the header in the output stream. More... | |
void | Serialize (Buffer::Iterator start) const |
void | SetDelimiterSize (uint32_t value) |
![]() | |
virtual | ~Header () |
![]() | |
virtual uint32_t | Deserialize (Buffer::Iterator start, Buffer::Iterator end) |
Deserialize the object from a buffer iterator. 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 () |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
uint8_t | m_delimiter |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
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.
QKDDelimiterHeader sits between the packets and it contains only one field (m_delimiter) which is actually the size of next header.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 16 bytes (on a 64-bit architecture).
For example, in case of TCP, QKDDelimiterHeader sits between IPv4 and TCP indicating the size of TCP header. The order of packets in this case is IPv4, QKDDelimiterHeader, TCP, payload... In case of OLSR it sits between OlsrPacketHeader and OLSRMessageHEader indicating the size of OLSRMessageHeader which can vary. The order of packets in this case is IPv4, UPD, OLSRPacketHeader, QKDDelimiterHeader, OLSRMessageHeader, OLSRPacketHeader, QKDDelimiterHeader, OLSRMessageHeader and etc.
Definition at line 106 of file qkd-header.h.
ns3::QKDDelimiterHeader::QKDDelimiterHeader | ( | ) |
Constructor.
Definition at line 139 of file qkd-header.cc.
|
virtual |
start | an iterator which points to where the header should read from. |
This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. The data read is expected to match bit-for-bit the representation of this header in real networks.
Note that data is not actually removed from the buffer to which the iterator points. Both Packet::RemoveHeader() and Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() has additional statements to remove the header bytes from the underlying buffer and associated metadata.
Implements ns3::Header.
Definition at line 172 of file qkd-header.cc.
References ns3::Buffer::Iterator::GetDistanceFrom(), ns3::QKDCommandHeader::GetSerializedSize(), NS_ASSERT, NS_LOG_DEBUG, ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
Referenced by ns3::QKDCrypto::StringToQKDDelimiterHeader().
uint32_t ns3::QKDDelimiterHeader::GetDelimiterSize | ( | void | ) | const |
Definition at line 212 of file qkd-header.cc.
References NS_LOG_FUNCTION, and NS_OBJECT_ENSURE_REGISTERED.
Referenced by ns3::QKDCrypto::Decrypt().
|
virtual |
Get the type ID.
Implements ns3::ObjectBase.
Definition at line 154 of file qkd-header.cc.
References ns3::QKDCommandHeader::GetTypeId().
|
virtual |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.
Implements ns3::Header.
Definition at line 160 of file qkd-header.cc.
Referenced by ns3::QKDCrypto::QKDDelimiterHeaderToVector().
|
static |
Get the type ID.
Definition at line 144 of file qkd-header.cc.
References ns3::TypeId::SetParent().
bool ns3::QKDDelimiterHeader::operator== | ( | QKDDelimiterHeader const & | o | ) | const |
Definition at line 191 of file qkd-header.cc.
References m_delimiter.
|
virtual |
Print the header in the output stream.
Implements ns3::Header.
Definition at line 185 of file qkd-header.cc.
Referenced by ns3::operator<<().
|
virtual |
start | an iterator which points to where the header should be written. |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.
Implements ns3::Header.
Definition at line 166 of file qkd-header.cc.
References ns3::Buffer::Iterator::WriteU8().
Referenced by ns3::QKDCrypto::QKDDelimiterHeaderToVector().
void ns3::QKDDelimiterHeader::SetDelimiterSize | ( | uint32_t | value | ) |
Definition at line 205 of file qkd-header.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::QKDCrypto::PacketToString().
|
private |
Definition at line 139 of file qkd-header.h.
Referenced by operator==().