26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP 27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP 43 using ProtocolFactory::Error::Error;
46 static const std::string&
67 shared_ptr<UdpChannel>
69 time::nanoseconds idleTimeout);
95 const boost::asio::ip::address& localAddress,
110 std::vector<shared_ptr<const Channel>>
111 doGetChannels()
const override;
116 std::vector<shared_ptr<Face>>
117 applyMcastConfigToNetif(
const shared_ptr<const ndn::net::NetworkInterface>& netif);
125 bool m_wantCongestionMarking =
false;
126 std::map<udp::Endpoint, shared_ptr<UdpChannel>> m_channels;
128 struct MulticastConfig
130 bool isEnabled =
false;
133 ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS;
136 MulticastConfig m_mcastConfig;
137 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
139 signal::ScopedConnection m_netifAddConn;
142 signal::ScopedConnection addrAddConn;
144 std::map<int, NetifConns> m_netifConns;
150 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP static const std::string & getId() noexcept
UdpFactory(const CtorParams ¶ms)
shared_ptr< Face > createMulticastFace(const shared_ptr< const ndn::net::NetworkInterface > &netif, const boost::asio::ip::address &localAddress, const udp::Endpoint &multicastEndpoint)
Create a multicast UDP face.
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.
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, time::nanoseconds idleTimeout)
Create UDP-based channel using udp::Endpoint.
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...
Endpoint getDefaultMulticastGroup()
context for processing a config section in ProtocolFactory
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Represents a predicate to accept or reject a ndn::net::NetworkInterface.
boost::asio::ip::udp::endpoint Endpoint
Provides support for an underlying protocol.
Parameters to ProtocolFactory constructor.
Endpoint getDefaultMulticastGroupV6()
Protocol factory for UDP over IPv4 and IPv6.
Base class for all exceptions thrown by ProtocolFactory subclasses.
Encapsulates a face creation request and all its parameters.