OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ksync_vxlan.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef vnsw_agent_ksync_vxlan_h
6 #define vnsw_agent_ksync_vxlan_h
7 
8 class Agent;
9 
16 class KSyncVxlanRouteTable;
17 
18 /**************************************************************************
19  * KSync VxLan defines datamodel for port of agent to platforms supporting
20  * Linux Kernel like VxLan Bridges. Note, the code in this directory does not
21  * program the datapath and only creates tables according to the datamodel
22  * in Vxlan Linux Kernel.
23  *
24  * KSyncVxlan is the top level object. It drives creation of following
25  * objects,
26  *
27  * - KSyncVxlanBridgeObject : KSync Object for VxLan Bridges
28  * - KSyncVxlanPortObject : KSync Object for ports in VxLan Bridges
29  * - KSyncVxlanVrfObject : KSync Object for every VRF in agent oper-db. VRF
30  * entries in turn will contain FDB tables that must be programmed to
31  * Vxlan Bridges
32  *
33  * The classes defined in this directoy must be inherited according to the
34  * platform. Programming of dataplane should be done in the inherited class
35  **************************************************************************/
36 class KSyncVxlan {
37 public:
39  virtual ~KSyncVxlan();
40 
41  void RegisterDBClients(DB *db);
42  void Init();
43  void Shutdown();
44 
48  Agent *agent() const { return agent_; }
49  static KSyncEntry *defer_entry();
50  static void set_defer_entry(KSyncEntry *entry);
51 protected:
55 
56 private:
58  std::unique_ptr<KSyncVxlanBridgeObject> bridge_obj_;
59  std::unique_ptr<KSyncVxlanPortObject> port_obj_;
60  std::unique_ptr<KSyncVxlanVrfObject> vrf_obj_;
63 };
64 
65 #endif // vnsw_agent_ksync_vxlan_h
static KSyncEntry * defer_entry()
Definition: ksync_vxlan.cc:64
KSyncVxlanVrfObject * vrf_obj() const
Definition: ksync_vxlan.cc:56
std::unique_ptr< KSyncVxlanBridgeObject > bridge_obj_
Definition: ksync_vxlan.h:58
KSyncVxlan(Agent *agent)
Definition: ksync_vxlan.cc:33
Agent * agent_
Definition: ksync_vxlan.h:57
Definition: db.h:24
void set_port_obj(KSyncVxlanPortObject *obj)
Definition: ksync_vxlan.cc:52
Definition: agent.h:358
virtual ~KSyncVxlan()
Definition: ksync_vxlan.cc:37
std::unique_ptr< KSyncVxlanVrfObject > vrf_obj_
Definition: ksync_vxlan.h:60
Agent * agent() const
Definition: ksync_vxlan.h:48
void Shutdown()
Definition: ksync_vxlan.cc:85
std::unique_ptr< KSyncVxlanPortObject > port_obj_
Definition: ksync_vxlan.h:59
void set_vrf_obj(KSyncVxlanVrfObject *obj)
Definition: ksync_vxlan.cc:60
KSyncVxlanBridgeObject * bridge_obj() const
Definition: ksync_vxlan.cc:40
void set_bridge_obj(KSyncVxlanBridgeObject *obj)
Definition: ksync_vxlan.cc:44
static void set_defer_entry(KSyncEntry *entry)
Definition: ksync_vxlan.cc:68
DISALLOW_COPY_AND_ASSIGN(KSyncVxlan)
KSyncVxlanPortObject * port_obj() const
Definition: ksync_vxlan.cc:48
void Init()
Definition: ksync_vxlan.cc:79
static KSyncEntry * defer_entry_
Definition: ksync_vxlan.h:61
void RegisterDBClients(DB *db)
Definition: ksync_vxlan.cc:72