[Ns-developers] How to get a list of all tcp-sockets from TcpL4Protocol class?
Florian Westphal
fw at strlen.de
Tue May 13 09:10:58 PDT 2008
Mathieu Lacage <mathieu.lacage at sophia.inria.fr> wrote:
> On Tue, 2008-05-13 at 00:55 +0200, Florian Westphal wrote:
> > I am currently working on integrating network simulation
> > cradle and ns-3.
> > At the moment, the ns3 network simulation cradle port doesn't
> > really work beyond the inital TCP handshake.
> > In order to send and receive data over a NSC Tcp connection,
> > i first need to detect
> >
> > a) when a call to nsc->connect() has finished
> > b) when a connection is pending on a listening nsc socket
>
> You can receive the TCP SYNACK as a response to the initial SYN but you
> cannot receive the data packets ?
At the moment i cannot send data packets. The
tcp-large-tranfer example (which i use at the moment for testing)
sends out data after the SYN has been sent and
i can't write that data to the nsc socket (EAGAIN).
I can queue that data for later delivery, but to do this i need to
know when connect() has completed. And from what i've understood so far,
wakeup() would notify about this.
Another reason why i want to do this is that i'd like
to seperate the 'payload transmission' and the
'tcp connection setup data' by relying on wakeup() telling
me about a state change vs. ForwardUp telling me about a
data packet.
Sam Jansen pointed out that carrying
the actual nsc tcp/ip header around in the payload isn't
really good because it increases the packet size, but i
don't know yet how this should be solved (i guess this can wait for
now, as i'd like to get tcp connection setup to work first).
> > possible due to nsc requirements, schedule another function
> > to do so at the next opportunity.
>
> Scheduling a function at the next opportunity is done with
> Simulator::ScheduleNow.
Yes, thanks. I'll also need this to schedule the onConnect callbacks.
> > Now, i could just go ahead and add a
> > a 'get all sockets' method to the Ipv4EndPointDemux class.
> That sounds about right.
Great, thank you.
Regards, Florian
More information about the Ns-developers
mailing list