26 #ifndef NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP
27 #define NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP
34 #error "Cannot include this file when libpcap is not available"
51 class Error :
public std::runtime_error
56 :
std::runtime_error(what)
65 const ethernet::Address& mcastAddress);
90 setPacketFilter(const
char* filterString);
104 sendPacket(const
ndn::Block& block);
110 handleRead(const boost::system::error_code& error,
size_t nBytesRead);
120 processIncomingPacket(const pcap_pkthdr* header, const uint8_t* packet);
127 processErrorCode(const boost::system::error_code& error);
136 unique_ptr<
pcap_t,
void(*)(pcap_t*)> m_pcap;
137 boost::asio::posix::stream_descriptor m_socket;
139 ethernet::Address m_srcAddress;
140 ethernet::Address m_destAddress;
141 std::
string m_interfaceName;
142 #if defined(__linux__)
143 int m_interfaceIndex;
147 unsigned int m_nDropped;
155 #endif // NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
virtual void beforeChangePersistency(ndn::nfd::FacePersistency newPersistency) final
invoked before persistency is changed
contains information about a network interface
EthernetTransport(const NetworkInterfaceInfo &interface, const ethernet::Address &mcastAddress)
Creates an Ethernet-based transport for multicast communication.
virtual void doClose() final
performs Transport specific operations to close the transport
A multicast Transport that uses raw Ethernet II frames.
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Error(const std::string &what)
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE