Simple TCP BulkSend Application Not Working

42 views
Skip to first unread message

Vikas Raunak

unread,
Jan 23, 2016, 5:06:15 AM1/23/16
to ns-3-users
HI

Please find attached a simple tcp bulk send application based program.

No data is transmitted at all .I get zero total bytes received.

The topology is correct, I have verified it.

I am stuck on this issue for a long time now. The code is only uses TCP (not MPTCP as in my previous thread).

Thanking you
Regards
Vikas
test2.cc

Konstantinos

unread,
Jan 23, 2016, 5:32:39 AM1/23/16
to ns-3-users
Hi Vikas,

Take a short break and relax. Then go back to your code and you can see that there is nothing wrong with NS-3 but with your hastiness.

First problem: you try to get the results AFTER Simulator::Destroy(). All classes generated from NS-3 (ie. your PacketSink) will be destroyed, so you can not get statistics.
Second problem: you send on one socket and received on another. 
  uint16_t tport = 88;
 
PacketSinkHelper tsink("ns3::TcpSocketFactory", InetSocketAddress(Ipv4Address::GetAny(), tport));
 
BulkSendHelper tsource ("ns3::TcpSocketFactory", InetSocketAddress ("10.1.7.2", 381));


Regards, 

K.

Vikas Raunak

unread,
Jan 23, 2016, 5:49:43 AM1/23/16
to ns-3-...@googlegroups.com
Thanks a lot for the reply sir,

Regarding the second problem, I fixed it and still I don't get any transmissions (I put console outputs in ns-3 core..). 

Also for the first problem, the attached code in which I get the results after Simulator::Destroy() works fine (?). 

I don't know, I am stuck in making it work.

Thanks again,

Regards
Vikas

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/isoXRVOWCAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

tcp.cc

Konstantinos

unread,
Jan 23, 2016, 6:35:48 AM1/23/16
to ns-3-users
Hi Vikas,

I just run your scenario, and I got the "expected" output

Total Bytes Received: 1000000


I do not know what is the problem you are reporting.

K.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages