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);
87 setPacketFilter(const
char* filterString);
101 sendPacket(const
ndn::Block& block);
107 handleRead(const boost::system::error_code& error,
size_t nBytesRead);
117 processIncomingPacket(const pcap_pkthdr* header, const uint8_t* packet);
124 processErrorCode(const boost::system::error_code& error);
133 unique_ptr<
pcap_t,
void(*)(pcap_t*)> m_pcap;
134 boost::asio::posix::stream_descriptor m_socket;
136 ethernet::Address m_srcAddress;
137 ethernet::Address m_destAddress;
138 std::
string m_interfaceName;
139 #if defined(__linux__)
140 int m_interfaceIndex;
144 unsigned int m_nDropped;
152 #endif // NFD_DAEMON_FACE_ETHERNET_TRANSPORT_HPP
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
contains information about a network interface
EthernetTransport(const NetworkInterfaceInfo &interface, const ethernet::Address &mcastAddress)
Creates an Ethernet-based transport for multicast communication.
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