NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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
33
class
NullTransport
:
public
nfd::face::Transport
34
{
35
public
:
36
NullTransport
(
const
std::string& localUri,
const
std::string& remoteUri,
37
::
ndn::nfd::FaceScope
scope = ::
ndn::nfd::FACE_SCOPE_NON_LOCAL
,
38
::
ndn::nfd::FacePersistency
persistency = ::
ndn::nfd::FACE_PERSISTENCY_PERSISTENT
,
39
::
ndn::nfd::LinkType
linkType = ::
ndn::nfd::LINK_TYPE_POINT_TO_POINT
)
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
{
58
this->
setState
(
nfd::face::TransportState::CLOSED
);
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
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::nfd::LinkType
LinkType
Definition:
nfd-constants.hpp:75
ndn::nfd::FACE_SCOPE_NON_LOCAL
face is non-local
Definition:
nfd-constants.hpp:38
nfd::face::Transport::setPersistency
void setPersistency(ndn::nfd::FacePersistency persistency)
changes face persistency setting
Definition:
transport.cpp:131
nfd::face::Transport::setRemoteUri
void setRemoteUri(const FaceUri &uri)
Definition:
transport.hpp:374
ndn::nfd::LINK_TYPE_POINT_TO_POINT
link is point-to-point
Definition:
nfd-constants.hpp:79
nfd::face::Transport::Packet
stores a packet along with the remote endpoint
Definition:
transport.hpp:113
nfd::face::Transport::setLinkType
void setLinkType(ndn::nfd::LinkType linkType)
Definition:
transport.hpp:404
nfd::face::Transport::setScope
void setScope(ndn::nfd::FaceScope scope)
Definition:
transport.hpp:386
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:49
ndn::nfd::FaceScope
FaceScope
Definition:
nfd-constants.hpp:34
nfd::face::TransportState::CLOSED
the transport is closed, and can be safely deallocated
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
nfd::face::Transport::setLocalUri
void setLocalUri(const FaceUri &uri)
Definition:
transport.hpp:362
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::setState
void setState(TransportState newState)
set transport state
Definition:
transport.cpp:150
nfd::face::Transport
the lower part of a Face
Definition:
transport.hpp:104
ndn::nfd::FACE_PERSISTENCY_PERSISTENT
face is persistent
Definition:
nfd-constants.hpp:53
ns3::ndn::NullTransport
Null transport (does nothing, just fulfills requirements of the interface)
Definition:
null-transport.hpp:33
ndnSIM
model
null-transport.hpp
Generated on Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13