26 #ifndef NFD_DAEMON_FACE_ETHERNET_CHANNEL_HPP    27 #define NFD_DAEMON_FACE_ETHERNET_CHANNEL_HPP    32 #include <ndn-cxx/net/network-interface.hpp>    46   class Error : 
public std::runtime_error
    51       : 
std::runtime_error(what)
    62   EthernetChannel(shared_ptr<const ndn::net::NetworkInterface> localEndpoint,
    63                   time::nanoseconds idleTimeout);
    74     return m_channelFaces.size();
    89           bool wantLpReliability,
   115   handleRead(
const boost::system::error_code& error,
   120   processIncomingPacket(
const uint8_t* packet, 
size_t length,
   125   std::pair<bool, shared_ptr<Face>>
   128              bool wantLpReliability);
   134   shared_ptr<const ndn::net::NetworkInterface> m_localEndpoint;
   136   boost::asio::posix::stream_descriptor m_socket;
   138   std::map<ethernet::Address, shared_ptr<Face>> m_channelFaces;
   139   const time::nanoseconds m_idleFaceTimeout; 
   150 #endif // NFD_DAEMON_FACE_ETHERNET_CHANNEL_HPP represent a channel that communicates on a local endpoint 
 
Helper class for dealing with libpcap handles. 
 
bool isListening() const override
Returns whether the channel is listening. 
 
Class implementing Ethernet-based channel to create faces. 
 
EthernetChannel-related error. 
 
Copyright (c) 2011-2015 Regents of the University of California. 
 
void listen(const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onFaceCreationFailed)
Start listening. 
 
void connect(const ethernet::Address &remoteEndpoint, ndn::nfd::FacePersistency persistency, bool wantLpReliability, const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onConnectFailed)
Create a unicast Ethernet face toward remoteEndpoint. 
 
Error(const std::string &what)
 
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created. 
 
represents an Ethernet hardware address 
 
EthernetChannel(shared_ptr< const ndn::net::NetworkInterface > localEndpoint, time::nanoseconds idleTimeout)
Create an Ethernet channel on the given localEndpoint (network interface) 
 
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
 
size_t size() const override
Returns the number of faces in the channel.