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
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
void
51
doClose()
final
52
{
53
this->
setState
(
nfd::face::TransportState::CLOSED
);
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
nfd::face::Transport::setPersistency
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
Definition:
transport.cpp:164
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:57
ndn::nfd::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:397
ndn::nfd::LINK_TYPE_POINT_TO_POINT
link is point-to-point
Definition:
nfd-constants.hpp:59
nfd::face::Transport::setLinkType
void setLinkType(ndn::nfd::LinkType linkType)
Definition:
transport.hpp:427
nfd::face::Transport::setScope
void setScope(ndn::nfd::FaceScope scope)
Definition:
transport.hpp:409
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:45
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:
ndn-app-link-service.cpp:32
nfd::face::Transport::setLocalUri
void setLocalUri(const FaceUri &uri)
Definition:
transport.hpp:385
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:187
nfd::face::Transport
The lower half of a Face.
Definition:
transport.hpp:108
ndn::nfd::FACE_PERSISTENCY_PERSISTENT
face is persistent
Definition:
nfd-constants.hpp:47
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 Fri May 6 2022 12:34:10 for ndnSIM by
1.8.13