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
null-face.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #include "null-face.hpp"
27 
28 namespace nfd {
29 
30 // FIB might restrict creating a nexthop record toward non-local face in /localhost namespace.
31 // NullFace has isLocal=true to enable creating a "blackhole" FIB entry under /localhost.
32 
33 NullFace::NullFace(const FaceUri& uri)
34  : Face(uri, uri, true)
35 {
36 }
37 
38 void
39 NullFace::sendInterest(const Interest& interest)
40 {
41 }
42 
43 void
44 NullFace::sendData(const Data& data)
45 {
46 }
47 
48 void
50 {
51  this->fail("close");
52 }
53 
54 } // namespace nfd
NullFace(const FaceUri &uri=FaceUri("null://"))
Definition: null-face.cpp:33
virtual void sendData(const Data &data)
send a Data
Definition: null-face.cpp:44
represents a face
Definition: face.hpp:59
void fail(const std::string &reason)
fail the face and raise onFail event if it's UP; otherwise do nothing
Definition: face.cpp:116
virtual void close()
Close the face.
Definition: null-face.cpp:49
virtual void sendInterest(const Interest &interest)
send an Interest
Definition: null-face.cpp:39