26 #ifndef NFD_DAEMON_FACE_UDP_FACTORY_HPP 27 #define NFD_DAEMON_FACE_UDP_FACTORY_HPP 56 static const std::string&
88 shared_ptr<UdpChannel>
90 time::nanoseconds idleTimeout);
92 std::vector<shared_ptr<const Channel>>
119 const boost::asio::ip::address& localAddress,
126 std::vector<shared_ptr<Face>>
127 applyMcastConfigToNetif(
const shared_ptr<const ndn::net::NetworkInterface>& netif);
135 bool m_wantCongestionMarking =
false;
136 std::map<udp::Endpoint, shared_ptr<UdpChannel>> m_channels;
138 struct MulticastConfig
140 bool isEnabled =
false;
146 MulticastConfig m_mcastConfig;
147 std::map<udp::Endpoint, shared_ptr<Face>> m_mcastFaces;
154 std::map<int, NetifConns> m_netifConns;
160 #endif // NFD_DAEMON_FACE_UDP_FACTORY_HPP void createFace(const CreateFaceRequest &req, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override
Try to create a unicast face using the supplied parameters.
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.
ProtocolFactoryCtorParams CtorParams
Error(const std::string &what)
std::vector< shared_ptr< const Channel > > getChannels() const override
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...
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created.
static const std::string & getId()
protocol factory for UDP over IPv4 and IPv6
Endpoint getDefaultMulticastGroup()
Represents a predicate to accept or reject a NetworkInterfaceInfo.
Provides support for an underlying protocol.
void processConfig(OptionalConfigSection configSection, FaceSystem::ConfigContext &context) override
process face_system.udp config section
Copyright (c) 2011-2015 Regents of the University of California.
disconnects a Connection automatically upon destruction
boost::optional< const ConfigSection & > OptionalConfigSection
an optional config file section
shared_ptr< UdpChannel > createChannel(const udp::Endpoint &localEndpoint, time::nanoseconds idleTimeout)
Create UDP-based channel using udp::Endpoint.
Base class for all exceptions thrown by ProtocolFactory subclasses.
context for processing a config section in ProtocolFactory
boost::asio::ip::udp::endpoint Endpoint
Endpoint getDefaultMulticastGroupV6()
UdpFactory(const CtorParams ¶ms)