OpenSDN source code
vrf_assign_ksync.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef vnsw_agent_vrf_assign_ksync_h
7 #define vnsw_agent_vrf_assign_ksync_h
8 
9 #include <boost/asio.hpp>
10 #include <boost/bind/bind.hpp>
11 
12 #include <db/db_entry.h>
13 #include <db/db_table.h>
14 #include <db/db_table_partition.h>
15 #include "vr_interface.h"
16 #include <ksync/ksync_entry.h>
17 #include <ksync/ksync_object.h>
18 #include <ksync/ksync_netlink.h>
19 #include "oper/vrf_assign.h"
20 
21 using namespace boost::placeholders;
22 
24 
26 public:
28  const VrfAssignKSyncEntry *entry, uint32_t index);
30  virtual ~VrfAssignKSyncEntry();
31 
32  uint16_t vlan_tag() const {return vlan_tag_;};
33  InterfaceKSyncEntry *interface() const;
34  NHKSyncEntry *nh() const;
35  KSyncDBObject *GetObject() const;
36 
37  virtual bool IsLess(const KSyncEntry &rhs) const;
38  virtual std::string ToString() const;
39  virtual KSyncEntry *UnresolvedReference();
40  virtual bool Sync(DBEntry *e);
41  virtual int AddMsg(char *buf, int buf_len);
42  virtual int ChangeMsg(char *buf, int buf_len);
43  virtual int DeleteMsg(char *buf, int buf_len);
44 private:
45  int Encode(sandesh_op::type op, char *buf, int buf_len);
48  uint16_t vlan_tag_;
49  uint32_t vrf_id_;
52 };
53 
55 public:
57  virtual ~VrfAssignKSyncObject();
58 
59  KSync *ksync() const { return ksync_; }
60 
61  void RegisterDBClients();
62  virtual KSyncEntry *Alloc(const KSyncEntry *entry, uint32_t index);
63  virtual KSyncEntry *DBToKSyncEntry(const DBEntry *e);
64 private:
67 };
68 
69 #endif // vnsw_agent_vrf_assign_ksync_h
static bool IsLess(const ShowRoute &lhs, const ShowRoute &rhs, const BgpSandeshContext *bsc, const string &table_name)
boost::intrusive_ptr< KSyncEntry > KSyncEntryPtr
Definition: ksync_entry.h:69
VrfAssignKSyncObject * ksync_obj_
KSyncEntryPtr interface_
DISALLOW_COPY_AND_ASSIGN(VrfAssignKSyncEntry)
uint16_t vlan_tag() const
DISALLOW_COPY_AND_ASSIGN(VrfAssignKSyncObject)
KSync * ksync() const
uint8_t type
Definition: load_balance.h:2
static string ToString(PhysicalDevice::ManagementProtocol proto)