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

The COMMUNITY filtering rule. More...

#include <bgp-filter.h>

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

Public Member Functions

 BgpFilterRuleCommunity (BgpFilterOP op, BgpFilterRuleCommunityMatchType type, uint16_t asn, uint16_t keyword)
 Construct a new COMMUNITY filtering object. More...
 
 BgpFilterRuleCommunity (BgpFilterOP op, BgpFilterRuleCommunityMatchType type, uint32_t community)
 Construct a new COMMUNITY 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 community
 community for this entry.
 
- Public Attributes inherited from libbgp::BgpFilterRule
uint8_t filter_type
 
uint8_t match_type
 
BgpFilterOP op
 

Detailed Description

The COMMUNITY filtering rule.

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

Constructor & Destructor Documentation

◆ BgpFilterRuleCommunity() [1/2]

libbgp::BgpFilterRuleCommunity::BgpFilterRuleCommunity ( BgpFilterOP  op,
BgpFilterRuleCommunityMatchType  type,
uint16_t  asn,
uint16_t  keyword 
)

Construct a new COMMUNITY filtering object.

Parameters
opAction to take if community matched.
typeType of matching.
asnASN part of the community. 'AAAA' in (AAAA:BBBB)
keywordkeyword part of the community. 'BBBB' in (AAAA:BBBB)

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

◆ BgpFilterRuleCommunity() [2/2]

libbgp::BgpFilterRuleCommunity::BgpFilterRuleCommunity ( BgpFilterOP  op,
BgpFilterRuleCommunityMatchType  type,
uint32_t  community 
)

Construct a new COMMUNITY filtering object.

Parameters
opAction to take if community matched.
typeType of matching.
communityRaw community value in host-byte order.

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

Member Function Documentation

◆ apply()

BgpFilterOP libbgp::BgpFilterRuleCommunity::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 110 of file bgp-filter.cc.


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