[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Help, for snoop.tcl



For the error message, invalid command name "Mac/Csma/Cd",
you could use the Mac/802_3 agent which implements CSMA/CD to replace
Mac/Csma/Cd.
You may want to see http://www-mash.cs.berkeley.edu/ns/ns-problems.html for
help.

- Hyunah

Kai Xu wrote:

> Dear Sir,
>
> Currently, we are working on a course project focusing on "snoop"
> protocol, and we want to use NS to do some simulation experiments. But
> when we run the snoop.tcl script, we got following problems.
>
> Firstly, when we run snoop.tcl we get following warning and errors,
>
> ns snoop.tcl -e 0.2 -eu time -stop 10 -ll LLSnoop -r
>
> warning: Warning: use `drop_tail_' rather than `drop-tail_'
> invalid command name "Mac/Csma/Ca"
>     while executing
> "Mac/Csma/Ca create _o45 "
>     invoked from within
> "catch "$className create $o $args" msg"
>     (procedure "new" line 3)
>     invoked from within
>         ....
>         ....
> "$ns make-lan $nodelist $opt(bw) $opt(delay)  LL $opt(ifq) $opt(mac)
> $opt(chan)"
>     (procedure "create-topology" line 17)
>     invoked from within
> "create-topology $opt(num)"
>     (file "snoop.tcl" line 378)
>
> Next, we change "Mac/Csma/Ca" with "Mac/802_11" in the script, but we got
> following errors again,
>
> warning: Warning: use `drop_tail_' rather than `drop-tail_'
> can't read "lanIface_(1)": no such element in array
>     while executing
> "set nif $lanIface_([$dst id])"
>     (procedure "add-error" line 4)
>     invoked from within
> "add-error $lan $src $dst $e1"
>     (procedure "create-error" line 25)
>     invoked from within
> "create-error $lan $node(0) $dstlist $opt(em) $opt(e)  $opt(eu)
> $opt(trans)"
>     invoked from within
> "if { [info exists opt(e)] } {
>         if { $opt(e) == 0 || $opt(e) == "" } {
>                 puts "error rate 0 ==> no errors"
>         } else {
>                 if { [info exists opt(www)] } {
> ..."
>     (file "snoop.tcl" line 385)
>
> Could you please tell us how to fix these errors? Now, we are using the
> Release of ns-2.1b6. Shall we change to another older release to run this
> script properly? Or a newer one (2.1b7)? Your kindly help and advice is
> very important for us. Thanks.
>
> Looking forward to your reply.
>
> Best Regards,
>
> Kai Xu
>
> EECS dept.
> U of Michigan.
>
>