libbgp  0.6
A C++ BGP Library.
Public Member Functions | List of all members
libbgp::BgpFilterRules Class Reference

The BGP filtering rules set. More...

#include <bgp-filter.h>

Public Member Functions

 BgpFilterRules ()
 Construct a new BgpFilterRules rules set. More...
 
 BgpFilterRules (BgpFilterOP default_op)
 Construct a new BgpFilterRules rules set. More...
 
template<typename T >
void append (const BgpFilterRule &rule)
 Append a rule to the rule set. More...
 
BgpFilterOP apply (const Prefix &prefix, const std::vector< std::shared_ptr< BgpPathAttrib >> &attribs)
 Apply the rules set on a route. More...
 

Detailed Description

The BGP filtering rules set.

Examples:
route-filter.cc.

Definition at line 211 of file bgp-filter.h.

Constructor & Destructor Documentation

◆ BgpFilterRules() [1/2]

libbgp::BgpFilterRules::BgpFilterRules ( )

Construct a new BgpFilterRules rules set.

Default action is ACCEPT.

Definition at line 131 of file bgp-filter.cc.

References libbgp::ACCEPT.

◆ BgpFilterRules() [2/2]

libbgp::BgpFilterRules::BgpFilterRules ( BgpFilterOP  default_op)

Construct a new BgpFilterRules rules set.

Parameters
default_opDefault action.

Definition at line 140 of file bgp-filter.cc.

Member Function Documentation

◆ append()

template<typename T >
void libbgp::BgpFilterRules::append ( const BgpFilterRule rule)
inline

Append a rule to the rule set.

Template Parameters
TType of this rule.
Parameters
ruleThe rule to append.
Examples:
route-filter.cc.

Definition at line 224 of file bgp-filter.h.

References libbgp::BgpFilterRule::apply().

◆ apply()

BgpFilterOP libbgp::BgpFilterRules::apply ( const Prefix prefix,
const std::vector< std::shared_ptr< BgpPathAttrib >> &  attribs 
)

Apply the rules set on a route.

Parameters
prefixRoute prefix.
attribsPath attribues.
Returns
BgpFilterOP Action to take.

Definition at line 151 of file bgp-filter.cc.

References libbgp::NOP.


The documentation for this class was generated from the following files: