26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP
27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP
56 static const std::string&
67 ndn::nfd::FacePersistency persistency,
68 bool wantLocalFieldsEnabled,
96 shared_ptr<UdpChannel>
98 const time::seconds& timeout = time::seconds(600));
114 shared_ptr<UdpChannel>
115 createChannel(
const std::string& localIp,
const std::string& localPort,
116 const time::seconds& timeout = time::seconds(600));
118 std::vector<shared_ptr<const Channel>>
155 const std::string& networkInterfaceName =
"");
159 const std::string& multicastIp,
160 const std::string& multicastPort,
161 const std::string& networkInterfaceName =
"");
168 prohibitAllIpv4Endpoints(uint16_t port);
171 prohibitAllIpv6Endpoints(uint16_t port);
180 shared_ptr<UdpChannel>
196 std::map<udp::Endpoint, shared_ptr<UdpChannel>> m_channels;
198 struct MulticastConfig
200 bool isEnabled =
false;
205 MulticastConfig m_mcastConfig;
206 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
209 std::set<udp::Endpoint> m_prohibitedEndpoints;
215 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, const time::seconds &timeout=time::seconds(600))
Create UDP-based channel using udp::Endpoint.
void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, bool wantLocalFieldsEnabled, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override
Try to create Face using the supplied FaceUri.
Error(const std::string &what)
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
boost::asio::ip::udp::endpoint Endpoint
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when the face fails to be created.
provide support for an underlying protocol
void processConfig(OptionalConfigSection configSection, FaceSystem::ConfigContext &context) override
process face_system.udp config section
static const std::string & getId()
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when the face is created (as a response to incoming connec...
std::vector< shared_ptr< const Channel > > getChannels() const override
Represents a predicate to accept or reject a NetworkInterfaceInfo.
protocol factory for UDP over IPv4 and IPv6
Base class for all exceptions thrown by protocol factories.
shared_ptr< Face > createMulticastFace(const udp::Endpoint &localEndpoint, const udp::Endpoint &multicastEndpoint, const std::string &networkInterfaceName="")
Create MulticastUdpFace using udp::Endpoint.