26 #ifndef NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP 27 #define NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP 33 #include <ndn-cxx/net/network-interface.hpp> 44 class Error :
public std::runtime_error
47 using std::runtime_error::runtime_error;
58 const ethernet::Address& sender);
62 const ethernet::Address& remoteEndpoint);
70 return m_hasRecentlyReceived;
76 m_hasRecentlyReceived =
false;
81 handleNetifStateChange(ndn::net::InterfaceState netifState);
84 doSend(
const Block& packet)
final;
90 sendPacket(
const ndn::Block& block);
96 handleRead(
const boost::system::error_code& error);
99 handleError(
const std::string& errorMessage);
109 signal::ScopedConnection m_netifStateChangedConn;
110 signal::ScopedConnection m_netifMtuChangedConn;
111 bool m_hasRecentlyReceived;
121 #endif // NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP ethernet::Address m_srcAddress
bool hasRecentlyReceived() const
ethernet::Address m_destAddress
void resetRecentlyReceived()
boost::asio::posix::stream_descriptor m_socket
The lower half of a Face.
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.
EthernetTransport(const ndn::net::NetworkInterface &localEndpoint, const ethernet::Address &remoteEndpoint)
Helper class for dealing with libpcap handles.