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

Re: procedure newLan



Thierry Ernst <[email protected]> writes:

> Hi,
> 
> I have a question about Lans.  
> 
> In ns2.1b4 there is 2 tcl procedures  Simulator::newLan
> 
> One in ~ns/tcl/lan/ns-lan.tcl
> which calls 
> set lan [eval new LanLink $self $args]
> 
> And one in ns/tcl/lan/vlan.tcl
> which calls
> set lan [eval new LanNode $self -bw $bw -delay $delay $args]
> 
> As I guess that only the second one is used, what is the purpose
> of keeping the first one, and how otcl knows which one to use ?
> Is this only for backward compatibility or just to add an extra
> level of difficulty ?

You're right that only the second one is used and the first one was
kept just for "historical reasons".  You are right too that it brings
some confusion, so there the whole file ns-lan.tcl has been excluded
from current snapshot and it will not be present in the next release.

I don't remember the details, but ns-lan.tcl may not even be sourced
by ns or vlan.tcl is sourced after it, thus re-defining the newLan
method.

  -Yuri
> 
> 
> Cheers,
> Thierry.
> 
> 
> 
> --
> * mailto:[email protected]  Tel +33 (0) 4 76 61 52 69 
> * INRIA Rhone-Alpes Projet SIRAC                    (fax 52 52)