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,
58 time::nanoseconds idleTimeout);
87 std::vector<shared_ptr<const Channel>>
88 doGetChannels()
const override;
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;
112 time::nanoseconds idleTimeout = 10_min;
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
std::function< void(const shared_ptr< Face > &face)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
Represents one network interface attached to the host.
Represents a predicate to accept or reject a ndn::net::NetworkInterface.
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.
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.
static const std::string & getId() noexcept
shared_ptr< EthernetChannel > createChannel(const shared_ptr< const ndn::net::NetworkInterface > &localEndpoint, time::nanoseconds idleTimeout)
Create Ethernet-based channel on the specified network interface.