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, const nfd::EndpointId& endpoint) final
58  {
59  }
60 };
61 
62 } // namespace ndn
63 } // namespace ns3
64 
65 #endif // NDN_NULL_TRANSPORT_HPP
nfd::face::TransportState::CLOSED
@ CLOSED
the transport is closed, and can be safely deallocated
ndn::nfd::FACE_SCOPE_NON_LOCAL
@ FACE_SCOPE_NON_LOCAL
face is non-local
Definition: nfd-constants.hpp:36
nfd::face::Transport::setRemoteUri
void setRemoteUri(const FaceUri &uri)
Definition: transport.hpp:406
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-app-link-service.cpp:32
ndn::nfd::LINK_TYPE_POINT_TO_POINT
@ LINK_TYPE_POINT_TO_POINT
link is point-to-point
Definition: nfd-constants.hpp:59
nfd::face::Transport::setScope
void setScope(ndn::nfd::FaceScope scope)
Definition: transport.hpp:418
nfd::face::Transport::setState
void setState(TransportState newState)
set transport state
Definition: transport.cpp:173
ndn::nfd::LinkType
LinkType
Definition: nfd-constants.hpp:57
ndn::nfd::FacePersistency
FacePersistency
Definition: nfd-constants.hpp:45
ns3::ndn::NullTransport::NullTransport
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)
Definition: null-transport.hpp:36
nfd::face::Transport::setLinkType
void setLinkType(ndn::nfd::LinkType linkType)
Definition: transport.hpp:436
ns3::ndn::NullTransport
Null transport (does nothing, just fulfills requirements of the interface)
Definition: null-transport.hpp:34
nfd::face::Transport::setPersistency
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
Definition: transport.cpp:150
nfd::face::EndpointId
uint64_t EndpointId
Identifies a remote endpoint on the link.
Definition: face-common.hpp:65
ndn::nfd::FaceScope
FaceScope
Definition: nfd-constants.hpp:34
nfd::face::Transport
The lower half of a Face.
Definition: transport.hpp:109
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-strategy-choice-helper.hpp:34
ndn::nfd::FACE_PERSISTENCY_PERSISTENT
@ FACE_PERSISTENCY_PERSISTENT
face is persistent
Definition: nfd-constants.hpp:47
nfd::face::Transport::setLocalUri
void setLocalUri(const FaceUri &uri)
Definition: transport.hpp:394