sixlowpan: add example as test

This commit is contained in:
Tommaso Pecorella
2020-05-30 17:43:12 +02:00
parent 32498ccce8
commit 534bb98fe6
4 changed files with 268 additions and 6 deletions

View File

@@ -36,9 +36,15 @@ using namespace ns3;
int main (int argc, char** argv)
{
bool verbose = false;
bool disablePcap = false;
bool disableAsciiTrace = false;
bool enableLSixlowLogLevelInfo = false;
CommandLine cmd (__FILE__);
cmd.AddValue ("verbose", "turn on log components", verbose);
cmd.AddValue ("disable-pcap", "disable PCAP generation", disablePcap);
cmd.AddValue ("disable-asciitrace", "disable ascii trace generation", disableAsciiTrace);
cmd.AddValue ("enable-sixlowpan-loginfo", "enable sixlowpan LOG_LEVEL_INFO (used for tests)", enableLSixlowLogLevelInfo);
cmd.Parse (argc, argv);
if (verbose)
@@ -49,6 +55,11 @@ int main (int argc, char** argv)
LogComponentEnable ("LrWpanNetDevice", LOG_LEVEL_ALL);
LogComponentEnable ("SixLowPanNetDevice", LOG_LEVEL_ALL);
}
if (enableLSixlowLogLevelInfo)
{
Packet::EnablePrinting ();
LogComponentEnable ("SixLowPanNetDevice", LOG_LEVEL_INFO);
}
NodeContainer nodes;
nodes.Create(2);
@@ -72,7 +83,7 @@ int main (int argc, char** argv)
// Fake PAN association and short address assignment.
// This is needed because the lr-wpan module does not provide (yet)
// a full PAN association procedure.
lrWpanHelper.AssociateToPan (lrwpanDevices, 0);
lrWpanHelper.AssociateToPan (lrwpanDevices, 1);
InternetStackHelper internetv6;
internetv6.Install (nodes);
@@ -106,10 +117,16 @@ int main (int argc, char** argv)
apps.Start (Seconds (1.0));
apps.Stop (Seconds (10.0));
AsciiTraceHelper ascii;
lrWpanHelper.EnableAsciiAll (ascii.CreateFileStream ("Ping-6LoW-lr-wpan.tr"));
lrWpanHelper.EnablePcapAll (std::string ("Ping-6LoW-lr-wpan"), true);
if (!disableAsciiTrace)
{
AsciiTraceHelper ascii;
lrWpanHelper.EnableAsciiAll (ascii.CreateFileStream ("Ping-6LoW-lr-wpan.tr"));
}
if (!disablePcap)
{
lrWpanHelper.EnablePcapAll (std::string ("Ping-6LoW-lr-wpan"), true);
}
Simulator::Stop (Seconds (10));
Simulator::Run ();

View File

