How to use a subclass of TcpSocketBase in BulkSendApplication

27 views
Skip to first unread message

Sagar Patel

unread,
May 16, 2020, 6:19:38 PM5/16/20
to ns-3-users
I am developing a new TCP protocol where changes need to be made in TcpSocketBase::SendPendingData(). It appears that I cannot use TcpCongestionOps or TcpRecoveryOps to achieve what I need, so I chose to create an AbcSocketBase as a subclass of TcpSocketBase. Now, I would like to use this type of socket in a simulation along with the BulkSendApplication and PacketSinkApplication. From the manual, I found that I can use 
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue ("ns3::TcpNewReno"));
to set a TcpCongestionOps class, but how can I tell Applications to use the AbcSocketBase?

I have thought of one solution, but I feel that I may be missing something: implement a AbcTcpL4Protocol, and AbcTcpSocketFactory class, and use the factory as a parameter to the Application constructor. Is this the only solution with the given constraints, or am I missing something?

Sagar Patel

unread,
May 16, 2020, 6:44:01 PM5/16/20
to ns-3-users
Also, I am using the latest release of ns-3, version ns-3.30.1.

Sagar Patel

unread,
May 17, 2020, 1:01:20 PM5/17/20
to ns-3-users
I have found another method outlined here (and implemented here). While I am not implementing MP-TCP, it seems that this may be a more appropriate solution. The linked solution uses a TcpOption to signal MP-TCP support. When the option is set during the 3-way handshake, TcpSocketBase "upgrades" the socket to one that supports MP-TCP. Thoughts? Is this the better approach?
Reply all
Reply to author
Forward
0 new messages