[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tcp-full




Hi all,

I have a question regarding the following in tcp-full.cc

int FullTcpAgent::command(int argc, const char*const* argv)
{
        // would like to have some "connect" primitive
        // here, but the problem is that we get called before
        // the simulation is running and we want to send a SYN.
        // Because no routing exists yet, this fails.
        // Instead, see code in advance() above.
        //
        // listen can happen any time because it just changes state_
        //
        // close is designed to happen at some point after the
        // simulation is running (using an ns 'at' command)

...

essentially, if I just allocate my own packet and use send(p,0) it bombs out
cos the routing are not yet established. My question is what does 
advance() --> advance_bytes() --> connect() --> output() do to avoid this
problem? It seems that it simply calls send(p,0) as well.

Any suggestions is greatly appreciated, cos I'm really stumped.

    Duke