26 #ifndef NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP 27 #define NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP 32 #include <ndn-cxx/net/network-interface.hpp> 43 class Error :
public std::runtime_error
48 :
std::runtime_error(what)
61 const ethernet::Address& sender);
65 const ethernet::Address& remoteEndpoint);
73 return m_hasRecentlyReceived;
79 m_hasRecentlyReceived =
false;
90 sendPacket(
const ndn::Block& block);
96 handleRead(
const boost::system::error_code& error);
99 handleError(
const std::string& errorMessage);
109 bool m_hasRecentlyReceived;
119 #endif // NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP ethernet::Address m_srcAddress
ethernet::Address m_destAddress
void resetRecentlyReceived()
boost::asio::posix::stream_descriptor m_socket
stores a packet along with the remote endpoint
void doClose() final
performs Transport specific operations to close the transport
std::string m_interfaceName
Base class for Ethernet-based Transports.
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
void receivePayload(const uint8_t *payload, size_t length, const ethernet::Address &sender)
Processes the payload of an incoming frame.
Error(const std::string &what)
EthernetTransport(const ndn::net::NetworkInterface &localEndpoint, const ethernet::Address &remoteEndpoint)
bool hasRecentlyReceived() const
Helper class for dealing with libpcap handles.