OpenSDN source code
bridge_route_audit_ksync.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef vnsw_agent_bridge_route_audit_ksync_h
6 #define vnsw_agent_bridge_route_audit_ksync_h
7 
8 #include <string>
9 #include <net/mac_address.h>
10 #include <boost/asio.hpp>
11 #include <boost/bind/bind.hpp>
12 
13 #include <ksync/ksync_entry.h>
14 #include <ksync/ksync_object.h>
15 #include <ksync/ksync_netlink.h>
16 #include <vrouter/ksync/agent_ksync_types.h>
18 
19 using namespace boost::placeholders;
20 
22 class KSync;
23 
25 public:
27  uint32_t vrf_id, const MacAddress &mac);
29  const BridgeRouteAuditKSyncEntry *entry);
30  virtual ~BridgeRouteAuditKSyncEntry();
31 
32  int EncodeDelete(char *buf, int buf_len);
33  KSyncObject *GetObject() const;
34  virtual bool Sync();
35  virtual KSyncEntry *UnresolvedReference();
36  void FillObjectLog(sandesh_op::type type, KSyncRouteInfo &info) const;
37 
38  std::string ToString() const;
39  bool IsLess(const KSyncEntry &rhs) const;
40  int AddMsg(char *buf, int buf_len);
41  int ChangeMsg(char *buf, int buf_len);
42  int DeleteMsg(char *buf, int buf_len);
43 
44 private:
46  uint32_t vrf_id_;
49 };
50 
52 public:
54  virtual ~BridgeRouteAuditKSyncObject();
55 
56  KSyncEntry *Alloc(const KSyncEntry *key, uint32_t index);
57  KSync *ksync() const { return ksync_; }
58 
59 private:
62 };
63 
64 #endif // vnsw_agent_bridge_route_audit_ksync_h
static bool IsLess(const ShowRoute &lhs, const ShowRoute &rhs, const BgpSandeshContext *bsc, const string &table_name)
BridgeRouteAuditKSyncObject * ksync_obj_
DISALLOW_COPY_AND_ASSIGN(BridgeRouteAuditKSyncEntry)
DISALLOW_COPY_AND_ASSIGN(BridgeRouteAuditKSyncObject)
uint8_t type
Definition: load_balance.h:2
static string ToString(PhysicalDevice::ManagementProtocol proto)