[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Next node which is going to be used in the routing ??
On Wed, 22 Sep 1999 21:45:17 +0200, Abdelhamid Joumdane wrote:
>Well, I think you wouldn't have this error if the simulation had begun.
>Retry scheduling the command after the simulation begins.
You're right Abdelhamid. Yoann needs to do lookup after "$ns run".
The code is supposed to report an error message in this case,
but wasn't because of, well, another error.
The following patch fixes the error message:
-John
Index: route.cc
===================================================================
RCS file: /usr/src/mash/repository/vint/ns-2/route.cc,v
retrieving revision 1.31
diff -u -r1.31 route.cc
--- route.cc 1999/08/30 21:59:20 1.31
+++ route.cc 1999/09/24 21:21:17
@@ -224,7 +224,8 @@
int nh;
int res = lookup_flat((char*)argv[2], (char*)argv[3],
nh);
- tcl.resultf("%d", nh);
+ if (res == TCL_OK)
+ tcl.resultf("%d", nh);
return res;
}
}
>"Yoann NEC, Japan" wrote:
>>
>> Hello everybody !
>>
>> MY PURPOSE IS TO KNOW THE NEXT NODE THAT N0 IS GOING TO USE TO REACH N2.
>>
>> Here is the very simple script :
>>
>> set n0 [$ns node]
>> set n1 [$ns node]
>> set n2 [$ns node]
>> $ns duplex-link $n0 $n1 1Mb 10ms DropTail
>> $ns duplex-link $n1 $n2 1Mb 10ms DropTail
>>
>> # get the instance of routelogic
>> set rl [$ns get-routelogic]
>> # perform the lookup
>> $rl lookup [$n0 id] [$n2 id]
>>
>> but, it is not working ! The "lookup" gets an error and it returns
>> "-279125288"
>>
>> I WILL BE VERY GREATFUL TO THE PERSON WHO WILL HELP ME.
>>
>> PLEEEEASE HELP ME !!
>>
>> Yoann
>