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&
69 time::nanoseconds idleTimeout);
95 const boost::asio::ip::address& localAddress,
96 const udp::
Endpoint& multicastEndpoint);
110 std::vector<shared_ptr<const
Channel>>
111 doGetChannels() const final;
116 std::vector<shared_ptr<
Face>>
117 applyMcastConfigToNetif(const shared_ptr<const
ndn::net::NetworkInterface>& netif);
122 applyMcastConfig(const
FaceSystem::ConfigContext& context);
125 bool m_wantCongestionMarking = false;
126 size_t m_defaultUnicastMtu =
ndn::MAX_NDN_PACKET_SIZE;
129 struct MulticastConfig
131 bool isEnabled =
false;
134 ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS;
137 MulticastConfig m_mcastConfig;
138 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
140 signal::ScopedConnection m_netifAddConn;
143 signal::ScopedConnection addrAddConn;
145 std::map<int, NetifConns> m_netifConns;
Represents a channel that listens on a local endpoint.
generalization of a network interface
entry point of the face system
Represents a predicate to accept or reject a ndn::net::NetworkInterface.
Base class for all exceptions thrown by ProtocolFactory subclasses.
Provides support for an underlying protocol.
Class implementing UDP-based channel to create faces.
Protocol factory for UDP over IPv4 and IPv6.
static const std::string & getId() noexcept
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.
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, time::nanoseconds idleTimeout)
Create UDP-based channel using udp::Endpoint.
Copyright (c) 2014-2017, Regents of the University of California, Arizona Board of Regents,...
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.
std::function< void(const shared_ptr< Face > &)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
boost::asio::ip::tcp::endpoint Endpoint
Endpoint getDefaultMulticastGroup()
Endpoint getDefaultMulticastGroupV6()
boost::asio::ip::udp::endpoint Endpoint
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents,...
boost::optional< const ConfigSection & > OptionalConfigSection
an optional config file section
Encapsulates a face creation request and all its parameters.
Parameters to ProtocolFactory constructor.