Introspection did not find any typical Config paths. More...
#include "qkd-internal-tag.h"
Public Member Functions | |
virtual void | Deserialize (TagBuffer i) |
char | GetCommand (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
uint32_t | GetRoutingProtocolNumber (void) const |
virtual uint32_t | GetSerializedSize (void) const |
virtual void | Print (std::ostream &os) const |
virtual void | Serialize (TagBuffer i) const |
void | SetCommand (char value) |
void | SetRoutingProtocolNumber (uint32_t value) |
![]() | |
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 (void) |
Get the TypeId. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
char | m_command |
Used to distinguish between routing and data packet. More... | |
uint32_t | m_routingProtocolNumber |
If it is a routing packet, we use this value to distinguish the protocol type. More... | |
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.
QKDCommandTag is used to describe the content of the packet payload.
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).
QKDCommandTag is used in routing protocols to mark the packet that needs to be analyzed further from L4 layer. For example, we mark DSDV packet using this Tag, by using "SetCommand('R')" and "SetRoutingProtocolNumber(DSDV_PACKET_HEADER_PROTOCOL_NUMBER)" Later, in QCrypto by analyzing the tag we know that the packet contains DSDV headers that needs to be encrypted. Without the tag, there is no way to know what is inside TCP/UDP payload. Tag is removed after encryption. If the tag has some other value, such as "SetCommand('A')" it is not a routing packet, and the payload of the TCP/UDP header is encrypted as it is.
Definition at line 50 of file qkd-internal-tag.h.
|
virtual |
i | the buffer to read data from. |
Read the content of the tag from the provided tag buffer. DO NOT attempt to read more bytes than you wrote with Tag::Serialize.
Implements ns3::Tag.
Definition at line 62 of file qkd-internal-tag.cc.
References m_command, m_routingProtocolNumber, NS_LOG_DEBUG, ns3::TagBuffer::ReadU32(), and ns3::TagBuffer::ReadU8().
char ns3::QKDCommandTag::GetCommand | ( | void | ) | const |
Definition at line 84 of file qkd-internal-tag.cc.
References m_command, and NS_LOG_FUNCTION.
Referenced by ns3::QKDCrypto::CreateQKDCommandHeader().
|
virtual |
Get the most derived TypeId for this Object.
This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.
Implements ns3::ObjectBase.
Definition at line 44 of file qkd-internal-tag.cc.
References GetTypeId().
uint32_t ns3::QKDCommandTag::GetRoutingProtocolNumber | ( | void | ) | const |
Definition at line 98 of file qkd-internal-tag.cc.
References m_routingProtocolNumber, NS_LOG_FUNCTION, and NS_OBJECT_ENSURE_REGISTERED.
Referenced by ns3::QKDCrypto::CreateQKDCommandHeader().
|
virtual |
This method is typically invoked by Packet::AddPacketTag or Packet::AddByteTag just prior to calling Tag::Serialize.
Implements ns3::Tag.
Definition at line 49 of file qkd-internal-tag.cc.
|
static |
Get the TypeId.
Definition at line 35 of file qkd-internal-tag.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId(), ns3::QKDInternalTOSTag::GetInstanceTypeId(), and ns3::QKDInternalTag::GetInstanceTypeId().
|
virtual |
os | the stream to print to |
This method is typically invoked from the Packet::PrintByteTags or Packet::PrintPacketTags methods.
Implements ns3::Tag.
Definition at line 70 of file qkd-internal-tag.cc.
References m_command, and m_routingProtocolNumber.
|
virtual |
i | the buffer to write data into. |
Write the content of the tag in the provided tag buffer. DO NOT attempt to write more bytes than you requested with Tag::GetSerializedSize.
Implements ns3::Tag.
Definition at line 55 of file qkd-internal-tag.cc.
References m_command, m_routingProtocolNumber, ns3::TagBuffer::WriteU32(), and ns3::TagBuffer::WriteU8().
void ns3::QKDCommandTag::SetCommand | ( | char | value | ) |
Definition at line 77 of file qkd-internal-tag.cc.
References m_command, and NS_LOG_FUNCTION.
Referenced by ns3::aodv::RoutingProtocol::RecvError(), ns3::aodvq::RoutingProtocol::RecvError(), ns3::aodvq::RoutingProtocol::RecvReply(), ns3::aodv::RoutingProtocol::RecvReply(), ns3::aodvq::RoutingProtocol::RecvRequest(), ns3::aodv::RoutingProtocol::RecvRequest(), ns3::aodv::RoutingProtocol::SendHello(), ns3::aodvq::RoutingProtocol::SendHello(), ns3::olsr::RoutingProtocol::SendPacket(), ns3::dsdvq::RoutingProtocol::SendPeriodicUpdate(), ns3::dsdv::RoutingProtocol::SendPeriodicUpdate(), ns3::olsr::RoutingProtocol::SendQueuedMessages(), ns3::aodvq::RoutingProtocol::SendReply(), ns3::aodv::RoutingProtocol::SendReply(), ns3::aodv::RoutingProtocol::SendReplyAck(), ns3::aodvq::RoutingProtocol::SendReplyAck(), ns3::aodv::RoutingProtocol::SendReplyByIntermediateNode(), ns3::aodvq::RoutingProtocol::SendReplyByIntermediateNode(), ns3::aodv::RoutingProtocol::SendRequest(), ns3::aodvq::RoutingProtocol::SendRequest(), ns3::aodvq::RoutingProtocol::SendRerrMessage(), ns3::aodv::RoutingProtocol::SendRerrMessage(), ns3::aodvq::RoutingProtocol::SendRerrWhenBreaksLinkToNextHop(), ns3::aodv::RoutingProtocol::SendRerrWhenBreaksLinkToNextHop(), ns3::aodvq::RoutingProtocol::SendRerrWhenNoRouteToForward(), ns3::aodv::RoutingProtocol::SendRerrWhenNoRouteToForward(), ns3::dsdvq::RoutingProtocol::SendTriggeredUpdate(), and ns3::dsdv::RoutingProtocol::SendTriggeredUpdate().
void ns3::QKDCommandTag::SetRoutingProtocolNumber | ( | uint32_t | value | ) |
Definition at line 91 of file qkd-internal-tag.cc.
References m_routingProtocolNumber, and NS_LOG_FUNCTION.
Referenced by ns3::aodv::RoutingProtocol::RecvError(), ns3::aodvq::RoutingProtocol::RecvError(), ns3::aodvq::RoutingProtocol::RecvReply(), ns3::aodv::RoutingProtocol::RecvReply(), ns3::aodvq::RoutingProtocol::RecvRequest(), ns3::aodv::RoutingProtocol::RecvRequest(), ns3::aodv::RoutingProtocol::SendHello(), ns3::aodvq::RoutingProtocol::SendHello(), ns3::olsr::RoutingProtocol::SendPacket(), ns3::olsr::RoutingProtocol::SendQueuedMessages(), ns3::aodv::RoutingProtocol::SendReply(), ns3::aodvq::RoutingProtocol::SendReply(), ns3::aodv::RoutingProtocol::SendReplyAck(), ns3::aodvq::RoutingProtocol::SendReplyAck(), ns3::aodv::RoutingProtocol::SendReplyByIntermediateNode(), ns3::aodvq::RoutingProtocol::SendReplyByIntermediateNode(), ns3::aodv::RoutingProtocol::SendRequest(), ns3::aodvq::RoutingProtocol::SendRequest(), ns3::aodv::RoutingProtocol::SendRerrMessage(), ns3::aodvq::RoutingProtocol::SendRerrMessage(), ns3::aodvq::RoutingProtocol::SendRerrWhenBreaksLinkToNextHop(), ns3::aodv::RoutingProtocol::SendRerrWhenBreaksLinkToNextHop(), ns3::aodvq::RoutingProtocol::SendRerrWhenNoRouteToForward(), ns3::aodv::RoutingProtocol::SendRerrWhenNoRouteToForward(), ns3::dsdvq::RoutingProtocol::SendTriggeredUpdate(), and ns3::dsdv::RoutingProtocol::SendTriggeredUpdate().
|
private |
Used to distinguish between routing and data packet.
Definition at line 72 of file qkd-internal-tag.h.
Referenced by Deserialize(), GetCommand(), Print(), Serialize(), and SetCommand().
|
private |
If it is a routing packet, we use this value to distinguish the protocol type.
Definition at line 73 of file qkd-internal-tag.h.
Referenced by Deserialize(), GetRoutingProtocolNumber(), Print(), Serialize(), and SetRoutingProtocolNumber().