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

The AS_PATH filtering rule. More...

#include <bgp-filter.h>

Inheritance diagram for libbgp::BgpFilterRuleAsPath:
Inheritance graph
[legend]
Collaboration diagram for libbgp::BgpFilterRuleAsPath:
Collaboration graph
[legend]

Public Member Functions

 BgpFilterRuleAsPath (BgpFilterOP op, BgpFilterRuleAsPathMatchType type, uint32_t asn)
 Construct a new AS_PATH filtering object. More...
 
BgpFilterOP apply (const Prefix &prefix, const std::vector< std::shared_ptr< BgpPathAttrib >> &attribs)
 Apply the rule on a route. More...
 

Public Attributes

uint32_t asn
 The ASN of this entry.
 
- Public Attributes inherited from libbgp::BgpFilterRule
uint8_t filter_type
 
uint8_t match_type
 
BgpFilterOP op
 

Detailed Description

The AS_PATH filtering rule.

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

Constructor & Destructor Documentation

◆ BgpFilterRuleAsPath()

libbgp::BgpFilterRuleAsPath::BgpFilterRuleAsPath ( BgpFilterOP  op,
BgpFilterRuleAsPathMatchType  type,
uint32_t  asn 
)

Construct a new AS_PATH filtering object.

Parameters
opAction to take if the asn matched.
typeType of matching.
asnASN to match.

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

Member Function Documentation

◆ apply()

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

Apply the rule on a route.

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

Implements libbgp::BgpFilterRule.

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


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