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