26 #ifndef NFD_DAEMON_FACE_LINK_SERVICE_HPP
27 #define NFD_DAEMON_FACE_LINK_SERVICE_HPP
147 sendNack(
const ndn::lp::Nack& nack);
201 doSendInterest(
const Interest& interest) = 0;
206 doSendData(
const Data& data) = 0;
211 doSendNack(
const lp::Nack& nack) = 0;
215 doReceivePacket(
const Block& packet,
const EndpointId& endpoint) = 0;
218 Face* m_face =
nullptr;
225 return m_transport->
getMtu();
231 doReceivePacket(packet, endpoint);
237 m_transport->
send(packet);
244 std::enable_if_t<std::is_base_of_v<LinkService, T> && !std::is_same_v<LinkService, T>,
248 return os << FaceLogHelper<LinkService>(flh.
obj);
Represents a counter of number of packets.
Generalization of a network interface.
For internal use by FaceLogging macros.
Counters provided by LinkService.
PacketCounter nOutData
Count of outgoing Data packets.
PacketCounter nOutInterests
Count of outgoing Interests.
PacketCounter nOutNacks
Count of outgoing Nacks.
PacketCounter nInInterests
Count of incoming Interests.
PacketCounter nInData
Count of incoming Data packets.
PacketCounter nInNacks
Count of incoming Nacks.
PacketCounter nInterestsExceededRetx
Count of Interests dropped by reliability system for exceeding allowed number of retx.
The upper half of a Face.
void sendData(const Data &data)
Send Data.
signal::Signal< LinkService, Interest, EndpointId > afterReceiveInterest
Signals on Interest received.
void receiveNack(const lp::Nack &nack, const EndpointId &endpoint)
Delivers received Nack to forwarding.
void receiveInterest(const Interest &interest, const EndpointId &endpoint)
Delivers received Interest to forwarding.
void notifyDroppedInterest(const Interest &packet)
const Face * getFace() const noexcept
Returns the Face to which this LinkService is attached.
signal::Signal< LinkService, Interest > onDroppedInterest
Signals on Interest dropped by reliability system for exceeding allowed number of retx.
void receiveData(const Data &data, const EndpointId &endpoint)
Delivers received Data to forwarding.
void setFaceAndTransport(Face &face, Transport &transport) noexcept
Set Face and Transport for this LinkService.
Transport * getTransport() noexcept
Returns the Transport to which this LinkService is attached.
void receivePacket(const Block &packet, const EndpointId &endpoint)
Performs LinkService specific operations to receive a lower-layer packet.
signal::Signal< LinkService, lp::Nack, EndpointId > afterReceiveNack
Signals on Nack received.
const Transport * getTransport() const noexcept
Returns the Transport to which this LinkService is attached.
LinkServiceCounters Counters
Counters provided by LinkService.
virtual const Counters & getCounters() const
void sendNack(const ndn::lp::Nack &nack)
Send Nack.
void sendPacket(const Block &packet)
Send a lower-layer packet via Transport.
signal::Signal< LinkService, Data, EndpointId > afterReceiveData
Signals on Data received.
void sendInterest(const Interest &interest)
Send Interest.
virtual ssize_t getEffectiveMtu() const
The lower half of a Face.
ssize_t getMtu() const noexcept
Returns the maximum payload size.
void send(const Block &packet)
Send a link-layer packet.
std::ostream & operator<<(std::ostream &os, const FaceLogHelper< Face > &flh)
std::variant< std::monostate, ethernet::Address, udp::Endpoint > EndpointId
Identifies a remote endpoint on the link.