26 #ifndef NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP 27 #define NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP 40 static const std::string&
67 shared_ptr<EthernetChannel>
68 createChannel(
const shared_ptr<const ndn::net::NetworkInterface>& localEndpoint,
69 time::nanoseconds idleTimeout);
71 std::vector<shared_ptr<const Channel>>
87 const ethernet::Address& group);
93 shared_ptr<EthernetChannel>
94 applyUnicastConfigToNetif(
const shared_ptr<const ndn::net::NetworkInterface>& netif);
100 applyMcastConfigToNetif(
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 = time::seconds(600);
114 UnicastConfig m_unicastConfig;
116 struct MulticastConfig
118 bool isEnabled =
false;
119 ethernet::Address group = ethernet::getDefaultMulticastAddress();
120 ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS;
123 MulticastConfig m_mcastConfig;
126 std::map<std::pair<std::string, ethernet::Address>, shared_ptr<Face>> m_mcastFaces;
128 signal::ScopedConnection m_netifAddConn;
134 #endif // NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP void createFace(const CreateFaceParams ¶ms, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override
Try to create face using the supplied parameters.
std::vector< shared_ptr< const Channel > > getChannels() const override
context for processing a config section in ProtocolFactory
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
boost::optional< const ConfigSection & > OptionalConfigSection
an optional config file section
static const std::string & getId()
protocol factory for Ethernet
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created.
shared_ptr< EthernetChannel > createChannel(const shared_ptr< const ndn::net::NetworkInterface > &localEndpoint, time::nanoseconds idleTimeout)
Create Ethernet-based channel on the specified network interface.
Provides support for an underlying protocol.
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.
void processConfig(OptionalConfigSection configSection, FaceSystem::ConfigContext &context) override
process face_system.ether config section
Parameters to ProtocolFactory::createFace.
Represents a predicate to accept or reject a NetworkInterfaceInfo.
EthernetFactory(const CtorParams ¶ms)
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...