OpenSDN source code
bgp_export.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef SRC_BGP_BGP_EXPORT_H_
7 #define SRC_BGP_BGP_EXPORT_H_
8 
9 #include <memory>
10 
11 class BgpTable;
12 class DBEntryBase;
13 class DBTablePartBase;
14 class RibOut;
15 class RibPeerSet;
16 
17 class BgpExport {
18 public:
19  explicit BgpExport(RibOut *ribout);
20 
21  void Export(DBTablePartBase *root, DBEntryBase *db_entry);
22 
23  // Create new route advertisements in order to sync a peers that has
24  // just joined the table.
25  bool Join(DBTablePartBase *root, const RibPeerSet &mjoin,
26  DBEntryBase *db_entry);
27 
28  // Process a route refresh: re-advertise routes to the given set of peers.
29  bool Refresh(DBTablePartBase *root, const RibPeerSet &mgroup,
30  DBEntryBase *db_entry);
31 
32  // Cleanup the advertisement bits on update entries.
33  bool Leave(DBTablePartBase *root, const RibPeerSet &mleave,
34  DBEntryBase *db_entry);
35 
36 private:
38 };
39 
40 #endif // SRC_BGP_BGP_EXPORT_H_
bool Refresh(DBTablePartBase *root, const RibPeerSet &mgroup, DBEntryBase *db_entry)
BgpExport(RibOut *ribout)
Definition: bgp_export.cc:19
bool Join(DBTablePartBase *root, const RibPeerSet &mjoin, DBEntryBase *db_entry)
Definition: bgp_export.cc:181
void Export(DBTablePartBase *root, DBEntryBase *db_entry)
Definition: bgp_export.cc:46
RibOut * ribout_
Definition: bgp_export.h:37
bool Leave(DBTablePartBase *root, const RibPeerSet &mleave, DBEntryBase *db_entry)
Definition: bgp_export.cc:237