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  virtual void
51  beforeChangePersistency(::ndn::nfd::FacePersistency newPersistency)
52  {
53  }
54 
55  virtual void
56  doClose()
57  {
59  }
60 
61  virtual void
62  doSend(Packet&& packet)
63  {
64  }
65 };
66 
67 } // namespace ndn
68 } // namespace ns3
69 
70 #endif // NDN_NULL_TRANSPORT_HPP
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
Definition: transport.cpp:154
Copyright (c) 2011-2015 Regents of the University of California.
void setRemoteUri(const FaceUri &uri)
Definition: transport.hpp:433
void setLinkType(ndn::nfd::LinkType linkType)
Definition: transport.hpp:463
void setScope(ndn::nfd::FaceScope scope)
Definition: transport.hpp:445
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:421
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:177
the lower part of a Face
Definition: transport.hpp:113
Null transport (does nothing, just fulfills requirements of the interface)