26 #ifndef NFD_DAEMON_FACE_ETHERNET_FACE_HPP 27 #define NFD_DAEMON_FACE_ETHERNET_FACE_HPP 35 #include <unordered_map> 38 #error "Cannot include this file when libpcap is not available" 63 EthernetFace(boost::asio::posix::stream_descriptor socket,
96 setPacketFilter(const
char* filterString);
104 joinMulticastGroup();
110 sendPacket(const
ndn::
Block& block);
116 handleRead(const
boost::system::error_code& error,
size_t nBytesRead);
126 processIncomingPacket(const pcap_pkthdr* header, const uint8_t* packet);
133 processErrorCode(const
boost::system::error_code& error);
144 unique_ptr<ndnlp::PartialMessageStore> pms;
148 unique_ptr<pcap_t, void(*)(pcap_t*)> m_pcap;
149 boost::asio::posix::stream_descriptor m_socket;
151 #if defined(__linux__) 152 int m_interfaceIndex;
154 std::string m_interfaceName;
158 size_t m_interfaceMtu;
159 unique_ptr<ndnlp::Slicer> m_slicer;
160 std::unordered_map<ethernet::Address, Reassembler> m_reassemblers;
161 static const time::nanoseconds REASSEMBLER_LIFETIME;
164 unsigned int m_nDropped;
171 #endif // NFD_DAEMON_FACE_ETHERNET_FACE_HPP
Copyright (c) 2011-2015 Regents of the University of California.
Copyright (c) 2013-2015 Regents of the University of California.
represents an Ethernet hardware address
contains information about a network interface
EthernetFace(boost::asio::posix::stream_descriptor socket, const NetworkInterfaceInfo &interface, const ethernet::Address &address)
void sendData(const Data &data) 1
send a Data
Class representing a wire element of NDN-TLV packet format.
represents an Interest packet
std::shared_ptr< ns3::EventId > EventId
#define DECL_OVERRIDE
expands to 'override' if compiler supports this feature, otherwise expands to nothing ...
void sendInterest(const Interest &interest) 1
send an Interest
Implementation of Face abstraction that uses raw Ethernet frames as underlying transport mechanism...
EthernetFace-related error.
Copyright (c) 2011-2015 Regents of the University of California.
void close() 1
Closes the face.
Error(const std::string &what)
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE