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

Re: [ns] REPOST:problem with create-connection





Hi Prashant,
	If you look at the class AddrParams procedure addr2id(), it should
execute :

set addressObj [[[Simulator instance] get-AllocAddrBits ""] \
				get-Address]
		return [$addressObj str2addr $addrstr]

since you are using hier-routing, instead of :

return [expr $addrstr & [AddrParams NodeMask 1] << \
				[AddrParams NodeShift 1]]

so it seems the address-format is not set to "HIER".
Have you added the line "$ns set-address-format hierarchical" in yr
script?

--Padma.

On Wed, 14 Feb 2001, Prashant Ratanchandani wrote:


>
> Dear all,
> I have implemented cbq on a link and to test it have
> to create certain connections among 4 wired nodes.
> CBQ is on the link between $W(1) and HA and w(0),w(2)
> and w(3) provide traffic for the three classes to be
> scheduled.I have used hierarchial routing.
>
> The code which gives an error is below-
>
> set udp1 [$ns_ create-connection UDP $W(0) LossMonitor
> $W(1) 1]
> set cbr1 [new Application/Traffic/CBR]
>
>
>
> $cbr1 attach-agent $udp1
> $cbr1 set packetSize_ 190
> $cbr1 set rate_ 1.52Mb; # interval of 0.001
>
>
>
>
> The error on execution is-
>
> warning: using backward compatibility mode
> syntax error in expression "0.0.0 & 2147483647 << 0"
>     while executing
> "expr $addrstr & [AddrParams NodeMask 1] <<
> [AddrParams NodeShift 1"
>     (procedure "AddrParams" line 6)
>     (AddrParams addr2id line 6)
>     invoked from within
> "AddrParams addr2id $address_"
>     (procedure "_o15" line 5)
>     (Node attach line 5)
>     invoked from within
> "$node attach $agent"
>     (procedure "_o3" line 2)
>     (Simulator attach-agent line 2)
>     invoked from within
> "$self attach-agent $source $s_agent"
>     (procedure "_o3" line 6)
>     (Simulator create-connection line 6)
>     invoked from within
> "$ns_ create-connection UDP $W(0) LossMonitor $W(1) 1"
>     invoked from within
> "set udp1 [$ns_ create-connection UDP $W(0)
> LossMonitor $W(1) 1]"
>     (file "sim4.tcl" line 206)
>
> Can anyone help out???
> Thanx in advance
> Regards
> Prashant
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>



-- 
------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau

Padmaparna Haldar