NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-app-link-service.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_APP_LINK_SERVICE_HPP
21 #define NDN_APP_LINK_SERVICE_HPP
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 #include "ns3/ndnSIM/NFD/daemon/face/link-service.hpp"
25 
26 namespace ns3 {
27 
28 class Packet;
29 class Node;
30 
31 namespace ndn {
32 
33 class App;
34 
42 {
43 public:
47  AppLinkService(Ptr<App> app);
48 
49  virtual ~AppLinkService();
50 
51 public:
52  void
53  onReceiveInterest(const Interest& interest);
54 
55  void
56  onReceiveData(const Data& data);
57 
58  void
59  onReceiveNack(const lp::Nack& nack);
60 
61 private:
62  virtual void
63  doSendInterest(const Interest& interest) override;
64 
65  virtual void
66  doSendData(const Data& data) override;
67 
68  virtual void
69  doSendNack(const lp::Nack& nack) override;
70 
71  virtual void
72  doReceivePacket(nfd::face::Transport::Packet&& packet) override
73  {
74  // does nothing (all operations for now handled by LinkService)
75  BOOST_ASSERT(false);
76  }
77 
78 private:
79  Ptr<Node> m_node;
80  Ptr<App> m_app;
81 };
82 
83 } // namespace ndn
84 } // namespace ns3
85 
86 #endif // NDN_APP_LINK_SERVICE_HPP
Copyright (c) 2011-2015 Regents of the University of California.
Implementation of LinkService for ndnSIM application.
the upper part of a Face
ndn App
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-app.cpp:29
stores a packet along with the remote endpoint
Definition: transport.hpp:113
void onReceiveInterest(const Interest &interest)
void onReceiveData(const Data &data)
represents a Network Nack
Definition: nack.hpp:40
AppLinkService(Ptr< App > app)
Default constructor.
void onReceiveNack(const lp::Nack &nack)
Copyright (c) 2011-2015 Regents of the University of California.