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