Routines to serialize/deserialize Data packet in ndnSIM format. More...
#include <ndnsim.h>
Public Member Functions | |
Data (Ptr< ndn::Data > data) | |
Ptr< ndn::Data > | GetData () |
virtual TypeId | GetInstanceTypeId (void) const |
virtual void | Print (std::ostream &os) const |
virtual uint32_t | GetSerializedSize (void) const |
virtual void | Serialize (Buffer::Iterator start) const |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Static Public Member Functions | |
static Ptr< Packet > | ToWire (Ptr< const ndn::Data > data) |
static Ptr< ndn::Data > | FromWire (Ptr< Packet > packet) |
static TypeId | GetTypeId (void) |
Routines to serialize/deserialize Data packet in ndnSIM format.
Only few important fields are actually implemented in the simulation
Data ::= Signature Name Content
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + ~ ~ ~ Signature ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ ~ ~ Name ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ ~ ~ Content ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+