26 #ifndef NFD_DAEMON_FACE_LINK_SERVICE_HPP
27 #define NFD_DAEMON_FACE_LINK_SERVICE_HPP
118 return m_transport->
getMtu();
141 sendNack(
const ndn::lp::Nack& nack);
171 doReceivePacket(packet, endpoint);
200 m_transport->
send(packet);
212 doSendInterest(
const Interest& interest) = 0;
218 doSendData(
const Data& data) = 0;
224 doSendNack(
const lp::Nack& nack) = 0;
228 doReceivePacket(
const Block& packet,
const EndpointId& endpoint) = 0;
231 Face* m_face =
nullptr;
239 std::enable_if_t<std::is_base_of_v<LinkService, T> && !std::is_same_v<LinkService, T>,
243 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 Interest packets.
PacketCounter nOutNacks
Count of outgoing Nack packets.
PacketCounter nInInterests
Count of incoming Interest packets.
PacketCounter nInData
Count of incoming Data packets.
PacketCounter nInNacks
Count of incoming Nack packets.
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
Called when an Interest packet is received.
void receiveNack(const lp::Nack &nack, const EndpointId &endpoint)
Delivers received Nack to forwarding.
virtual ssize_t getEffectiveMtu() const
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
Called when an Interest is dropped by the reliability system for exceeding the allowed number of retr...
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
Called when a Nack packet is 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
Called when a Data packet is received.
void sendInterest(const Interest &interest)
Send Interest.
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.