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  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #ifndef vnsw_agent_bridge_route_audit_ksync_h
7 #define vnsw_agent_bridge_route_audit_ksync_h
8 
9 #include <string>
10 #include <net/mac_address.h>
11 #include <boost/asio.hpp>
12 #include <boost/bind/bind.hpp>
13 
14 #include <ksync/ksync_entry.h>
15 #include <ksync/ksync_object.h>
16 #include <ksync/ksync_netlink.h>
17 #include <vrouter/ksync/agent_ksync_types.h>
19 
20 using namespace boost::placeholders;
21 
23 class KSync;
24 
26 public:
28  uint32_t vrf_id, const MacAddress &mac);
30  const BridgeRouteAuditKSyncEntry *entry);
31  virtual ~BridgeRouteAuditKSyncEntry();
32 
33  int EncodeDelete(char *buf, int buf_len);
34  KSyncObject *GetObject() const;
35  virtual bool Sync();
36  virtual KSyncEntry *UnresolvedReference();
37  void FillObjectLog(sandesh_op::type type, KSyncRouteInfo &info) const;
38 
39  std::string ToString() const;
40  bool IsLess(const KSyncEntry &rhs) const;
41  int AddMsg(char *buf, int buf_len);
42  int ChangeMsg(char *buf, int buf_len);
43  int DeleteMsg(char *buf, int buf_len);
44 
45 private:
47  uint32_t vrf_id_;
50 };
51 
53 public:
55  virtual ~BridgeRouteAuditKSyncObject();
56 
57  KSyncEntry *Alloc(const KSyncEntry *key, uint32_t index);
58  KSync *ksync() const { return ksync_; }
59 
60 private:
63 };
64 
65 #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)