[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tcl question
Hello all,
I have tried to make a TCP split-connection for ns.
It is not a true split connection, but will generate its own
ack for packets at the split point.
I followed Kannan's suggestion from
http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9806/0095.html
I cannot get it to work when I am trying to add my functions on the links.
topology:
source ------------- split-node ------------- mobile host
It seems as if the downward module does not recv any packets (the module gets
skipped somehow). The following is from my tcl script:
Class linkDown -superclass Link
linkDown instproc init { src dst bw delay q {lltype "DelayLink"} } {
$self next $src $dst
$self instvar link_ queue_ head_ toNode_ ttl_
$self instvar drophead_
#added for interface code
$self instvar ifacein_ ifaceout_
set ifacein_ 0
set ifaceout_ $dst
set queue_ $q
set link_ [new $lltype]
set forw_ [new FWD]
$link_ set bandwidth_ $bw
$link_ set delay_ $delay
$forw_ target $queue_
$queue_ target $link_
$link_ target [$dst entry]
My question is: Since the FWD does not get any packets, is it not possible
to place the module before the queue?
The reverse function is added in a similar way:
$queue_ target $link_
$link_ target $rew_
$rew_ target [$dst entry]
And this seems to work...
Any help would be appretiated
/Jonas Haggard Ljungquist