nfd::fw::UnsolicitedDataPolicy Class Referenceabstract

Determines how to process an unsolicited Data packet. More...

#include <daemon/fw/unsolicited-data-policy.hpp>

+ Inheritance diagram for nfd::fw::UnsolicitedDataPolicy:
+ Collaboration diagram for nfd::fw::UnsolicitedDataPolicy:

Public Member Functions

virtual ~UnsolicitedDataPolicy ()=default
 
virtual UnsolicitedDataDecision decide (const Face &inFace, const Data &data) const =0
 

Static Public Member Functions

static unique_ptr< UnsolicitedDataPolicycreate (const std::string &policyName)
 
static std::set< std::string > getPolicyNames ()
 
template<typename P >
static void registerPolicy (std::string_view policyName=P::POLICY_NAME)
 

Detailed Description

Determines how to process an unsolicited Data packet.

An incoming Data packet is unsolicited if it does not match any PIT entry. This class assists forwarding pipelines to decide whether to drop an unsolicited Data or admit it into the ContentStore.

Definition at line 55 of file unsolicited-data-policy.hpp.

Constructor & Destructor Documentation

◆ ~UnsolicitedDataPolicy()

virtual nfd::fw::UnsolicitedDataPolicy::~UnsolicitedDataPolicy ( )
virtualdefault

Member Function Documentation

◆ create()

unique_ptr< UnsolicitedDataPolicy > nfd::fw::UnsolicitedDataPolicy::create ( const std::string &  policyName)
static
Returns
an UnsolicitedDataPolicy identified by policyName, or nullptr if policyName is unknown

Definition at line 53 of file unsolicited-data-policy.cpp.

◆ decide()

virtual UnsolicitedDataDecision nfd::fw::UnsolicitedDataPolicy::decide ( const Face inFace,
const Data &  data 
) const
pure virtual

◆ getPolicyNames()

std::set< std::string > nfd::fw::UnsolicitedDataPolicy::getPolicyNames ( )
static
Returns
a list of available policy names

Definition at line 61 of file unsolicited-data-policy.cpp.

◆ registerPolicy()

template<typename P >
static void nfd::fw::UnsolicitedDataPolicy::registerPolicy ( std::string_view  policyName = P::POLICY_NAME)
inlinestatic

Definition at line 67 of file unsolicited-data-policy.hpp.