NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
null-transport.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_NULL_TRANSPORT_HPP
21 #define NDN_NULL_TRANSPORT_HPP
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 #include "ns3/ndnSIM/NFD/daemon/face/transport.hpp"
25 
26 namespace ns3 {
27 namespace ndn {
28 
34 {
35 public:
36  NullTransport(const std::string& localUri, const std::string& remoteUri,
40  {
41  this->setLocalUri(FaceUri(localUri));
42  this->setRemoteUri(FaceUri(remoteUri));
43  this->setScope(scope);
44  this->setPersistency(persistency);
45  this->setLinkType(linkType);
46  // this->setMtu(udp::computeMtu(m_socket.local_endpoint())); // not sure what should be here
47  }
48 
49 private:
50  void
51  doClose() final
52  {
54  }
55 
56  void
57  doSend(const Block& packet) final
58  {
59  }
60 };
61 
62 } // namespace ndn
63 } // namespace ns3
64 
65 #endif // NDN_NULL_TRANSPORT_HPP
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
Definition: transport.cpp:164
Copyright (c) 2011-2015 Regents of the University of California.
void setRemoteUri(const FaceUri &uri)
Definition: transport.hpp:397
void setLinkType(ndn::nfd::LinkType linkType)
Definition: transport.hpp:427
void setScope(ndn::nfd::FaceScope scope)
Definition: transport.hpp:409
the transport is closed, and can be safely deallocated
Copyright (c) 2011-2015 Regents of the University of California.
void setLocalUri(const FaceUri &uri)
Definition: transport.hpp:385
NullTransport(const std::string &localUri, const std::string &remoteUri, ::ndn::nfd::FaceScope scope=::ndn::nfd::FACE_SCOPE_NON_LOCAL, ::ndn::nfd::FacePersistency persistency=::ndn::nfd::FACE_PERSISTENCY_PERSISTENT, ::ndn::nfd::LinkType linkType=::ndn::nfd::LINK_TYPE_POINT_TO_POINT)
void setState(TransportState newState)
set transport state
Definition: transport.cpp:187
The lower half of a Face.
Definition: transport.hpp:108
Null transport (does nothing, just fulfills requirements of the interface)