[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parameters for ns_create_cbr
> Can anybody tell me what is the last parameter for the
> ns_create_cbr ?
The last parameter is the flow id. In the CBQ test scripts in
ns-2/tcl/test, "ns_create_cbr" is only used in the ns version 1 test
scripts test-suite-cbq-v1.tcl and test-suite-cbq-v1a.tcl, and not in
the ns version 2 test script test-suite-cbq.tcl.
That is, "ns_create_cbr" is only included for backward compatibility
mode, so that users can run ns version 1 scripts in ns -2. In ns-2
without backward compatibility mode, the binding of flows to CBQ
classes is done as follows, as shown in test-suite-cbq.tcl:
$cbqlink bind $audioclass_ 1;# fid 1
- Sally
Details:
The procedure "ns_create_cbr" is in ns-2/tcl/lib/ns-compat.tcl:
proc ns_create_cbr { srcNode sinkNode pktSize interval fid } {
set s [ns create-connection cbr $srcNode loss-monitor \
$sinkNode $fid]
The last parameter, the "flow id", is used by "create-connection" in
ns-lib.tcl as follows:
Simulator instproc create-connection {s_type source d_type dest pktClass} {
...
$s_agent set fid_ $pktClass
$d_agent set fid_ $pktClass
Defined in ns-2/agent.h as follows:
int fid_; /* for IPv6 flow id field */
--------------------------------
http://www-nrg.ee.lbl.gov/floyd/