A Discrete-Event Network Simulator
API
ns3::QKDDelimiterHeader Class Reference

Introspection did not find any typical Config paths. More...

#include "qkd-header.h"

+ Inheritance diagram for ns3::QKDDelimiterHeader:
+ Collaboration diagram for ns3::QKDDelimiterHeader:

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)
 
- Public Member Functions inherited from ns3::Header
virtual ~Header ()
 
- Public Member Functions inherited from ns3::Chunk
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator. 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 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 Public Member Functions inherited from ns3::Header
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Attributes

uint8_t m_delimiter
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::ObjectBase
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

ns3::QKDDelimiterHeader::QKDDelimiterHeader ( )

Constructor.

Definition at line 139 of file qkd-header.cc.

Member Function Documentation

uint32_t ns3::QKDDelimiterHeader::Deserialize ( Buffer::Iterator  start)
virtual
Parameters
startan iterator which points to where the header should read from.
Returns
the number of bytes read.

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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

TypeId ns3::QKDDelimiterHeader::GetInstanceTypeId ( void  ) const
virtual

Get the type ID.

Returns
the object TypeId

Implements ns3::ObjectBase.

Definition at line 154 of file qkd-header.cc.

References ns3::QKDCommandHeader::GetTypeId().

+ Here is the call graph for this function:

uint32_t ns3::QKDDelimiterHeader::GetSerializedSize ( ) const
virtual
Returns
the expected size of the header.

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().

+ Here is the caller graph for this function:

TypeId ns3::QKDDelimiterHeader::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 144 of file qkd-header.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

bool ns3::QKDDelimiterHeader::operator== ( QKDDelimiterHeader const &  o) const

Definition at line 191 of file qkd-header.cc.

References m_delimiter.

void ns3::QKDDelimiterHeader::Print ( std::ostream &  os) const
virtual

Print the header in the output stream.

Implements ns3::Header.

Definition at line 185 of file qkd-header.cc.

Referenced by ns3::operator<<().

+ Here is the caller graph for this function:

void ns3::QKDDelimiterHeader::Serialize ( Buffer::Iterator  start) const
virtual
Parameters
startan 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

Member Data Documentation

uint8_t ns3::QKDDelimiterHeader::m_delimiter
private

Definition at line 139 of file qkd-header.h.

Referenced by operator==().


The documentation for this class was generated from the following files: