libbgp  0.6
A C++ BGP Library.
Classes | Enumerations
bgp-filter.h File Reference

Route filtering engine. More...

#include <vector>
#include <memory>
#include "bgp-afi.h"
#include "prefix4.h"
#include "prefix6.h"
#include "bgp-path-attrib.h"
Include dependency graph for bgp-filter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  libbgp::BgpFilterRule
 The base of BgpFilterRule. More...
 
class  libbgp::BgpFilterRuleRoute< T >
 The prefix filtering rule. More...
 
class  libbgp::BgpFilterRuleRoute4
 The IPv4 route filtering rule. More...
 
class  libbgp::BgpFilterRuleRoute6
 The IPv6 route filtering rule. More...
 
class  libbgp::BgpFilterRuleAsPath
 The AS_PATH filtering rule. More...
 
class  libbgp::BgpFilterRuleCommunity
 The COMMUNITY filtering rule. More...
 
class  libbgp::BgpFilterRules
 The BGP filtering rules set. More...
 

Enumerations

enum  libbgp::BgpFilterRuleType { libbgp::F_ROUTE, libbgp::F_AS_PATH, libbgp::F_COMMUNITY }
 Type of filter rule. More...
 
enum  libbgp::BgpFilterRuleRouteMatchType {
  libbgp::M_EQ, libbgp::M_NE, libbgp::M_GT, libbgp::M_LT,
  libbgp::M_GE, libbgp::M_LE
}
 Matching type of IP prefix rule. More...
 
enum  libbgp::BgpFilterRuleAsPathMatchType { libbgp::M_HAS_ASN, libbgp::M_NOT_HAS_ASN, libbgp::M_FROM_ASN, libbgp::M_NOT_FROM_ASN }
 Matching type of AS_PATH rule. More...
 
enum  libbgp::BgpFilterRuleCommunityMatchType { libbgp::M_HAS_COMMUNITY, libbgp::M_NOT_HAS_COMMUNITY }
 Matching type of COMMUNITY rule. More...
 
enum  libbgp::BgpFilterOP { libbgp::NOP, libbgp::ACCEPT, libbgp::REJECT }
 The filter operation. More...
 
enum  libbgp::BgpWellKnownCommunity { NO_EXPORT = 0xFFFFFF01, NO_ADVERTISE = 0xFFFFFF02, NO_EXPORT_SUBCONFED = 0xFFFFFF03 }
 BGP well-known communities.
 

Detailed Description

Route filtering engine.

Author
Nato Morichika nat@n.nosp@m.at.m.nosp@m.oe
Version
0.3
Date
2019-07-31

Definition in file bgp-filter.h.

Enumeration Type Documentation

◆ BgpFilterOP

The filter operation.

Enumerator
NOP 

No Operation (Prefix does not match)

ACCEPT 

Accept

REJECT 

Reject

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

◆ BgpFilterRuleAsPathMatchType

Matching type of AS_PATH rule.

Enumerator
M_HAS_ASN 

Match routes that has the ASN in AS_PATH

M_NOT_HAS_ASN 

Match routes that does not have the ASN in AS_PATH

M_FROM_ASN 

Match routes that are originating from the ASN

M_NOT_FROM_ASN 

Match routes that are not originating from the ASN

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

◆ BgpFilterRuleCommunityMatchType

Matching type of COMMUNITY rule.

Enumerator
M_HAS_COMMUNITY 

Match routes has the given community

M_NOT_HAS_COMMUNITY 

Match routes does not have the given community

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

◆ BgpFilterRuleRouteMatchType

Matching type of IP prefix rule.

Enumerator
M_EQ 

Match a IP prefix equals to rule prefix

M_NE 

Match a IP prefix does not equals to rule prefix

M_GT 

Match a IP prefix that has this prefix as sub-prefix (greater then)

M_LT 

Match a sub-prefix of this IP prefix (less then)

M_GE 

Match a IP prefix equals to, or greater then the rule prefix

M_LE 

Match a IP prefix equals to, or less then the rule prefix

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

◆ BgpFilterRuleType

Type of filter rule.

Enumerator
F_ROUTE 

Match a IP prefix

F_AS_PATH 

Match AS_PATH

F_COMMUNITY 

Match COMMUNITY

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