forked from sonic-net/sonic-swss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtunnelmgr.h
48 lines (35 loc) · 1.03 KB
/
tunnelmgr.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
40
41
42
43
44
45
46
47
48
#pragma once
#include "dbconnector.h"
#include "producerstatetable.h"
#include "orch.h"
#include <set>
namespace swss {
struct TunnelInfo
{
std::string type;
std::string dst_ip;
std::string remote_ip;
};
class TunnelMgr : public Orch
{
public:
TunnelMgr(DBConnector *cfgDb, DBConnector *appDb, const std::vector<std::string> &tableNames);
using Orch::doTask;
private:
void doTask(Consumer &consumer);
bool doTunnelTask(const KeyOpFieldsValuesTuple & t);
bool doTunnelRouteTask(const KeyOpFieldsValuesTuple & t);
bool doLpbkIntfTask(const KeyOpFieldsValuesTuple & t);
bool configIpTunnel(const TunnelInfo& info);
void finalizeWarmReboot();
ProducerStateTable m_appIpInIpTunnelTable;
ProducerStateTable m_appIpInIpTunnelDecapTermTable;
Table m_cfgPeerTable;
Table m_cfgTunnelTable;
std::map<std::string, TunnelInfo > m_tunnelCache;
std::map<std::string, IpPrefix> m_intfCache;
std::string m_peerIp;
std::set<std::string> m_tunnelReplay;
bool replayDone = false;
};
}