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>
95 const boost::asio::ip::address& localAddress,
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);
125 bool m_wantCongestionMarking =
false;
127 std::map<udp::Endpoint, shared_ptr<UdpChannel>> m_channels;
129 struct MulticastConfig
131 bool isEnabled =
false;
137 MulticastConfig m_mcastConfig;
138 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
145 std::map<int, NetifConns> m_netifConns;
151 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP 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.
boost::optional< const ConfigSection & > OptionalConfigSection
an optional config file section
Protocol factory for UDP over IPv4 and IPv6.
Endpoint getDefaultMulticastGroup()
Provides support for an underlying protocol.
Copyright (c) 2011-2015 Regents of the University of California.
Disconnects a Connection automatically upon destruction.
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, time::nanoseconds idleTimeout)
Create UDP-based channel using udp::Endpoint.
Parameters to ProtocolFactory constructor.
Represents a predicate to accept or reject a ndn::net::NetworkInterface.
Base class for all exceptions thrown by ProtocolFactory subclasses.
context for processing a config section in ProtocolFactory
boost::asio::ip::udp::endpoint Endpoint
static const std::string & getId() noexcept
Encapsulates a face creation request and all its parameters.
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...
Endpoint getDefaultMulticastGroupV6()
UdpFactory(const CtorParams ¶ms)
boost::chrono::nanoseconds nanoseconds
const size_t MAX_NDN_PACKET_SIZE
Practical size limit of a network-layer packet.