[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TCP monitor trace
CWen56 wrote:
>
> Federico Orlandini wrote:
>
> > Hi ,
> > try to use Agent/TCP/FullTcp as source and sink for your agents.
> >
> > Bye
> >
> > Federico Orlandini
> > E-Mail : [email protected]
>
> Thanks for reply
> I have tried your suggestion but I think the problem falling on how
> to attach lossmonitor on TCP sink, otherwise when I tried FullTcp on
> both source and sink even no traffic flowing to each other on nam.
> I list the error message and source code hope someone could give me
> a hand to realize what happened on this simulation?
> thanks
> regards
>
> ############## Set up TCP/Tahoe Agent ##############
> set tcp [new Agent/TCP/FullTcp]
> $tcp set class_ 1
> $tcp set fid_ 1
>
> set sink [new Agent/TCP/FullTcp]
> $ns attach-agent $n0 $tcp
> $ns attach-agent $n3 $sink
> set loss1 [new Agent/LossMonitor]
> $ns attach-agent $n3 $loss1 <======= question ??
Think of the attach-agent as setting up a downstream/upstream relationship.
In the code directly above, Agent/LossMonitor and Agent/TCP/FullTcp sitting
besides each other, upstream from $n3.
What I believe you're trying to do is set up the LossMonitor as a pipe,
between $n3 and $sink. The problem is that the LossMonitor isn't defined that
way: Frederico is suggesting to remove the 'question' line and the one above
and it should work. You won't get the LossMonitor variables: they're not
tracked or exported.