从收到报文到处理报文


Breakpoint 1, ns3::PointToPointChannel::TransmitStart (this=0x688a00, p=..., src=..., txTime=...) at ../src/point-to-point/model/point-to-point-channel.cc:102
102      if(src_id == dst_id)
(gdb) p src_id
$3 = 0
(gdb) p dst_id
$4 = 1
(gdb) c
Continuing.

Breakpoint 2, ns3::PointToPointNetDevice::Receive (this=0x688510, packet=...) at ../src/point-to-point/model/point-to-point-net-device.cc:424
424      NS_LOG_FUNCTION (this << packet);

460          uint16_t p = ppp.GetProtocol();
(gdb) n
461          if(0xffff == IsisPppToEther(p))
(gdb) p p
$5 = 33
(gdb) n
468              protocol = PppToEther (ppp.GetProtocol ());
(gdb) n
471          if (!m_promiscCallback.IsNull ())
(gdb) p protocol
$6 = 2048
(gdb) n
477          m_macRxTrace (originalPacket);
(gdb) n
478          m_rxCallback (this, packet, protocol, GetRemote ());
(gdb) p m_rxCallback
$7 = { = {m_impl = {m_ptr = 0x6883b0}}, }
(gdb) b node.cc:297
Breakpoint 3 at 0x7ffff6239f4d: file ../src/network/model/node.cc, line 297.
(gdb) c
Continuing.

Breakpoint 3, ns3::Node::ReceiveFromDevice (this=0x6b2240, device=..., packet=..., protocol=2048, from=..., to=..., packetType=0, promiscuous=false)
    at ../src/network/model/node.cc:297
297      NS_LOG_FUNCTION (this << device << packet << protocol << &from << &to << packetType << promiscuous);
(gdb) n
298      NS_ASSERT_MSG (Simulator::GetContext () == GetId (), "Received packet with erroneous context ; " <<
(gdb)



Breakpoint 5, ns3::Ipv4L3Protocol::Receive (this=0x67f630, device=..., p=..., protocol=2048, from=..., to=..., packetType=0) at ../src/internet/model/ipv4-l3-protocol.cc:507
507      Ipv4Header ipHeader;
(gdb) bt
#0  ns3::Ipv4L3Protocol::Receive (this=0x67f630, device=..., p=..., protocol=2048, from=..., to=..., packetType=0) at ../src/internet/model/ipv4-l3-protocol.cc:507
#1  0x00007ffff6cd70a3 in ns3::MemPtrCallbackImpl, ns3::Ptr, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType), void, ns3::Ptr, ns3::Ptr, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x6893d0, a1=..., a2=..., a3=2048, a4=..., a5=..., a6=0) at ./ns3/callback.h:464
#2  0x00007ffff623cefb in ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x68add0, a1=..., a2=..., a3=2048, a4=..., a5=..., a6=0) at ./ns3/callback.h:1149
#3  0x00007ffff623a691 in ns3::Node::ReceiveFromDevice (this=0x6b2240, device=..., packet=..., protocol=2048, from=..., to=..., packetType=0, promiscuous=false)
    at ../src/network/model/node.cc:317
#4  0x00007ffff6239e80 in ns3::Node::NonPromiscReceiveFromDevice (this=0x6b2240, device=..., packet=..., protocol=2048, from=...) at ../src/network/model/node.cc:290
#5  0x00007ffff6242c80 in ns3::MemPtrCallbackImpl, ns3::Ptr, unsigned short, ns3::Address const&), bool, ns3::Ptr, ns3::Ptr, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (
    this=0x6883b0, a1=..., a2=..., a3=2048, a4=...) at ./ns3/callback.h:441
#6  0x00007ffff6d40928 in ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x688638, a1=..., a2=..., a3=2048, a4=...) at ./ns3/callback.h:1126
#7  0x00007ffff5c0491b in ns3::PointToPointNetDevice::Receive (this=0x688510, packet=...) at ../src/point-to-point/model/point-to-point-net-device.cc:478
#8  0x00007ffff5c162f8 in ns3::EventImpl* ns3::MakeEvent), ns3::Ptr, ns3::Ptr >(void (ns3::PointToPointNetDevice::*)(ns3::Ptr), ns3::Ptr, ns3::Ptr)::EventMemberImpl1::Notify() (this=0x6a39d0)
    at ./ns3/make-event.h:353
#9  0x00007ffff733e5e7 in ns3::EventImpl::Invoke (this=0x6a39d0) at ../src/core/model/event-impl.cc:51
#10 0x00007ffff73432ac in ns3::DefaultSimulatorImpl::ProcessOneEvent (this=0x6b0870) at ../src/core/model/default-simulator-impl.cc:147
#11 0x00007ffff7343638 in ns3::DefaultSimulatorImpl::Run (this=0x6b0870) at ../src/core/model/default-simulator-impl.cc:200
#12 0x00007ffff733f378 in ns3::Simulator::Run () at ../src/core/model/simulator.cc:204
#13 0x000000000040c39a in main (argc=1, argv=0x7fffffffdc08) at ../myscripts/ns-3-dce-quagga/example/dce-quagga-mpls.cc:194

层三处理的时候发现没有路由,为什么不直接走socket呢?

肯定是socket没有。

为什么没有socket,因为不是rawsocket

所以没有socket应该是对的

所以还是应该走路由,

所以需要有默认路由

你可能感兴趣的:(ns3,quagga)