I put the folloing code for

in new protocol( idsaodv ) for caching the RREP

in idsaodv.h

class IDSBroadcastRREP {
       friend class IDSAODV;
 public:
       IDSBroadcastRREP(nsaddr_t i);
       IDSBroadcastRREP(nsaddr_t i, u_int32_t r) { src = i; id = r;  }
 protected:
       LIST_ENTRY(IDSBroadcastRREP) link;
       nsaddr_t        src;
       u_int32_t       id;
       int             count;
       double          expire;         // now + BCAST_ID_SAVE s
       int             dst;
};

LIST_HEAD(idsaodv_rcache, IDSBroadcastRREP);


and in idsaodv.cc

/*=================== change =============*/
void
IDSAODV::rrep_insert(nsaddr_t id) {
IDSBroadcastRREP *r = new IDSBroadcastRREP(id);
assert(r);
r->expire = CURRENT_TIME + BCAST_ID_SAVE;
r->count ++;
LIST_INSERT_HEAD(&rrephead, r, link);
}

IDSBroadcastRREP*
IDSAODV::rrep_lookup(nsaddr_t id) {
IDSBroadcastRREP *r = rrephead.lh_first;
for( ; r; r = r->link.le_next) {
if (r->dst == id)
return r;
}
return NULL;
}
void
IDSAODV::rrep_remove(nsaddr_t id) {
IDSBroadcastRREP *r = rrephead.lh_first;
for( ; r; r = r->link.le_next) {
if (r->dst == id)
LIST_REMOVE(r,link);
delete r;
break;
}
}
void
IDSAODV::rrep_purge() {
IDSBroadcastRREP *r = rrephead.lh_first;
IDSBroadcastRREP *rn;
double now = CURRENT_TIME;
for(; r; r = rn) {
rn = r->link.le_next;
if(r->expire <= now) {
LIST_REMOVE(r,link);
delete r;
}
}
}


it shows the following error but why please try ..................

:(.text+0x2bc6):undifined referance to
'IDSBroadcastRREP::
IDSBraodcastRREP(long)

I cant get why occur this problem.....
please tell why occur this problem & how could I able to solve this
it is correct or not?
thanks in advance

Reply via email to