|
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.
26 #ifndef NFD_DAEMON_FACE_TRANSPORT_HPP
27 #define NFD_DAEMON_FACE_TRANSPORT_HPP
358 ssize_t m_sendQueueCapacity;
426 return m_persistency;
438 m_linkType = linkType;
457 return m_sendQueueCapacity;
463 m_sendQueueCapacity = sendQueueCapacity;
475 return m_expirationTime;
481 m_expirationTime = expirationTime;
488 typename std::enable_if<std::is_base_of<Transport, T>::value &&
489 !std::is_same<Transport, T>::value, std::ostream&>::type
492 return os << FaceLogHelper<Transport>(flh.
obj);
498 #endif // NFD_DAEMON_FACE_TRANSPORT_HPP
void setSendQueueCapacity(ssize_t sendQueueCapacity)
TransportState
Indicates the state of a transport.
const ssize_t MTU_INVALID
(for internal use) indicates MTU field is unset
Counters provided by a transport.
@ CLOSED
the transport is closed, and can be safely deallocated
bool canChangePersistencyTo(ndn::nfd::FacePersistency newPersistency) const
check whether the face persistency can be changed to newPersistency
const ssize_t MTU_UNLIMITED
indicates the transport has no limit on payload size
void setRemoteUri(const FaceUri &uri)
FaceUri getRemoteUri() const
ssize_t getSendQueueCapacity() const
represents the underlying protocol and address used by a Face
void setScope(ndn::nfd::FaceScope scope)
virtual void doClose()=0
performs Transport specific operations to close the transport
void setState(TransportState newState)
set transport state
@ DOWN
the transport is temporarily down, and is being recovered
ndn::nfd::LinkType getLinkType() const
ndn::nfd::FacePersistency getPersistency() const
void setExpirationTime(const time::steady_clock::TimePoint &expirationTime)
provides a lightweight signal / event system
@ CLOSING
the transport is being closed gracefully, either by the peer or by a call to close()
Transport()
Default constructor.
void setFaceAndLinkService(Face &face, LinkService &service)
set Face and LinkService for Transport
std::ostream & operator<<(std::ostream &os, const Face &face)
Copyright (c) 2011-2015 Regents of the University of California.
PacketCounter nOutPackets
count of outgoing packets
virtual void afterChangePersistency(ndn::nfd::FacePersistency oldPersistency)
invoked after the persistency has been changed
generalization of a network interface
void send(const Block &packet, const EndpointId &endpoint=0)
Send a link-layer packet.
ByteCounter nOutBytes
total outgoing bytes
const ssize_t QUEUE_ERROR
indicates that the transport was unable to retrieve the queue capacity/length
const ssize_t QUEUE_UNSUPPORTED
indicates that the transport does not support reading the queue capacity/length
ndn::nfd::FaceScope getScope() const
const Face * getFace() const
virtual bool canChangePersistencyToImpl(ndn::nfd::FacePersistency newPersistency) const
invoked by canChangePersistencyTo to perform the check
void setLinkType(ndn::nfd::LinkType linkType)
@ UP
the transport is up and can transmit packets
FaceUri getLocalUri() const
represents a counter of number of packets
Represents a TLV element of NDN packet format.
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
const LinkService * getLinkService() const
virtual const Counters & getCounters() const
ByteCounter nInBytes
total incoming bytes
@ FAILED
the transport is being closed due to a failure
time::steady_clock::TimePoint getExpirationTime() const
PacketCounter nInPackets
count of incoming packets
TransportState getState() const
static constexpr ssize_t MIN_MTU
minimum MTU that may be set on a transport
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 close()
Request the transport to be closed.
For internal use by FaceLogging macros.
The lower half of a Face.
virtual ssize_t getSendQueueLength()
represents a counter of number of bytes
void setLocalUri(const FaceUri &uri)
signal::Signal< Transport, TransportState, TransportState > afterStateChange
signals when transport state changes