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  */
4 
5 #ifndef vnsw_agent_vrf_assign_ksync_h
6 #define vnsw_agent_vrf_assign_ksync_h
7 
8 #include <boost/asio.hpp>
9 #include <boost/bind/bind.hpp>
10 
11 #include <db/db_entry.h>
12 #include <db/db_table.h>
13 #include <db/db_table_partition.h>
14 #include "vr_interface.h"
15 #include <ksync/ksync_entry.h>
16 #include <ksync/ksync_object.h>
17 #include <ksync/ksync_netlink.h>
18 #include "oper/vrf_assign.h"
19 
20 using namespace boost::placeholders;
21 
23 
25 public:
27  const VrfAssignKSyncEntry *entry, uint32_t index);
29  virtual ~VrfAssignKSyncEntry();
30 
31  uint16_t vlan_tag() const {return vlan_tag_;};
32  InterfaceKSyncEntry *interface() const;
33  NHKSyncEntry *nh() const;
34  KSyncDBObject *GetObject() const;
35 
36  virtual bool IsLess(const KSyncEntry &rhs) const;
37  virtual std::string ToString() const;
38  virtual KSyncEntry *UnresolvedReference();
39  virtual bool Sync(DBEntry *e);
40  virtual int AddMsg(char *buf, int buf_len);
41  virtual int ChangeMsg(char *buf, int buf_len);
42  virtual int DeleteMsg(char *buf, int buf_len);
43 private:
44  int Encode(sandesh_op::type op, char *buf, int buf_len);
47  uint16_t vlan_tag_;
48  uint32_t vrf_id_;
51 };
52 
54 public:
56  virtual ~VrfAssignKSyncObject();
57 
58  KSync *ksync() const { return ksync_; }
59 
60  void RegisterDBClients();
61  virtual KSyncEntry *Alloc(const KSyncEntry *entry, uint32_t index);
62  virtual KSyncEntry *DBToKSyncEntry(const DBEntry *e);
63 private:
66 };
67 
68 #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:68
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)