26 #ifndef NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP 27 #define NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP 40 static const std::string&
56 shared_ptr<EthernetChannel>
57 createChannel(
const shared_ptr<const ndn::net::NetworkInterface>& localEndpoint,
87 std::vector<shared_ptr<const Channel>>
88 doGetChannels()
const final;
93 shared_ptr<EthernetChannel>
94 applyUnicastConfigToNetif(
const shared_ptr<const ndn::net::NetworkInterface>& netif);
106 std::map<std::string, shared_ptr<EthernetChannel>> m_channels;
110 bool isEnabled =
false;
111 bool wantListen =
false;
114 UnicastConfig m_unicastConfig;
116 struct MulticastConfig
118 bool isEnabled =
false;
123 MulticastConfig m_mcastConfig;
126 std::map<std::pair<std::string, ethernet::Address>, shared_ptr<Face>> m_mcastFaces;
134 #endif // NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
std::function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created.
boost::optional< const ConfigSection & > OptionalConfigSection
an optional config file section
Represents one network interface attached to the host.
Provides support for an underlying protocol.
Address getDefaultMulticastAddress()
Returns the default Ethernet multicast address for NDN.
Copyright (c) 2011-2015 Regents of the University of California.
EthernetFactory(const CtorParams ¶ms)
Disconnects a Connection automatically upon destruction.
Protocol factory for Ethernet.
Parameters to ProtocolFactory constructor.
Represents a predicate to accept or reject a ndn::net::NetworkInterface.
shared_ptr< Face > createMulticastFace(const ndn::net::NetworkInterface &localEndpoint, const ethernet::Address &group)
Create a face to communicate on the given Ethernet multicast group.
context for processing a config section in ProtocolFactory
represents an Ethernet hardware address
Encapsulates a face creation request and all its parameters.
std::function< void(const shared_ptr< Face > &)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
static const std::string & getId() noexcept
boost::chrono::nanoseconds nanoseconds
shared_ptr< EthernetChannel > createChannel(const shared_ptr< const ndn::net::NetworkInterface > &localEndpoint, time::nanoseconds idleTimeout)
Create Ethernet-based channel on the specified network interface.