Routines to serialize/deserialize Interest packet in ndnSIM format. More...
#include <ndnsim.h>
Public Member Functions | |
Interest (Ptr< ndn::Interest > interest) | |
Ptr< ndn::Interest > | GetInterest () |
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::Interest > interest) |
static Ptr< ndn::Interest > | FromWire (Ptr< Packet > packet) |
static TypeId | GetTypeId (void) |
Routines to serialize/deserialize Interest packet in ndnSIM format.
Optimized and simplified formatting of Interest packets
Interest ::= Nonce Scope InterestLifetime Name Selectors Options
Minumum size of the Interest packet: 1 + 4 + 2 + 1 + (2 + 0) + (2 + 0) + (2 + 0) = 14
Maximum size of the Interest packet: 1 + 4 + 2 + 1 + (2 + 65535) + (2 + 65535) + (2 + 65535) = 196619
::
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Scope | Reserved | InterestLifetime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ ~ ~ Name ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ ~ ~ Selectors ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | | |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ ~ ~ Options ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+