Hi All, Can anyone guide me how to print the routing table of a particular node when scheduled from the tcl script.
in the main cc file, 1: int 2: Protoname::command(int argc, const char*const* argv) { 3: if (argc == 2) { 4: if (strcasecmp(argv[1], "start") == 0) { 5: pkt_timer_.resched(0.0); 6: return TCL_OK; 7: } 8: else if (strcasecmp(argv[1], "print_rtable") == 0) { 9: if (logtarget_ != 0) { 10: sprintf(logtarget_->pt_->buffer(), "P %f _%d_ Routing Table", 11: CURRENT_TIME, 12: ra_addr()); 13: logtarget_->pt_->dump(); 14: rtable_.print(logtarget_); 15: } 16: else { 17: fprintf(stdout, "%f _%d_ If you want to print this routing table " 18: "you must create a trace file in your tcl script", 19: CURRENT_TIME, 20: ra_addr()); 21: } 22: return TCL_OK; 23: } 24: } And say i give the following command in tcl $ns_ at 15.0 "[$node_(0) agent 255] print_rtable" to print the routing table of node 0 at 15 sec. When i run, i get segmentation fault Please Help me out!! Thanks, Jayavignesh Now, send attachments up to 25MB with Yahoo! India Mail. Learn how. http://in.overview.mail.yahoo.com/photos