NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ndn-ns3-packet-tag.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_NS3_PACKET_TAG_HPP
21 #define NDN_NS3_PACKET_TAG_HPP
22 
23 #include "ns3/packet.h"
24 #include "ns3/ptr.h"
25 #include <ndn-cxx/tag.hpp>
26 
27 namespace ns3 {
28 namespace ndn {
29 
30 class Ns3PacketTag : public ::ndn::Tag {
31 public:
32  static size_t
34  {
35  return 0xaee87802; // md5("Ns3PacketTag")[0:8]
36  }
37 
38  Ns3PacketTag(Ptr<const Packet> packet)
39  : m_packet(packet)
40  {
41  }
42 
43  Ptr<const Packet>
44  getPacket() const
45  {
46  return m_packet;
47  }
48 
49 private:
50  Ptr<const Packet> m_packet;
51 };
52 
53 } // namespace ndn
54 } // namespace ns3
55 
56 #endif // NDN_NS3_PACKET_TAG_HPP
Ns3PacketTag(Ptr< const Packet > packet)
Ptr< const Packet > getPacket() const