OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
multicast_mac_local_ovsdb.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_MULTICAST_MAC_LOCAL_OVSDB_H_
6 #define SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_MULTICAST_MAC_LOCAL_OVSDB_H_
7 
8 #include <ovsdb_entry.h>
9 #include <ovsdb_object.h>
10 class OvsPeer;
11 
12 namespace OVSDB {
13 class VnOvsdbEntry;
14 
15 class LogicalSwitchEntry;
16 class MulticastMacLocalEntry;
18 public:
19  typedef std::pair<VrfEntry *, MulticastMacLocalEntry *> VrfDepEntry;
20  typedef std::set<VrfDepEntry> VrfDepList;
21  typedef std::map<struct ovsdb_idl_row *, MulticastMacLocalEntry *> OvsdbIdlDepList;
22 
25 
26  OvsPeer *peer();
27  void Notify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row);
28  void LocatorSetNotify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row);
29  KSyncEntry *Alloc(const KSyncEntry *key, uint32_t index);
30 
31  void VrfReEvalEnqueue(VrfEntry *vrf);
32  bool VrfReEval(VrfEntryRef vrf);
33 private:
34  friend class MulticastMacLocalEntry;
40 };
41 
43 public:
44  typedef std::set<struct ovsdb_idl_row *> OvsdbIdlRowList;
45  typedef std::set<Ip4Address> TorIpList;
47  const MulticastMacLocalEntry *key);
49  const std::string &logical_switch_name);
51  const std::string &logical_switch_name,
52  struct ovsdb_idl_row *row);
53 
54  bool Add();
55  bool Change();
56  bool Delete();
57  bool IsLess(const KSyncEntry&) const;
59  std::string ToString() const {return "Multicast Mac Local";}
60 
61  const std::string &mac() const;
62  const TorIpList &tor_ip_list() const;
63  const std::string &logical_switch_name() const;
64  const uint32_t vxlan_id() const {return vxlan_id_;}
66 
67 private:
68  void OnVrfDelete();
70 
71  friend class MulticastMacLocalOvsdb;
72  std::string logical_switch_name_;
73  // take reference to the vrf while exporting route, to assure sanity
74  // of vrf pointer even if Add route request fails, due to any reason
76  uint32_t vxlan_id_;
80 };
81 
82 };
83 
84 #endif //SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_MULTICAST_MAC_LOCAL_OVSDB_H_
85 
Definition: vrf.h:86
const TorIpList & tor_ip_list() const
MulticastMacLocalEntry(MulticastMacLocalOvsdb *table, const MulticastMacLocalEntry *key)
const std::string & logical_switch_name() const
bool IsLess(const KSyncEntry &) const
void Notify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row)
WorkQueue< VrfEntryRef > * vrf_reeval_queue_
OVSDB::VnOvsdbEntry * GetVnEntry() const
DISALLOW_COPY_AND_ASSIGN(MulticastMacLocalOvsdb)
std::pair< VrfEntry *, MulticastMacLocalEntry * > VrfDepEntry
std::set< struct ovsdb_idl_row * > OvsdbIdlRowList
std::map< struct ovsdb_idl_row *, MulticastMacLocalEntry * > OvsdbIdlDepList
const std::string & mac() const
KSyncEntry * Alloc(const KSyncEntry *key, uint32_t index)
DISALLOW_COPY_AND_ASSIGN(MulticastMacLocalEntry)
MulticastMacLocalOvsdb(OvsdbClientIdl *idl, OvsPeer *peer)
void LocatorSetNotify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row)