Simulation codes for semitcp in ns2