@@ -0,0 +1,242 @@
RegisterProtocolHandler for ns3::LrWpanNetDevice
RegisterProtocolHandler for ns3::LrWpanNetDevice
IPHC Compression - IPHC header size = 25
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:2 checksum = 5754)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:2 checksum = 5754)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 25
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 37976)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 37976)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 25
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:1 checksum = 6522)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:1 checksum = 6522)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 2
Packet received: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:2 checksum = 5754)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Packet length: 57
Dispatches: 123 - 96
removed 25 bytes - pkt is ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:2 checksum = 5754)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:2) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:2 checksum = 5754)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:2) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:2 checksum = 5754)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 25
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 38744)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 38744)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 3
Packet received: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 37976)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Packet length: 57
Dispatches: 123 - 96
removed 25 bytes - pkt is ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 37976)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:2) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 37976)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:2) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 37976)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
UID is 0
Packet received: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:1 checksum = 6522)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Packet length: 57
Dispatches: 123 - 96
removed 25 bytes - pkt is ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:1 checksum = 6522)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:1) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:1 checksum = 6522)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:1) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = fe80::1:ff:fe00:1 checksum = 6522)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 1
Packet received: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 38744)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Packet length: 57
Dispatches: 123 - 96
removed 25 bytes - pkt is ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 38744)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:1) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 38744)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 ):: > ff02::1:ff00:1) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 38744)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
IPHC Compression - IPHC header size = 4
IPHC Compression - packet size = 16
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31547) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10363)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31547) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10363)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 4
IPHC Compression - packet size = 16
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31547) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10875)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31547) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10875)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 9
Packet received: ns3::SixLowPanIphc (Compression kind: 31547) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10363)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Packet length: 20
Dispatches: 123 - 96
removed 4 bytes - pkt is ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10363)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 16 Next Header 58 Hop Limit 255 )fe80::ff:fe00:2 > ff02::2) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10363)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02)) Size 56
Packet decompressed length: 56
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 16 Next Header 58 Hop Limit 255 )fe80::ff:fe00:2 > ff02::2) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10363)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 25
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 36921)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 36921)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 8
Packet received: ns3::SixLowPanIphc (Compression kind: 31547) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10875)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Packet length: 20
Dispatches: 123 - 96
removed 4 bytes - pkt is ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10875)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 16 Next Header 58 Hop Limit 255 )fe80::ff:fe00:1 > ff02::2) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10875)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01)) Size 56
Packet decompressed length: 56
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 16 Next Header 58 Hop Limit 255 )fe80::ff:fe00:1 > ff02::2) ns3::Icmpv6RS (( type = 133 (RS) code = 0 checksum = 10875)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 11
Packet received: ns3::SixLowPanIphc (Compression kind: 31497) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 36921)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Packet length: 57
Dispatches: 123 - 96
removed 25 bytes - pkt is ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 36921)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:1 > ff02::1:ff00:2) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 36921)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:1 > ff02::1:ff00:2) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:2 checksum = 36921)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 36790)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 36790)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
UID is 14
Packet received: ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 36790)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Packet length: 67
Dispatches: 123 - 96
removed 35 bytes - pkt is ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 36790)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 36790)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:02)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 36790)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6885)) Payload (size=10)
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6885)) Payload (size=10)
UID is 10
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6885)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6885)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6885)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6885)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6884)) Payload (size=10)
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6884)) Payload (size=10)
UID is 17
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6884)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6884)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6884)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6884)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6629)) Payload (size=10)
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6629)) Payload (size=10)
UID is 20
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6629)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6629)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6629)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6629)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6628)) Payload (size=10)
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6628)) Payload (size=10)
UID is 21
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6628)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6628)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6628)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6628)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6373)) Payload (size=10)
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6373)) Payload (size=10)
UID is 24
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6373)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6373)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6373)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6373)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6372)) Payload (size=10)
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6372)) Payload (size=10)
UID is 25
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6372)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6372)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6372)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6372)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6117)) Payload (size=10)
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6117)) Payload (size=10)
UID is 28
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6117)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6117)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6117)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 6117)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6116)) Payload (size=10)
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6116)) Payload (size=10)
UID is 29
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6116)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6116)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6116)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 6116)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 5861)) Payload (size=10)
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 5861)) Payload (size=10)
UID is 32
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 5861)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 5861)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 5861)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6Echo (( type = 128 (Request) code = 0 checksum = 5861)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 18
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 5860)) Payload (size=10)
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 5860)) Payload (size=10)
UID is 33
Packet received: ns3::SixLowPanIphc (Compression kind: 31232) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 5860)) Payload (size=10)
Packet length: 53
Dispatches: 122 - 96
removed 35 bytes - pkt is ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 5860)) Payload (size=10)
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 5860)) Payload (size=10) Size 58
Packet decompressed length: 58
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 18 Next Header 58 Hop Limit 64 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6Echo (( type = 129 (Reply) code = 0 checksum = 5860)) Payload (size=10)
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 37144)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
SixLowPanNetDevice::Send 1 ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 37144)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
UID is 36
Packet received: ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 37144)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Packet length: 67
Dispatches: 123 - 96
removed 35 bytes - pkt is ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 37144)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 37144)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:2 > 2001:2::1:ff:fe00:1) ns3::Icmpv6NS (( type = 135 (NS) code = 0 target = 2001:2::1:ff:fe00:1 checksum = 37144)) ns3::Icmpv6OptionLinkLayerAddress (( type = 1 length = 1 L2 Address = 00-06-02:01:00:00:00:02))
IPHC Compression - IPHC header size = 35
IPHC Compression - packet size = 32
Packet after IPHC compression: ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 37302)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
SixLowPanNetDevice::Send 0 ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 37302)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
UID is 37
Packet received: ns3::SixLowPanIphc (Compression kind: 31488) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 37302)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Packet length: 67
Dispatches: 123 - 96
removed 35 bytes - pkt is ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 37302)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:01))
Rebuilt packet: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 37302)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:01)) Size 72
Packet decompressed length: 72
Packet decompressed received: ns3::Ipv6Header ((Version 6 Traffic class 0x0 DSCP Default Flow Label 0x0 Payload Length 32 Next Header 58 Hop Limit 255 )2001:2::1:ff:fe00:1 > 2001:2::1:ff:fe00:2) ns3::Icmpv6NA (( type = 136 (NA) code = 0 checksum = 37302)) ns3::Icmpv6OptionLinkLayerAddress (( type = 2 length = 1 L2 Address = 00-06-02:01:00:00:00:01))

View File

@@ -0,0 +1,3 @@
#include "ns3/example-as-test.h"
static ns3::ExampleAsTestSuite g_sixlowpanExample ("example-ping-lr-wpan", "example-ping-lr-wpan", NS_TEST_SOURCEDIR, "--disable-pcap --disable-asciitrace --enable-sixlowpan-loginfo");

View File

@@ -14,7 +14,7 @@ def build(bld):
'test/sixlowpan-hc1-test.cc',
'test/sixlowpan-iphc-test.cc',
'test/sixlowpan-fragmentation-test.cc',
'test/sixlowpan-examples-test-suite.cc',
]
headers = bld(features=['ns3header'])