|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
39 class PendingInterestId;
40 class PendingInterestHandle;
41 class RegisteredPrefixId;
42 class RegisteredPrefixHandle;
43 class InterestFilterId;
44 class InterestFilterHandle;
92 class Error :
public std::runtime_error
95 using std::runtime_error::runtime_error;
131 Face(shared_ptr<Transport> transport =
nullptr);
176 Face(shared_ptr<Transport> transport,
KeyChain& keyChain);
206 cancelPendingInterest(pendingInterestId);
320 unregisterPrefixImpl(registeredPrefixId,
nullptr,
nullptr);
330 clearInterestFilter(interestFilterId);
342 unregisterPrefixImpl(registeredPrefixId, onSuccess, onFailure);
399 bool keepThread =
false)
433 shared_ptr<Transport>
447 shared_ptr<Transport>
448 makeDefaultTransport();
455 construct(shared_ptr<Transport> transport,
KeyChain& keyChain);
458 onReceiveElement(
const Block& blockFromDaemon);
461 cancelPendingInterest(
const PendingInterestId* pendingInterestId);
464 clearInterestFilter(
const InterestFilterId* interestFilterId);
467 unregisterPrefixImpl(
const RegisteredPrefixId* registeredPrefixId,
472 shared_ptr<Transport> m_transport;
475 shared_ptr<Impl> m_impl;
539 Face* m_face =
nullptr;
540 const RegisteredPrefixId* m_id =
nullptr;
598 #endif // NDN_FACE_HPP
function< void(const Name &, const std::string &)> RegisterPrefixFailureCallback
Callback invoked when registerPrefix or setInterestFilter command fails.
InterestFilterHandle() noexcept=default
A handle of registered prefix.
void unsetInterestFilter(const InterestFilterId *interestFilterId)
PendingInterestHandle expressInterest(const Interest &interest, const DataCallback &afterSatisfied, const NackCallback &afterNacked, const TimeoutCallback &afterTimeout)
Express Interest.
A handle of pending Interest.
Signing parameters passed to KeyChain.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED
Handle to cancel an operation.
A handle of registered Interest filter.
void shutdown()
Shutdown face operations.
Provide a communication channel with local or remote NDN forwarder.
RegisteredPrefixHandle registerPrefix(const Name &prefix, const RegisterPrefixSuccessCallback &onSuccess, const RegisterPrefixFailureCallback &onFailure, const security::SigningInfo &signingInfo=security::SigningInfo(), uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
Register prefix with the connected NDN forwarder.
size_t getNPendingInterests() const
Get number of pending Interests.
void put(Data data)
Publish data packet.
void processEvents(time::milliseconds timeout=time::milliseconds::zero(), bool keepThread=false)
Process any data to receive or call timeout callbacks.
Represents an absolute name.
function< void()> UnregisterPrefixSuccessCallback
Callback invoked when unregisterPrefix or unsetInterestFilter command succeeds.
declares the set of Interests a producer can serve, which starts with a name prefix,...
function< void(const InterestFilter &, const Interest &)> InterestCallback
Callback invoked when incoming Interest matches the specified InterestFilter.
The interface of signing key management.
Face(shared_ptr< Transport > transport=nullptr)
Create Face using given transport (or default transport if omitted)
virtual void doProcessEvents(time::milliseconds timeout, bool keepThread)
function< void(const Interest &, const Data &)> DataCallback
Callback invoked when expressed Interest gets satisfied with a Data packet.
RegisteredPrefixHandle() noexcept
Represents an Interest packet.
void removeAllPendingInterests()
Cancel all previously expressed Interests.
Represents a Data packet.
function< void(const Name &)> RegisterPrefixSuccessCallback
Callback invoked when registerPrefix or setInterestFilter command succeeds.
function< void(const Interest &, const lp::Nack &)> NackCallback
Callback invoked when Nack is sent in response to expressed Interest.
void removePendingInterest(const PendingInterestId *pendingInterestId)
Represents a TLV element of NDN packet format.
void unsetInterestFilter(const RegisteredPrefixId *registeredPrefixId)
PendingInterestHandle() noexcept=default
Exception thrown when attempting to send a packet over size limit.
represents a Network Nack
function< void(const Interest &)> TimeoutCallback
Callback invoked when expressed Interest times out.
DummyIoService & getIoService()
void unregisterPrefix(const RegisteredPrefixId *registeredPrefixId, const UnregisterPrefixSuccessCallback &onSuccess, const UnregisterPrefixFailureCallback &onFailure)
function< void(const std::string &)> UnregisterPrefixFailureCallback
Callback invoked when unregisterPrefix or unsetInterestFilter command fails.
OversizedPacketError(char pktType, const Name &name, size_t wireSize)
Constructor.
Copyright (c) 2011-2015 Regents of the University of California.
RegisteredPrefixHandle setInterestFilter(const InterestFilter &filter, const InterestCallback &onInterest, const RegisterPrefixFailureCallback &onFailure, const security::SigningInfo &signingInfo=security::SigningInfo(), uint64_t flags=nfd::ROUTE_FLAG_CHILD_INHERIT)
Set InterestFilter to dispatch incoming matching interest to onInterest callback and register the fil...
@ ROUTE_FLAG_CHILD_INHERIT