hi every body!my problem is this: i have added a new packet type to aodv routing protocol, but the problem is i get format_aodv : invalid aodv type. I have added a packet header in AODV.The changes/additions that I did in aodv-packet.h are:1. Added a header access MACRO (function)2. Added a header hexa decimal value definition 00X6.3. Added a structure having the data fields for theheader. The changes / additions that I did in cmu_trace are: voidCMUTrace::format_aodv(Packet *p, int offset)............. case AODVTYPE_RREP: case AODVTYPE_HELLO: case AODVTYPE_HELLO: // added by me case AODVTYPE_RERR: if (pt_->tagged()) { sprintf(pt_->buffer() + offset, "-aodv:t %x -aodv:h %d -aodv:d %d -adov:ds %d " "-aodv:l %f -aodv:c %s ", rp->rp_type, rp->rp_hop_count, rp->rp_dst, rp->rp_dst_seqno, rp->rp_lifetime, rp->rp_type == AODVTYPE_RREP ? "REPLY" : (rp->rp_type == AODVTYPE_RERR ? "ERROR" : (rp->rp_t!
ype == AODVTYPE_RPACK ? "RPACK" : "HELLO"))); } else if (newtrace_) { sprintf(pt_->buffer() + offset, "-P aodv -Pt 0x%x -Ph %d -Pd %d -Pds %d -Pl %f -Pc %s ", rp->rp_type, rp->rp_hop_count, rp->rp_dst, rp->rp_dst_seqno, rp->rp_lifetime, rp->rp_type == AODVTYPE_RREP ? "REPLY" : (rp->rp_type == AODVTYPE_RERR ? "ERROR" : (rp->rp_type == AODVTYPE_RPACK ? "RPACK" : "HELLO"))); } else { sprintf(pt_->buffer() + offset, "[0x%x %d [%d %d] %f] (%s)", rp->rp_type, rp->rp_hop_count, rp->rp_dst, rp->rp_dst_seqno, rp->rp_lifetime, rp->rp_type == AODVTYPE_RREP ? "REPLY" : (rp->rp_type == AODVTYPE_RERR ? "ERROR" : (rp->rp_type == AODVTYPE_RPACK ? "RPACK" : "HELLO"))); } break; default:#ifdef WIN32 fprintf(stderr, "CMUTrace::format_aodv: invalid AODV packet type\n");#else fprintf(stderr, "%s: invalid AODV packet type\n", __FUNCTION__);#endif !
abort(); }}But I still have the same problem, anyone can tell
me what's wrong?
Express yourself instantly with MSN Messenger! MSN Messenger
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/