[ns]Urgent:how to configure node

=?gb2312?B?0e7P5rrN?= yxhliyi at mail.nankai.edu.cn
Wed Apr 13 19:41:28 PDT 2005


Hi

I want to conifgure node with new route-protocol and node is not wireless-node.
How can I do it?My nodes are not wireless-node.

I have tried this:
set va(rp) MyProto

set ns [new Simulator]

$ns node-config -adhocRouting $val(rp)
set n0 [$ns node]

but when I am running the tcl scripts,it say "Wrong route agent!"
I have done the following work:

in ns-packet.tcl
foreach prot {
	ProtoQoS
	AODV
	ARP

in tcl-lib.tcl     

   switch -exact $routingAgent_ {
	    ProtoQoS {
		    set ragent [$self create-protoqos-agent $node]
	    }
             DSDV {
		    set ragent [$self create-dsdv-agent $node]
	    }

and 
Simulator instproc create-protoqos-agent { node } {
	set ragent [new Agent/ProtoQoS [$node node-addr]]
	#$self at 0.0 "$ragent start" #I don't define this command
	$node set ragent_ $ragent
	return $ragent
}

regards
Yang





More information about the Ns-users mailing list