26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP
27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP
44 using ProtocolFactory::Error::Error;
47 static const std::string&
70 time::nanoseconds idleTimeout);
96 const boost::asio::ip::address& localAddress,
97 const udp::
Endpoint& multicastEndpoint);
109 std::vector<shared_ptr<const
Channel>>
110 doGetChannels() const final;
116 std::vector<shared_ptr<
Face>>
117 applyMcastConfigToNetif(const shared_ptr<const
ndn::net::NetworkInterface>& netif);
123 applyMcastConfig(const
FaceSystem::ConfigContext& context);
126 bool m_wantCongestionMarking = false;
127 size_t m_defaultUnicastMtu =
ndn::MAX_NDN_PACKET_SIZE;
130 struct MulticastConfig
132 bool isEnabled =
false;
135 ndn::nfd::LinkType linkType = ndn::nfd::LINK_TYPE_MULTI_ACCESS;
138 MulticastConfig m_mcastConfig;
139 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
141 signal::ScopedConnection m_netifAddConn;
144 signal::ScopedConnection addrAddConn;
146 std::map<int, NetifConns> m_netifConns;
Represents a channel that listens on a local endpoint.
Generalization of a network interface.
Entry point of NFD's 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 a UDP-based channel to create faces.
Protocol factory for UDP over IPv4 and IPv6.
shared_ptr< Face > createMulticastFace(const ndn::net::NetworkInterface &netif, const boost::asio::ip::address &localAddress, const udp::Endpoint &multicastEndpoint)
Create a multicast UDP face.
static const std::string & getId() noexcept
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, time::nanoseconds idleTimeout)
Create UDP-based channel using udp::Endpoint.
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()
Returns the default IPv4 multicast group: 224.0.23.170:56363
Endpoint getDefaultMulticastGroupV6()
Returns the default IPv6 multicast group: [FF02::1234]:56363
boost::asio::ip::udp::endpoint Endpoint
boost::optional< const ConfigSection & > OptionalConfigSection
An optional configuration file section.
Encapsulates a face creation request and all its parameters.
Parameters to ProtocolFactory constructor.