/
multicast_mac_local_ovsdb.h
63 lines (50 loc) · 1.92 KB
/
multicast_mac_local_ovsdb.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
#ifndef SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_MULTICAST_MAC_LOCAL_OVSDB_H_
#define SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_MULTICAST_MAC_LOCAL_OVSDB_H_
#include <ovsdb_entry.h>
#include <ovsdb_object.h>
class OvsPeer;
namespace OVSDB {
class VnOvsdbEntry;
class MulticastMacLocalOvsdb : public OvsdbObject {
public:
MulticastMacLocalOvsdb(OvsdbClientIdl *idl, OvsPeer *peer);
~MulticastMacLocalOvsdb();
OvsPeer *peer();
void Notify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row);
KSyncEntry *Alloc(const KSyncEntry *key, uint32_t index);
private:
OvsPeer *peer_;
DISALLOW_COPY_AND_ASSIGN(MulticastMacLocalOvsdb);
};
class MulticastMacLocalEntry : public OvsdbEntry {
public:
MulticastMacLocalEntry(MulticastMacLocalOvsdb *table,
const MulticastMacLocalEntry *key);
MulticastMacLocalEntry(MulticastMacLocalOvsdb *table,
const LogicalSwitchEntry *logical_switch);
bool Add();
bool Change();
bool Delete();
bool IsLess(const KSyncEntry&) const;
KSyncEntry* UnresolvedReference();
std::string ToString() const {return "Multicast Mac Local";}
const std::string &mac() const;
const std::string &logical_switch_name() const;
const LogicalSwitchEntry *logical_switch() {return logical_switch_;}
const uint32_t vxlan_id() const {return vxlan_id_;}
OVSDB::VnOvsdbEntry *GetVnEntry() const;
private:
friend class MulticastMacLocalOvsdb;
std::string logical_switch_name_;
// take reference to the vrf while exporting route, to assure sanity
// of vrf pointer even if Add route request fails, due to any reason
VrfEntryRef vrf_;
uint32_t vxlan_id_;
const LogicalSwitchEntry *logical_switch_;
DISALLOW_COPY_AND_ASSIGN(MulticastMacLocalEntry);
};
};
#endif //SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_MULTICAST_MAC_LOCAL_OVSDB_H_