23 label_(mpls->label()), nh_(NULL) {
46 s <<
"NextHop : NULL";
57 LOG(DEBUG,
"nexthop in mpls label is null");
77 encoder.set_mr_label(
label_);
78 encoder.set_mr_rid(0);
79 encoder.set_mr_nhid(next_hop->
nh_id());
81 encode_len = encoder.WriteBinary((uint8_t *)buf, buf_len, &error);
83 assert(encode_len <= buf_len);
88 KSyncMplsInfo &info)
const {
90 info.set_nh(
nh()->nh_id());
92 if (op == sandesh_op::ADD) {
93 info.set_operation(
"ADD/CHANGE");
95 info.set_operation(
"DELETE");
104 return Encode(sandesh_op::ADD, buf, buf_len);
112 return Encode(sandesh_op::ADD, buf, buf_len);
120 return Encode(sandesh_op::DEL, buf, buf_len);
#define KSYNC_TRACE(obj, parent,...)
void RegisterDb(DBTableBase *table)
virtual void MplsMsgHandler(vr_mpls_req *req)=0
MplsKSyncObject(KSync *ksync)
const NextHop * nexthop() const
MplsKSyncObject * ksync_obj_
virtual ~MplsKSyncObject()
int Encode(sandesh_op::type op, char *buf, int buf_len)
virtual std::string ToString() const
MplsTable * mpls_table() const
virtual KSyncEntry * UnresolvedReference()
virtual std::string ToString() const
virtual bool Sync(DBEntry *e)
NHKSyncObject * nh_ksync_obj() const
virtual KSyncEntry * DBToKSyncEntry(const DBEntry *e)
MplsKSyncEntry(MplsKSyncObject *obj, const MplsKSyncEntry *entry, uint32_t index)
NHKSyncEntry * nh() const
virtual int ChangeMsg(char *buf, int buf_len)
virtual int AddMsg(char *buf, int buf_len)
KSyncEntry * GetReference(const KSyncEntry *key)
void FillObjectLog(sandesh_op::type op, KSyncMplsInfo &info) const
virtual KSyncEntry * Alloc(const KSyncEntry *entry, uint32_t index)
virtual bool IsLess(const KSyncEntry &rhs) const
virtual int DeleteMsg(char *buf, int buf_len)
KSyncDBObject * GetObject() const
#define LOG(_Level, _Msg)
virtual ~MplsKSyncEntry()