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