-
Notifications
You must be signed in to change notification settings - Fork 0
/
bgp-filter_8cc_source.html
112 lines (110 loc) · 35 KB
/
bgp-filter_8cc_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libbgp: src/bgp-filter.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libbgp
 <span id="projectnumber">0.6</span>
</div>
<div id="projectbrief">A C++ BGP Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">bgp-filter.cc</div> </div>
</div><!--header-->
<div class="contents">
<a href="bgp-filter_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include <arpa/inet.h></span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "<a class="code" href="bgp-filter_8h.html">bgp-filter.h</a>"</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "<a class="code" href="value-op_8h.html">value-op.h</a>"</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">namespace </span><a class="code" href="namespacelibbgp.html">libbgp</a> {</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> BgpFilterRule::~BgpFilterRule() {}</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleRoute4.html#a5bd5981d2c3f745b20a627c6283e5235"> 26</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRuleRoute4.html#a5bd5981d2c3f745b20a627c6283e5235">BgpFilterRuleRoute4::BgpFilterRuleRoute4</a>(<a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> op, <a class="code" href="bgp-filter_8h.html#a8e60861335e07d6ae40515b00d45cea4">BgpFilterRuleRouteMatchType</a> type, <span class="keyword">const</span> <a class="code" href="classlibbgp_1_1Prefix4.html">Prefix4</a> &prefix) {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  this->op = op;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  this->match_type = type;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  this->prefix = prefix;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> }</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleRoute6.html#a2914ea56c24b939238bd6f2a7971758b"> 39</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRuleRoute6.html#a2914ea56c24b939238bd6f2a7971758b">BgpFilterRuleRoute6::BgpFilterRuleRoute6</a>(<a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> op, <a class="code" href="bgp-filter_8h.html#a8e60861335e07d6ae40515b00d45cea4">BgpFilterRuleRouteMatchType</a> type, <span class="keyword">const</span> <a class="code" href="classlibbgp_1_1Prefix6.html">Prefix6</a> &prefix) {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  this->op = op;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  this->match_type = type;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  this->prefix = prefix;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> }</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleAsPath.html#aa3d51e83fa2faa2e4b0e32ed38557bab"> 52</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRuleAsPath.html#aa3d51e83fa2faa2e4b0e32ed38557bab">BgpFilterRuleAsPath::BgpFilterRuleAsPath</a>(<a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> op, <a class="code" href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35f">BgpFilterRuleAsPathMatchType</a> type, uint32_t asn) {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  this->op = op;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  this->match_type = type;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  this->asn = asn;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> }</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleAsPath.html#a6df571b7a2cf78e7ef1c6a1edd713f37"> 58</a></span> <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> <a class="code" href="classlibbgp_1_1BgpFilterRuleAsPath.html#a6df571b7a2cf78e7ef1c6a1edd713f37">BgpFilterRuleAsPath::apply</a>(__attribute__((unused)) <span class="keyword">const</span> <a class="code" href="classlibbgp_1_1Prefix.html">Prefix</a> &prefix, <span class="keyword">const</span> std::vector<std::shared_ptr<BgpPathAttrib>> &attribs) {</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> std::shared_ptr<BgpPathAttrib> &attr : attribs) {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">if</span> (attr->type_code != AS_PATH) <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">const</span> <a class="code" href="classlibbgp_1_1BgpPathAttribAsPath.html">BgpPathAttribAsPath</a> &as_path = <span class="keyword">dynamic_cast<</span><span class="keyword">const </span><a class="code" href="classlibbgp_1_1BgpPathAttribAsPath.html">BgpPathAttribAsPath</a> &<span class="keyword">></span>(*attr);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code" href="classlibbgp_1_1BgpAsPathSegment.html">BgpAsPathSegment</a> &as_seg : as_path.<a class="code" href="classlibbgp_1_1BgpPathAttribAsPath.html#a9ad756364bcf221fc86e1784c3258edb">as_paths</a>) {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">if</span> (as_seg.<a class="code" href="classlibbgp_1_1BgpAsPathSegment.html#a47a7d8a13b454352b0296165982be784">type</a> != AS_SEQUENCE) <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span> (match_type == <a class="code" href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fa58706a88aad2b5b89f9e1dac9a7ac41f">M_FROM_ASN</a> && asn == as_seg.<a class="code" href="classlibbgp_1_1BgpAsPathSegment.html#acb171d66f3da4436349cce335b836778">value</a>.back()) <span class="keywordflow">return</span> op;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">if</span> (match_type == <a class="code" href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fabb2f4ed0267cedd5f1cad20ab323bf81">M_NOT_FROM_ASN</a> && asn != as_seg.<a class="code" href="classlibbgp_1_1BgpAsPathSegment.html#acb171d66f3da4436349cce335b836778">value</a>.back()) <span class="keywordflow">return</span> op;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">for</span> (uint32_t asn : as_seg.<a class="code" href="classlibbgp_1_1BgpAsPathSegment.html#acb171d66f3da4436349cce335b836778">value</a>) {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">if</span> (asn == this->asn && match_type == <a class="code" href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fa91d04966032d4ff43db604a9b4b6eef7">M_HAS_ASN</a>) <span class="keywordflow">return</span> op;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span> (match_type == <a class="code" href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fad45494682f19fceef914dc40913e6c43">M_NOT_HAS_ASN</a>) <span class="keywordflow">return</span> op; </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293a79774da657eb06abce97987173efec06">NOP</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleCommunity.html#ada70e5e64473e5093b5aa5f7db4462a4"> 89</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRuleCommunity.html#ada70e5e64473e5093b5aa5f7db4462a4">BgpFilterRuleCommunity::BgpFilterRuleCommunity</a>(<a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> op, <a class="code" href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84b">BgpFilterRuleCommunityMatchType</a> type, uint16_t asn, uint16_t keyword) {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  this->op = op;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  this->match_type = type;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  uint8_t *community_ptr = (uint8_t *) &community;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  putValue<uint16_t>(&community_ptr, htons(asn));</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  putValue<uint16_t>(&community_ptr, htons(keyword));</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> }</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleCommunity.html#aa20b0ccd1350d7fca8d54cdd938cdb0d"> 104</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRuleCommunity.html#ada70e5e64473e5093b5aa5f7db4462a4">BgpFilterRuleCommunity::BgpFilterRuleCommunity</a>(<a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> op, <a class="code" href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84b">BgpFilterRuleCommunityMatchType</a> type, uint32_t community) {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  this->op = op;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  this->match_type = type;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  this->community = htonl(community);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> }</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRuleCommunity.html#afec89febd53af55d0c5377bb8f5031f3"> 110</a></span> <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> <a class="code" href="classlibbgp_1_1BgpFilterRuleCommunity.html#afec89febd53af55d0c5377bb8f5031f3">BgpFilterRuleCommunity::apply</a>(__attribute__((unused)) <span class="keyword">const</span> <a class="code" href="classlibbgp_1_1Prefix.html">Prefix</a> &prefix, <span class="keyword">const</span> std::vector<std::shared_ptr<BgpPathAttrib>> &attribs) {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> std::shared_ptr<BgpPathAttrib> &attr : attribs) {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">if</span> (attr->type_code != COMMUNITY) <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keyword">const</span> <a class="code" href="classlibbgp_1_1BgpPathAttribCommunity.html">BgpPathAttribCommunity</a> &community = <span class="keyword">dynamic_cast<</span><span class="keyword">const </span><a class="code" href="classlibbgp_1_1BgpPathAttribCommunity.html">BgpPathAttribCommunity</a> &<span class="keyword">></span>(*attr);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">for</span> (uint32_t community_val : community.<a class="code" href="classlibbgp_1_1BgpPathAttribCommunity.html#a617b01836f153e7be395f80bd7a3ae5e">communites</a>) {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span> (match_type == <a class="code" href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84ba45a1eff2e234dea053541eb0308d8686">M_HAS_COMMUNITY</a> && community_val == this->community) <span class="keywordflow">return</span> op;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  }</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">if</span> (match_type == <a class="code" href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84ba5c09a7b52360b1ef9c9d9020b2fe215f">M_NOT_HAS_COMMUNITY</a>) <span class="keywordflow">return</span> op;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">return</span> <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293a79774da657eb06abce97987173efec06">NOP</a>;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRules.html#a76b3cd13f762b0d936e0bd65fcf61b6d"> 131</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRules.html#a76b3cd13f762b0d936e0bd65fcf61b6d">BgpFilterRules::BgpFilterRules</a>() {</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  default_op = <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293aa6ab08553612c9644c30f59750d17008">ACCEPT</a>;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRules.html#a0b2a504a9610db05ee7525ea1eb63f93"> 140</a></span> <a class="code" href="classlibbgp_1_1BgpFilterRules.html#a76b3cd13f762b0d936e0bd65fcf61b6d">BgpFilterRules::BgpFilterRules</a>(<a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> default_op) {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  this->default_op = default_op;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="classlibbgp_1_1BgpFilterRules.html#ac327fdbbab5bc6c691f26d585b0b4588"> 151</a></span> <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> <a class="code" href="classlibbgp_1_1BgpFilterRules.html#ac327fdbbab5bc6c691f26d585b0b4588">BgpFilterRules::apply</a>(<span class="keyword">const</span> <a class="code" href="classlibbgp_1_1Prefix.html">Prefix</a> &prefix, <span class="keyword">const</span> std::vector<std::shared_ptr<BgpPathAttrib>> &attribs) {</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordflow">if</span> (rules.size() == 0) <span class="keywordflow">return</span> default_op;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  </div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keyword">auto</span> rule = rules.end();</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">do</span> {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  rule--;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">BgpFilterOP</a> this_op = (*rule)->apply(prefix, attribs);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">if</span> (this_op != <a class="code" href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293a79774da657eb06abce97987173efec06">NOP</a>) <span class="keywordflow">return</span> this_op;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  } <span class="keywordflow">while</span> (rule != rules.begin());</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> </div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordflow">return</span> default_op;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> }</div><div class="ttc" id="bgp-filter_8h_html_a6af1e0ba40fe9a19560545629e8de84ba5c09a7b52360b1ef9c9d9020b2fe215f"><div class="ttname"><a href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84ba5c09a7b52360b1ef9c9d9020b2fe215f">libbgp::M_NOT_HAS_COMMUNITY</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00062">bgp-filter.h:62</a></div></div>
<div class="ttc" id="classlibbgp_1_1Prefix6_html"><div class="ttname"><a href="classlibbgp_1_1Prefix6.html">libbgp::Prefix6</a></div><div class="ttdoc">IPv6 Route/Prefix related utilities. </div><div class="ttdef"><b>Definition:</b> <a href="prefix6_8h_source.html#l00027">prefix6.h:27</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a22494fc9dc037cd8c6b7b40377ded35fad45494682f19fceef914dc40913e6c43"><div class="ttname"><a href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fad45494682f19fceef914dc40913e6c43">libbgp::M_NOT_HAS_ASN</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00051">bgp-filter.h:51</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a6af1e0ba40fe9a19560545629e8de84ba45a1eff2e234dea053541eb0308d8686"><div class="ttname"><a href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84ba45a1eff2e234dea053541eb0308d8686">libbgp::M_HAS_COMMUNITY</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00061">bgp-filter.h:61</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpAsPathSegment_html_acb171d66f3da4436349cce335b836778"><div class="ttname"><a href="classlibbgp_1_1BgpAsPathSegment.html#acb171d66f3da4436349cce335b836778">libbgp::BgpAsPathSegment::value</a></div><div class="ttdeci">std::vector< uint32_t > value</div><div class="ttdoc">The segment value. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00222">bgp-path-attrib.h:222</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a22494fc9dc037cd8c6b7b40377ded35fa58706a88aad2b5b89f9e1dac9a7ac41f"><div class="ttname"><a href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fa58706a88aad2b5b89f9e1dac9a7ac41f">libbgp::M_FROM_ASN</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00052">bgp-filter.h:52</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a09b283ade47782bc0c08687105402293"><div class="ttname"><a href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293">libbgp::BgpFilterOP</a></div><div class="ttdeci">BgpFilterOP</div><div class="ttdoc">The filter operation. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00069">bgp-filter.h:69</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a8e60861335e07d6ae40515b00d45cea4"><div class="ttname"><a href="bgp-filter_8h.html#a8e60861335e07d6ae40515b00d45cea4">libbgp::BgpFilterRuleRouteMatchType</a></div><div class="ttdeci">BgpFilterRuleRouteMatchType</div><div class="ttdoc">Matching type of IP prefix rule. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00036">bgp-filter.h:36</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpPathAttribCommunity_html_a617b01836f153e7be395f80bd7a3ae5e"><div class="ttname"><a href="classlibbgp_1_1BgpPathAttribCommunity.html#a617b01836f153e7be395f80bd7a3ae5e">libbgp::BgpPathAttribCommunity::communites</a></div><div class="ttdeci">std::vector< uint32_t > communites</div><div class="ttdoc">Raw community attribute in network byte order. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00436">bgp-path-attrib.h:436</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRules_html_ac327fdbbab5bc6c691f26d585b0b4588"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRules.html#ac327fdbbab5bc6c691f26d585b0b4588">libbgp::BgpFilterRules::apply</a></div><div class="ttdeci">BgpFilterOP apply(const Prefix &prefix, const std::vector< std::shared_ptr< BgpPathAttrib >> &attribs)</div><div class="ttdoc">Apply the rules set on a route. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00151">bgp-filter.cc:151</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRules_html_a76b3cd13f762b0d936e0bd65fcf61b6d"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRules.html#a76b3cd13f762b0d936e0bd65fcf61b6d">libbgp::BgpFilterRules::BgpFilterRules</a></div><div class="ttdeci">BgpFilterRules()</div><div class="ttdoc">Construct a new BgpFilterRules rules set. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00131">bgp-filter.cc:131</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a6af1e0ba40fe9a19560545629e8de84b"><div class="ttname"><a href="bgp-filter_8h.html#a6af1e0ba40fe9a19560545629e8de84b">libbgp::BgpFilterRuleCommunityMatchType</a></div><div class="ttdeci">BgpFilterRuleCommunityMatchType</div><div class="ttdoc">Matching type of COMMUNITY rule. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00060">bgp-filter.h:60</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpPathAttribAsPath_html"><div class="ttname"><a href="classlibbgp_1_1BgpPathAttribAsPath.html">libbgp::BgpPathAttribAsPath</a></div><div class="ttdoc">AS Path attribute. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00229">bgp-path-attrib.h:229</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpPathAttribAsPath_html_a9ad756364bcf221fc86e1784c3258edb"><div class="ttname"><a href="classlibbgp_1_1BgpPathAttribAsPath.html#a9ad756364bcf221fc86e1784c3258edb">libbgp::BgpPathAttribAsPath::as_paths</a></div><div class="ttdeci">std::vector< BgpAsPathSegment > as_paths</div><div class="ttdoc">The AS Path segments. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00240">bgp-path-attrib.h:240</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRuleRoute6_html_a2914ea56c24b939238bd6f2a7971758b"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRuleRoute6.html#a2914ea56c24b939238bd6f2a7971758b">libbgp::BgpFilterRuleRoute6::BgpFilterRuleRoute6</a></div><div class="ttdeci">BgpFilterRuleRoute6(BgpFilterOP op, BgpFilterRuleRouteMatchType type, const Prefix6 &prefix)</div><div class="ttdoc">Construct a new IPv6 route filtering object. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00039">bgp-filter.cc:39</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpAsPathSegment_html_a47a7d8a13b454352b0296165982be784"><div class="ttname"><a href="classlibbgp_1_1BgpAsPathSegment.html#a47a7d8a13b454352b0296165982be784">libbgp::BgpAsPathSegment::type</a></div><div class="ttdeci">uint8_t type</div><div class="ttdoc">Segment type. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00214">bgp-path-attrib.h:214</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRuleCommunity_html_ada70e5e64473e5093b5aa5f7db4462a4"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRuleCommunity.html#ada70e5e64473e5093b5aa5f7db4462a4">libbgp::BgpFilterRuleCommunity::BgpFilterRuleCommunity</a></div><div class="ttdeci">BgpFilterRuleCommunity(BgpFilterOP op, BgpFilterRuleCommunityMatchType type, uint16_t asn, uint16_t keyword)</div><div class="ttdoc">Construct a new COMMUNITY filtering object. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00089">bgp-filter.cc:89</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRuleRoute4_html_a5bd5981d2c3f745b20a627c6283e5235"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRuleRoute4.html#a5bd5981d2c3f745b20a627c6283e5235">libbgp::BgpFilterRuleRoute4::BgpFilterRuleRoute4</a></div><div class="ttdeci">BgpFilterRuleRoute4(BgpFilterOP op, BgpFilterRuleRouteMatchType type, const Prefix4 &prefix)</div><div class="ttdoc">Construct a new IPv4 route filtering object. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00026">bgp-filter.cc:26</a></div></div>
<div class="ttc" id="classlibbgp_1_1Prefix4_html"><div class="ttname"><a href="classlibbgp_1_1Prefix4.html">libbgp::Prefix4</a></div><div class="ttdoc">IPv4 Route/Prefix related utilities. </div><div class="ttdef"><b>Definition:</b> <a href="prefix4_8h_source.html#l00025">prefix4.h:25</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a22494fc9dc037cd8c6b7b40377ded35fa91d04966032d4ff43db604a9b4b6eef7"><div class="ttname"><a href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fa91d04966032d4ff43db604a9b4b6eef7">libbgp::M_HAS_ASN</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00050">bgp-filter.h:50</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a09b283ade47782bc0c08687105402293aa6ab08553612c9644c30f59750d17008"><div class="ttname"><a href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293aa6ab08553612c9644c30f59750d17008">libbgp::ACCEPT</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00071">bgp-filter.h:71</a></div></div>
<div class="ttc" id="value-op_8h_html"><div class="ttname"><a href="value-op_8h.html">value-op.h</a></div><div class="ttdoc">Buffer operation helpers. </div></div>
<div class="ttc" id="bgp-filter_8h_html"><div class="ttname"><a href="bgp-filter_8h.html">bgp-filter.h</a></div><div class="ttdoc">Route filtering engine. </div></div>
<div class="ttc" id="namespacelibbgp_html"><div class="ttname"><a href="namespacelibbgp.html">libbgp</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-afi_8h_source.html#l00014">bgp-afi.h:14</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a09b283ade47782bc0c08687105402293a79774da657eb06abce97987173efec06"><div class="ttname"><a href="bgp-filter_8h.html#a09b283ade47782bc0c08687105402293a79774da657eb06abce97987173efec06">libbgp::NOP</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00070">bgp-filter.h:70</a></div></div>
<div class="ttc" id="classlibbgp_1_1Prefix_html"><div class="ttname"><a href="classlibbgp_1_1Prefix.html">libbgp::Prefix</a></div><div class="ttdoc">Route/Prefix related utilities. </div><div class="ttdef"><b>Definition:</b> <a href="prefix_8h_source.html#l00025">prefix.h:25</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpAsPathSegment_html"><div class="ttname"><a href="classlibbgp_1_1BgpAsPathSegment.html">libbgp::BgpAsPathSegment</a></div><div class="ttdoc">An AS_PATH or AS4_PATH segment. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00200">bgp-path-attrib.h:200</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a22494fc9dc037cd8c6b7b40377ded35f"><div class="ttname"><a href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35f">libbgp::BgpFilterRuleAsPathMatchType</a></div><div class="ttdeci">BgpFilterRuleAsPathMatchType</div><div class="ttdoc">Matching type of AS_PATH rule. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00049">bgp-filter.h:49</a></div></div>
<div class="ttc" id="bgp-filter_8h_html_a22494fc9dc037cd8c6b7b40377ded35fabb2f4ed0267cedd5f1cad20ab323bf81"><div class="ttname"><a href="bgp-filter_8h.html#a22494fc9dc037cd8c6b7b40377ded35fabb2f4ed0267cedd5f1cad20ab323bf81">libbgp::M_NOT_FROM_ASN</a></div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8h_source.html#l00053">bgp-filter.h:53</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRuleCommunity_html_afec89febd53af55d0c5377bb8f5031f3"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRuleCommunity.html#afec89febd53af55d0c5377bb8f5031f3">libbgp::BgpFilterRuleCommunity::apply</a></div><div class="ttdeci">BgpFilterOP apply(const Prefix &prefix, const std::vector< std::shared_ptr< BgpPathAttrib >> &attribs)</div><div class="ttdoc">Apply the rule on a route. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00110">bgp-filter.cc:110</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRuleAsPath_html_a6df571b7a2cf78e7ef1c6a1edd713f37"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRuleAsPath.html#a6df571b7a2cf78e7ef1c6a1edd713f37">libbgp::BgpFilterRuleAsPath::apply</a></div><div class="ttdeci">BgpFilterOP apply(const Prefix &prefix, const std::vector< std::shared_ptr< BgpPathAttrib >> &attribs)</div><div class="ttdoc">Apply the rule on a route. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00058">bgp-filter.cc:58</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpPathAttribCommunity_html"><div class="ttname"><a href="classlibbgp_1_1BgpPathAttribCommunity.html">libbgp::BgpPathAttribCommunity</a></div><div class="ttdoc">BGP community attribute. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-path-attrib_8h_source.html#l00428">bgp-path-attrib.h:428</a></div></div>
<div class="ttc" id="classlibbgp_1_1BgpFilterRuleAsPath_html_aa3d51e83fa2faa2e4b0e32ed38557bab"><div class="ttname"><a href="classlibbgp_1_1BgpFilterRuleAsPath.html#aa3d51e83fa2faa2e4b0e32ed38557bab">libbgp::BgpFilterRuleAsPath::BgpFilterRuleAsPath</a></div><div class="ttdeci">BgpFilterRuleAsPath(BgpFilterOP op, BgpFilterRuleAsPathMatchType type, uint32_t asn)</div><div class="ttdoc">Construct a new AS_PATH filtering object. </div><div class="ttdef"><b>Definition:</b> <a href="bgp-filter_8cc_source.html#l00052">bgp-filter.cc:52</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>