OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
unicast_mac_local_ovsdb.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_ROUTE_H_
6 #define SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_ROUTE_H_
7 
8 #include <ovsdb_entry.h>
9 #include <ovsdb_object.h>
10 class OvsPeer;
11 
12 namespace OVSDB {
13 class UnicastMacLocalEntry;
15 public:
16  typedef std::pair<VrfEntry *, UnicastMacLocalEntry *> VrfDepEntry;
17  typedef std::set<VrfDepEntry> VrfDepList;
18 
21 
22  OvsPeer *peer();
23  void Notify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row);
24  KSyncEntry *Alloc(const KSyncEntry *key, uint32_t index);
25 
26  void VrfReEvalEnqueue(VrfEntry *vrf);
27  bool VrfReEval(VrfEntryRef vrf);
28 
29  bool IsVrfReEvalQueueActive() const;
30 
31 private:
32  friend class UnicastMacLocalEntry;
33 
34  // delete table triggered callback
35  void DeleteTableDone(void);
36 
41 };
42 
44 public:
46  const std::string &logical_switch, const std::string &mac);
48  const UnicastMacLocalEntry *key);
50  struct ovsdb_idl_row *row);
52 
53  bool Add();
54  bool Delete();
55  bool IsLess(const KSyncEntry&) const;
57  std::string ToString() const {return "Unicast Mac Local";}
58 
59  const std::string &mac() const;
60  const std::string &logical_switch_name() const;
61  const std::string &dest_ip() const;
62 
63 private:
64  friend class UnicastMacLocalOvsdb;
65  std::string mac_;
66  std::string logical_switch_name_;
67  std::string dest_ip_;
68  // take reference to the vrf while exporting route, to assure sanity
69  // of vrf pointer even if Add route request fails, due to any reason
71  uint32_t vxlan_id_;
73 };
74 
75 };
76 
77 #endif //SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_ROUTE_H_
78 
Definition: vrf.h:86
const std::string & dest_ip() const
UnicastMacLocalOvsdb(OvsdbClientIdl *idl, OvsPeer *peer)
std::pair< VrfEntry *, UnicastMacLocalEntry * > VrfDepEntry
bool IsLess(const KSyncEntry &) const
const std::string & mac() const
DISALLOW_COPY_AND_ASSIGN(UnicastMacLocalOvsdb)
DISALLOW_COPY_AND_ASSIGN(UnicastMacLocalEntry)
UnicastMacLocalEntry(UnicastMacLocalOvsdb *table, const std::string &logical_switch, const std::string &mac)
void Notify(OvsdbClientIdl::Op op, struct ovsdb_idl_row *row)
WorkQueue< VrfEntryRef > * vrf_reeval_queue_
const std::string & logical_switch_name() const
std::set< VrfDepEntry > VrfDepList
KSyncEntry * Alloc(const KSyncEntry *key, uint32_t index)