|
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.
58 InternalForwarderTransport::doSend(
const Block& packet,
const EndpointId&)
76 if (m_forwarder !=
nullptr) {
86 if (m_forwarder !=
nullptr) {
92 m_forwarder = forwarder;
94 if (m_forwarder !=
nullptr) {
130 encoder.appendByteArray(header.
wire(), header.
size());
131 encoder.appendByteArray(payload.
wire(), payload.
size());
133 send(encoder.block());
TransportState
Indicates the state of a transport.
@ CLOSED
the transport is closed, and can be safely deallocated
void post(const std::function< void()> &callback)
const ssize_t MTU_UNLIMITED
indicates the transport has no limit on payload size
void setRemoteUri(const FaceUri &uri)
NFD_LOG_MEMBER_INIT(InternalForwarderTransport, InternalForwarderTransport)
represents the underlying protocol and address used by a Face
@ FACE_PERSISTENCY_PERMANENT
face is permanent
void setPeer(InternalTransportBase *peer)
void setScope(ndn::nfd::FaceScope scope)
Implements a client-side transport that can be paired with an InternalForwarderTransport.
void setState(TransportState newState)
set transport state
void receivePacket(const Block &packet) final
void receivePacket(const Block &packet) final
#define NFD_LOG_FACE_DEBUG(msg)
Log a message at DEBUG level.
ReceiveCallback m_receiveCallback
void connectToForwarder(InternalForwarderTransport *forwarder)
Connect to a forwarder-side transport.
detail::SimulatorIo & getGlobalIoService()
Returns the global io_service instance for the calling thread.
virtual void receivePacket(const Block &packet)=0
Copyright (c) 2011-2015 Regents of the University of California.
#define NFD_LOG_FACE_TRACE(msg)
Log a message at TRACE level.
void doClose() final
performs Transport specific operations to close the transport
void disconnect()
Manually disconnect the connection.
void setLinkType(ndn::nfd::LinkType linkType)
InternalForwarderTransport(const FaceUri &localUri=FaceUri("internal://"), const FaceUri &remoteUri=FaceUri("internal://"), ndn::nfd::FaceScope scope=ndn::nfd::FACE_SCOPE_LOCAL, ndn::nfd::LinkType linkType=ndn::nfd::LINK_TYPE_POINT_TO_POINT)
Represents a TLV element of NDN packet format.
Implements a forwarder-side transport that can be paired with another transport.
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
size_t size() const
Return the size of the encoded wire, i.e.
~InternalClientTransport() final
uint64_t EndpointId
Identifies a remote endpoint on the link.
void receive(const Block &packet, const EndpointId &endpoint=0)
Pass a received link-layer packet to the upper layer for further processing.
void send(const Block &wire) final
send a TLV block through the transport
const uint8_t * wire() const
Return a raw pointer to the beginning of the encoded wire.
EncodingImpl< EncoderTag > EncodingBuffer
void setLocalUri(const FaceUri &uri)
signal::Signal< Transport, TransportState, TransportState > afterStateChange
signals when transport state changes