5 #include <boost/asio.hpp>
6 #include <boost/bind/bind.hpp>
29 using namespace boost::placeholders;
41 label_(vxlan_id->vxlan_id()), nh_(NULL) {
63 s <<
"VXLAN Label: " <<
label_ <<
" Index : "
66 s <<
"VXLAN Label: " <<
label_ <<
" Index : "
67 <<
GetIndex() <<
" NextHop : <null>";
77 if (vxlan_id->
nexthop() == NULL) {
78 LOG(DEBUG,
"nexthop in network-id label is null");
98 encoder.set_vxlanr_rid(0);
99 encoder.set_vxlanr_vnid(
label_);
100 encoder.set_vxlanr_nhid(nexthop->
nh_id());
102 encode_len = encoder.WriteBinary((uint8_t *)buf, buf_len, &error);
104 assert(encode_len <= buf_len);
109 KSyncVxLanInfo &info)
const {
111 info.set_nh(
nh()->nh_id());
113 if (op == sandesh_op::ADD) {
114 info.set_operation(
"ADD/CHANGE");
116 info.set_operation(
"DELETE");
125 return Encode(sandesh_op::ADD, buf, buf_len);
133 return Encode(sandesh_op::ADD, buf, buf_len);
141 return Encode(sandesh_op::DEL, buf, buf_len);
virtual void VxLanMsgHandler(vr_vxlan_req *req)=0
VxLanTable * vxlan_table() const
void RegisterDb(DBTableBase *table)
KSyncEntry * GetReference(const KSyncEntry *key)
NHKSyncObject * nh_ksync_obj() const
virtual std::string ToString() const
VxLanKSyncObject * ksync_obj_
KSyncDBObject * GetObject() const
virtual int ChangeMsg(char *buf, int buf_len)
virtual bool Sync(DBEntry *e)
virtual int AddMsg(char *buf, int buf_len)
virtual ~VxLanIdKSyncEntry()
virtual int DeleteMsg(char *buf, int buf_len)
virtual KSyncEntry * UnresolvedReference()
void FillObjectLog(sandesh_op::type op, KSyncVxLanInfo &info) const
virtual std::string ToString() const
VxLanIdKSyncEntry(VxLanKSyncObject *obj, const VxLanIdKSyncEntry *entry, uint32_t index)
int Encode(sandesh_op::type op, char *buf, int buf_len)
virtual bool IsLess(const KSyncEntry &rhs) const
NHKSyncEntry * nh() const
const NextHop * nexthop() const
VxLanKSyncObject(KSync *ksync)
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *e)
virtual ~VxLanKSyncObject()
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
#define KSYNC_TRACE(obj, parent,...)
#define LOG(_Level, _Msg)