Skip to content

Regarding the issue of ns3-quic, #3

@lee666li

Description

@lee666li

I'm very sorry to disturb you. I don't know how to comment under your Quic project. When I ran ns3-quic, I encountered an error. During the 0RTT connection establishment, the following error occurred(The running instance is quic-test.):

aborted, cond="!IsVersionSupported(m_vers)", msg="0RTT Handshake requested with wrong Initial Version", +0.085760000s 4 file=../src/transport-protocol/quic/model/quic-socket-base.cc, line=2554
NS_FATAL, terminating
terminate called without an active exception
Command 'build/scratch/ns3.43-uwificsmagquic-default' died with <Signals.SIGABRT: 6>.

The running code is as follows:
`/* -- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -- /
/

  • Copyright (c) 2019 SIGNET Lab, Department of Information Engineering, University of Padova
  • This program is free software; you can redistribute it and/or modify
  • it under the terms of the GNU General Public License version 2 as
  • published by the Free Software Foundation;
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License
  • along with this program; if not, write to the Free Software
  • Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  • Authors: Alvise De Biasio alvise.debiasio@gmail.com
  •      Federico Chiariotti <whatever@blbl.it>
    
  •      Michele Polese <michele.polese@gmail.com>
    
  •      Davide Marcato <davidemarcato@outlook.com>
    

*/

#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/transport-protocol-module.h"//quic
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/config-store-module.h"

#include

using namespace ns3;

NS_LOG_COMPONENT_DEFINE("quic-tester");

int
main (int argc, char *argv[])
{

CommandLine cmd;
cmd.Parse (argc, argv);

std::cout
<< "\n\n#################### SIMULATION SET-UP ####################\n\n\n";

LogLevel log_precision = LOG_LEVEL_LOGIC;//输出逻辑级别及其以下的详细信息(非常详细)
Time::SetResolution (Time::NS);
LogComponentEnableAll (LOG_PREFIX_TIME);//在每条日志前添加时间戳。
LogComponentEnableAll (LOG_PREFIX_FUNC);//在每条日志前添加函数名
LogComponentEnableAll (LOG_PREFIX_NODE);//在每条日志前添加节点ID。
// LogComponentEnableAll (LOG_PREFIX_CALLBACK);//在每条日志前添加节点ID。
LogComponentEnableAll (LOG_PREFIX_ALL);//在每条日志前添加节点ID。
// //启用特定组件的日志
// LogComponentEnable ("QuicEchoClientApplication", log_precision);
// LogComponentEnable ("QuicEchoServerApplication", log_precision);
// // LogComponentEnable ("QuicHeader", log_precision);
// //LogComponentEnable ("QuicSocketBase", log_precision);
// LogComponentEnable ("QuicStreamBase", LOG_LEVEL_LOGIC);
// LogComponentEnable ("Socket", log_precision);
// LogComponentEnable ("Application", log_precision);
// LogComponentEnable ("Node", log_precision);
// LogComponentEnable ("InternetStackHelper", log_precision);
// LogComponentEnable ("QuicSocketFactory", log_precision);
// LogComponentEnable ("ObjectFactory", log_precision);
// //LogComponentEnable ("TypeId", log_precision);
// LogComponentEnable ("QuicL4Protocol", log_precision);
// LogComponentEnable ("QuicL5Protocol", log_precision);
// //LogComponentEnable ("ObjectBase", log_precision);
// LogComponentEnable ("QuicClient", log_precision);
LogComponentEnable ("QuicServer", log_precision);
//
// LogComponentEnable ("QuicEchoHelper", log_precision);
// LogComponentEnable ("QuicSocketTxScheduler", log_precision);
// LogComponentEnable ("QuicSocketRxBuffer", log_precision);
// LogComponentEnable ("QuicHeader", log_precision);
// LogComponentEnable ("QuicSubheader", log_precision);
// LogComponentEnable ("Header", log_precision);
// LogComponentEnable ("PacketMetadata", log_precision);

NodeContainer nodes;
nodes.Create (2);
auto n1 = nodes.Get (0);
auto n2 = nodes.Get (1);

PointToPointHelper pointToPoint;
pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms"));

NetDeviceContainer devices;
devices = pointToPoint.Install (nodes);

// InternetStackHelper::SetSocketType("ns3::QuicSocketFactory");
// InternetStackHelper stack;
// stack.Install(nodes);
QuicHelper stack;
stack.InstallQuic (nodes);

// std::cout<<InternetStackHelper::GetSocketType()<<std::endl;
// Ptr node = nodes.Get(0);
// Ptr quic = node->GetObject();
// if (quic) {
// std::cout << "QUIC protocol is installed on the node." << std::endl;
// }

Ipv4AddressHelper address;
address.SetBase ("10.1.1.0", "255.255.255.0");

Ipv4InterfaceContainer interfaces = address.Assign (devices);

QuicServerHelper quic_server (9);

ApplicationContainer serverApps = quic_server.Install (nodes.Get (1));
serverApps.Start (Seconds (0.0));
serverApps.Stop (Seconds (1200.0));

QuicClientHelper quic_client (interfaces.GetAddress (1), 9);
//11 MiB/s ÷ 536 =21519包/s
// Interval = 1/21519 = 0.000046s =
quic_client.SetAttribute("MaxPackets",UintegerValue(100));
quic_client.SetAttribute("Interval",TimeValue(MicroSeconds(46)));//
quic_client.SetAttribute("PacketSize",UintegerValue(536));//

ApplicationContainer clientApps = quic_client.Install (nodes.Get (0));
// quic_client.SetFill (clientApps.Get (0), "Hello World");
clientApps.Start (Seconds (2.0));
clientApps.Stop (Seconds (4.0));
//the second connect->0RTT->error
ApplicationContainer clientApps2 = quic_client.Install (nodes.Get (0));
clientApps.Start (Seconds (4.0));
clientApps.Stop (Seconds (6.0));

Packet::EnablePrinting ();
Packet::EnableChecking ();

std::cout << "\n\n#################### STARTING RUN ####################\n\n";
Simulator::Run ();
std::cout
<< "\n\n#################### RUN FINISHED ####################\n\n\n";
Simulator::Destroy ();

std::cout
<< "\n\n#################### SIMULATION END ####################\n\n\n";
return 0;
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions