forked from sonic-net/sonic-swss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vrfmgr.h
39 lines (30 loc) · 926 Bytes
/
vrfmgr.h
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
#ifndef __VRFMGR__
#define __VRFMGR__
#include <string>
#include <map>
#include <set>
#include "dbconnector.h"
#include "producerstatetable.h"
#include "orch.h"
using namespace std;
namespace swss {
class VrfMgr : public Orch
{
public:
VrfMgr(DBConnector *cfgDb, DBConnector *appDb, DBConnector *stateDb, const std::vector<std::string> &tableNames);
using Orch::doTask;
private:
bool delLink(const std::string& vrfName);
bool setLink(const std::string& vrfName);
bool isVrfObjExist(const std::string& vrfName);
void recycleTable(uint32_t table);
uint32_t getFreeTable(void);
void handleVnetConfigSet(KeyOpFieldsValuesTuple &t);
void doTask(Consumer &consumer);
std::map<std::string, uint32_t> m_vrfTableMap;
std::set<uint32_t> m_freeTables;
Table m_stateVrfTable, m_stateVrfObjectTable;
ProducerStateTable m_appVrfTableProducer, m_appVnetTableProducer;
};
}
#endif