[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ping.cc
On Mon, 1 Nov 1999, james scott wrote:
> hi ns users,
>
> i ran into a problem getting tcl/greis/ping.cc to compile. the
> problem occurs on line 93 of the source in the current snapshot:
>
> sprintf( out, "%s recv %d %3.1f", name(),
> hdrip->src_ >> Address::instance().NodeShift_[1],
> (Scheduler::instance().clock()-hdr->send_time) * 1000);
>
> the change to get the file to compile (and run successfully) was:
>
> sprintf( out, "%s recv %d %3.1f", name(),
> hdrip->src_.addr_ >> Address::instance().NodeShift_[1],
> (Scheduler::instance().clock()-hdr->send_time) * 1000);
>
> note: hdrip->src_ needs to be hdrip->src_.addr_
>
> hope this helps anyone trying to get the ping tutorial up and running.
> perhaps we can get someone managing the codebase to update this
> file (tcl/greis/ping.cc) and the code found on the tutorial web page
> at http://www-mash.cs.berkeley.edu/ns/tutorial/index.html.
>
> cheers,
>
> james
>
Hi James,
Thanks for pointing out the bug in tutorial. the example and the
tutorial chapter has been revised.
--Padma Haldar.