NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-app-face.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_APP_FACE_H
21 #define NDN_APP_FACE_H
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 #include "ns3/ndnSIM/NFD/daemon/face/local-face.hpp"
25 #include "ns3/ndnSIM/model/ndn-face.hpp"
26 
27 namespace ns3 {
28 
29 class Packet;
30 class Node;
31 
32 namespace ndn {
33 
34 class App;
35 
46 class AppFace : public nfd::LocalFace {
47 public:
51  AppFace(Ptr<App> app);
52 
53  virtual ~AppFace();
54 
55 public: // from nfd::Face
59  virtual void
60  sendInterest(const Interest& interest);
61 
65  virtual void
66  sendData(const Data& data);
67 
71  void
72  onReceiveInterest(const Interest& interest);
73 
77  void
78  onReceiveData(const Data& data);
79 
80  virtual void
81  close();
82 
83 private:
84  Ptr<Node> m_node;
85  Ptr<App> m_app;
86 };
87 
88 } // namespace ndn
89 } // namespace ns3
90 
91 #endif // NDN_APP_FACE_H
virtual void sendInterest(const Interest &interest)
Send Interest towards application.
Copyright (c) 2011-2015 Regents of the University of California.
ndn App
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-app.cpp:28
void onReceiveData(const Data &data)
Send Data towards NFD.
Implementation of application Ndn face.
void onReceiveInterest(const Interest &interest)
Send Interest towards NFD.
Copyright (c) 2011-2015 Regents of the University of California.
virtual void sendData(const Data &data)
Send Data towards application.
represents a face
Definition: local-face.hpp:40
virtual void close()
Close the face.
AppFace(Ptr< App > app)
Default constructor.