teto / ns-3-dev-git

MPTCP code for ns 3.21. LOOK AT THE WIKI FOR documentation. UNMAINTAINED
http://www.nsnam.org/
GNU General Public License v2.0
6 stars 8 forks source link

Any good idea on how to let this mptcp stack support OnOffAppliation and other application helpers #8

Open jianwel opened 8 years ago

jianwel commented 8 years ago

Hi Teto and All,

Thanks for sharing your MPTCP NS3 stack in the first place! My first question is related to how to better support the existing application helpers in the NS3. Like the OnOffApplication and OnOffHelper. From what I can see now, the existing application helpers stores a Ptr<Socket>, but the MPTCP stack you wrote requires a Ptr<MpTcpSocketBase>. Even though we can get the socket pointer from the application, it does not make any change for the calls inside the application if we dynamic_cast it outside (in the main program). Therefore, the only way I can think of is to write another MptcpOnOffApplication that stores a Ptr<MpTcpSocketBase>. Any better solution to this problem?

Thanks, Jianwei

teto commented 8 years ago

It should work with legacy applications (have you tried ? You need to enable the mptcp viaConfig::SetDefault ("ns3::TcpSocketBase::EnableMpTcp", BooleanValue(true), Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue("ns3::MpTcpCongestionLia") );); ), the only thing is that it will use only one subflow and hsould behave as TCP. You should just register the correct hook in order to create additionnal subflows as is done in the examples:

source->SetConnectCallback (
//    Callback< void, Ptr< Socket > > connectionSucceeded, Callback< void, Ptr< Socket > > connectionFailed
    MakeCallback (&MpTcpMultihomedTestCase::SourceConnectionSuccessful, this),
    MakeCallback (&MpTcpMultihomedTestCase::SourceConnectionFailed, this)

    );
jianwel commented 8 years ago

Hi teto,

Thanks for your reply, but, whenever doing Config::SetDefault ("ns3::TcpL4Protocol::SocketType", StringValue("ns3::MpTcpCongestionLia") );); )

the program will get seg fault with this message,

msg="Could not set default value for ns3::TcpL4Protocol::SocketType", file=../src/core/model/config.cc, line=688 terminate called without an active exception

without that line, it always stop with this error msg

msg="Could not find mapping associated to ssn", file=../src/internet/model/mptcp-subflow.cc, line=616 terminate called without an active exception

Could you give some hint? If needed, I can send you my source code. It does not allow .cc attachment here.

Thanks, Jayway

teto commented 8 years ago

have you tried running it in a debugger ? that should show you why the code reaches ' msg="Could not set default value for ns3::TcpL4Protocol::SocketType", file=../src/core/model/config.cc, line=688'