[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Possible bug in FullTCP
If I make a slight modification to the TcpApp sample code (shown
below) given in the ns manual to make two sends very close together, the
second one gets dropped. This appears to be happening because FullTcp is
in the TCPS_SYN_SENT state, FullTcp::advance_bytes does not do
anything in this case, and the send call then just returns without doing
anything.
Is this a bug? Is there a workaround for this? I'm trying to use FullTcp
to send an update request to a remote node at random interarrival
times. If a send happens to be generated before the remote
node replies, then the next update request I send is lost. I want to
simulate the openings and closings of Tcp connections so a workaround by
leaving the connections open all the time won't work for me.
Any help would be very greatly appreciated. I'm trying to get this
simulation done soon, so if anyone could respond this would be very
helpful.
Thanks,
Matt
******
set tcp1 [new Agent/TCP/FullTcp]
set tcp2 [new Agent/TCP/FullTcp]
# Set TCP parameters here, e.g., window_, iss_, \ldots
$ns attach-agent $n1 $tcp1
$ns attach-agent $n2 $tcp2
$ns connect $tcp1 $tcp2
$tcp2 listen
set app1 [new Application/TcpApp $tcp1]
set app2 [new Application/TcpApp $tcp2]
$app1 connect $app2
$ns at 1.0000 "$app1 send 100 \"$app2 app-recv 100\""
$ns at 1.0005 "$app1 send 100 \"$app2 app-recv 100\"" # this gets
# dropped!!