NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-block-header.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDNSIM_NDN_BLOCK_HEADER_HPP
21 #define NDNSIM_NDN_BLOCK_HEADER_HPP
22 
23 #include "ns3/header.h"
24 
25 #include "ndn-common.hpp"
26 
27 namespace nfdFace = nfd::face;
28 
29 namespace ns3 {
30 namespace ndn {
31 
32 class BlockHeader : public Header {
33 public:
34  static ns3::TypeId
35  GetTypeId();
36 
37  virtual TypeId
38  GetInstanceTypeId(void) const;
39 
40  BlockHeader();
41 
42  BlockHeader(const nfdFace::Transport::Packet& packet);
43 
44  virtual uint32_t
45  GetSerializedSize(void) const;
46 
47  virtual void
48  Serialize(ns3::Buffer::Iterator start) const;
49 
50  virtual uint32_t
51  Deserialize(ns3::Buffer::Iterator start);
52 
53  virtual void
54  Print(std::ostream& os) const;
55 
56  Block&
57  getBlock();
58 
59  const Block&
60  getBlock() const;
61 
62 private:
63  Block m_block;
64 };
65 
66 } // namespace ndn
67 } // namespace ns3
68 
69 #endif // NDNSIM_NDN_BLOCK_HEADER_HPP
virtual uint32_t GetSerializedSize(void) const
Copyright (c) 2011-2015 Regents of the University of California.
virtual uint32_t Deserialize(ns3::Buffer::Iterator start)
virtual void Serialize(ns3::Buffer::Iterator start) const
virtual void Print(std::ostream &os) const
virtual TypeId GetInstanceTypeId(void) const
Copyright (c) 2011-2015 Regents of the University of California.
static ns3::TypeId GetTypeId()