NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-ns3.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_NS3_HPP
21 #define NDN_NS3_HPP
22 
23 #include "ns3/packet.h"
24 #include "ns3/ptr.h"
25 #include <memory>
26 
27 namespace ns3 {
28 namespace ndn {
29 
30 class Convert {
31 public:
32  template<class T>
33  static std::shared_ptr<const T>
34  FromPacket(Ptr<Packet> packet);
35 
36  template<class T>
37  static Ptr<Packet>
38  ToPacket(const T& pkt);
39 
40  static uint32_t
41  getPacketType(Ptr<const Packet> packet);
42 };
43 
44 } // namespace ndn
45 } // namespace ns3
46 
47 #endif
static Ptr< Packet > ToPacket(const T &pkt)
Definition: ndn-ns3.cpp:53
Copyright (c) 2011-2015 Regents of the University of California.
static std::shared_ptr< const T > FromPacket(Ptr< Packet > packet)
Definition: ndn-ns3.cpp:34
static uint32_t getPacketType(Ptr< const Packet > packet)
Definition: ndn-ns3.cpp:78
Copyright (c) 2011-2015 Regents of the University of California.