26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP 27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP 56 static const std::string&
88 shared_ptr<UdpChannel>
90 time::nanoseconds idleTimeout);
92 std::vector<shared_ptr<const Channel>>
123 const std::string& networkInterfaceName =
"");
127 const std::string& multicastIp,
128 const std::string& multicastPort,
129 const std::string& networkInterfaceName =
"");
136 applyMcastConfigToNetif(
const shared_ptr<const ndn::net::NetworkInterface>& netif);
144 std::map<udp::Endpoint, shared_ptr<UdpChannel>> m_channels;
146 struct MulticastConfig
148 bool isEnabled =
false;
150 ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS;
154 MulticastConfig m_mcastConfig;
155 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
157 signal::ScopedConnection m_netifAddConn;
160 signal::ScopedConnection addrAddConn;
162 std::map<int, NetifConns> m_netifConns;
168 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP void createFace(const CreateFaceParams ¶ms, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override
Try to create face using the supplied parameters.
UdpFactory(const CtorParams ¶ms)
std::vector< shared_ptr< const Channel > > getChannels() const override
Error(const std::string &what)
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, time::nanoseconds idleTimeout)
Create UDP-based channel using udp::Endpoint.
Endpoint getDefaultMulticastGroup()
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
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::asio::ip::udp::endpoint Endpoint
Provides support for an underlying protocol.
void processConfig(OptionalConfigSection configSection, FaceSystem::ConfigContext &context) override
process face_system.udp config section
Parameters to ProtocolFactory constructor.
static const std::string & getId()
Parameters to ProtocolFactory::createFace.
Represents a predicate to accept or reject a NetworkInterfaceInfo.
protocol factory for UDP over IPv4 and IPv6
Base class for all exceptions thrown by ProtocolFactory subclasses.
shared_ptr< Face > createMulticastFace(const udp::Endpoint &localEndpoint, const udp::Endpoint &multicastEndpoint, const std::string &networkInterfaceName="")
Create multicast UDP face using udp::Endpoint.
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...