21 #include "ns3/ipv4-address.h"
22 #include "ns3/ipv6-address.h"
23 #include "ns3/packetbb.h"
52 void DoRun()
override;
58 void TestDeserialize();
93 "serialization failed, buffers have different sizes");
108 "deserialization failed, did not use all bytes");
138 uint8_t buffer[] = {0x00};
154 uint8_t buffer[] = {0x08, 0x00, 0x02};
173 uint8_t buffer[] = { 0x0c, 0x00, 0x03, 0x00, 0x00};
199 uint8_t buffer[] = {0x0c, 0x00, 0x04, 0x00, 0x02, 0x01, 0x00};
229 tlv2->SetTypeExt(100);
232 uint8_t buffer[] = {0x0c, 0x00, 0x05, 0x00, 0x05, 0x01, 0x00, 0x02, 0x80, 0x64};
263 tlv2->SetTypeExt(100);
265 uint8_t tlv2val[] = {1, 2, 3, 4};
266 tlv2->SetValue(tlv2val,
sizeof(tlv2val));
391 tlv2->SetTypeExt(100);
393 uint8_t tlv2val[] = {
394 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
395 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
396 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
397 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
398 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
399 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
400 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61,
401 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
402 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d,
403 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b,
404 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
405 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
406 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5,
407 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3,
408 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1,
409 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
410 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed,
411 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb,
412 0xfc, 0xfd, 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
413 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
414 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
415 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,
417 tlv2->SetValue(tlv2val,
sizeof(tlv2val));
422 0x0c, 0x00, 0x07, 0x01, 0x33, 0x01, 0x00, 0x02, 0x98, 0x64, 0x01, 0x2c, 0x00, 0x01,
423 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
424 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
425 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
426 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
427 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
428 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55,
429 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63,
430 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71,
431 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
432 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d,
433 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
434 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9,
435 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
436 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5,
437 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3,
438 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1,
439 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
440 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd,
441 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
442 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
443 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
444 0x29, 0x2a, 0x2b, 0x2c,
541 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
545 0x0c, 0x00, 0x09, 0x00, 0x02, 0x01, 0x00, 0x01,
546 0x03, 0x00, 0x06, 0x00, 0x00, 0x02, 0x83, 0x00,
547 0x0a, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00,
595 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
596 msg2->SetHopCount(1);
600 0x0c, 0x00, 0x0a, 0x00, 0x02, 0x01, 0x00, 0x01,
601 0x03, 0x00, 0x06, 0x00, 0x00, 0x02, 0xa3, 0x00,
602 0x0b, 0x0a, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
651 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
652 msg2->SetHopLimit(255);
653 msg2->SetHopCount(1);
657 0x0c, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03,
658 0x00, 0x06, 0x00, 0x00, 0x02, 0xe3, 0x00,
659 0x0c, 0x0a, 0x00, 0x00, 0x01, 0xff, 0x01, 0x00, 0x00,
709 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
710 msg2->SetHopLimit(255);
711 msg2->SetHopCount(1);
712 msg2->SetSequenceNumber(12345);
716 0x0c, 0x00, 0x0c, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x06,
717 0x00, 0x00, 0x02, 0xf3, 0x00,
718 0x0e, 0x0a, 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00,
768 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
769 msg2->SetHopLimit(255);
770 msg2->SetHopCount(1);
771 msg2->SetSequenceNumber(12345);
775 0x0c, 0x00, 0x0d, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x06,
776 0x00, 0x00, 0x02, 0xf3, 0x00,
777 0x0e, 0x0a, 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00,
829 msg1tlv1->SetType(1);
830 msg1->TlvPushBack(msg1tlv1);
836 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
837 msg2->SetHopLimit(255);
838 msg2->SetHopCount(1);
839 msg2->SetSequenceNumber(12345);
843 0x0c, 0x00, 0x0e, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
844 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x0e, 0x0a,
845 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00,
901 msg1tlv1->SetType(1);
902 msg1->TlvPushBack(msg1tlv1);
908 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
909 msg2->SetHopLimit(255);
910 msg2->SetHopCount(1);
911 msg2->SetSequenceNumber(12345);
915 msg2->AddressBlockPushBack(msg2a1);
920 0x0c, 0x00, 0x0f, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
921 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x16, 0x0a,
922 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x01,
923 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
979 msg1tlv1->SetType(1);
980 msg1->TlvPushBack(msg1tlv1);
986 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
987 msg2->SetHopLimit(255);
988 msg2->SetHopCount(1);
989 msg2->SetSequenceNumber(12345);
992 msg2a1->AddressPushBack(
Ipv4Address(
"255.255.255.255"));
993 msg2->AddressBlockPushBack(msg2a1);
998 0x0c, 0x00, 0x10, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
999 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x16, 0x0a,
1000 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x01,
1001 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
1057 msg1tlv1->SetType(1);
1058 msg1->TlvPushBack(msg1tlv1);
1064 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1065 msg2->SetHopLimit(255);
1066 msg2->SetHopCount(1);
1067 msg2->SetSequenceNumber(12345);
1071 msg2->AddressBlockPushBack(msg2a1);
1075 uint8_t buffer[] = {
1076 0x0c, 0x00, 0x11, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
1077 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x16, 0x0a,
1078 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x01,
1079 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
1135 msg1tlv1->SetType(1);
1136 msg1->TlvPushBack(msg1tlv1);
1142 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1143 msg2->SetHopLimit(255);
1144 msg2->SetHopCount(1);
1145 msg2->SetSequenceNumber(12345);
1149 msg2->AddressBlockPushBack(msg2a1);
1153 uint8_t buffer[] = {
1154 0x0c, 0x00, 0x12, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
1155 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x16, 0x0a,
1156 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x01,
1157 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
1213 msg1tlv1->SetType(1);
1214 msg1->TlvPushBack(msg1tlv1);
1220 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1221 msg2->SetHopLimit(255);
1222 msg2->SetHopCount(1);
1223 msg2->SetSequenceNumber(12345);
1227 msg2->AddressBlockPushBack(msg2a1);
1231 uint8_t buffer[] = {
1232 0x0c, 0x00, 0x13, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
1233 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x16, 0x0a,
1234 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x01,
1235 0x00, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00,
1292 msg1tlv1->SetType(1);
1293 msg1->TlvPushBack(msg1tlv1);
1299 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1300 msg2->SetHopLimit(255);
1301 msg2->SetHopCount(1);
1302 msg2->SetSequenceNumber(12345);
1307 msg2->AddressBlockPushBack(msg2a1);
1311 uint8_t buffer[] = {
1312 0x0c, 0x00, 0x14, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00,
1313 0x08, 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x18, 0x0a,
1314 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02,
1315 0x80, 0x03, 0x0a, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
1372 msg1tlv1->SetType(1);
1373 msg1->TlvPushBack(msg1tlv1);
1379 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1380 msg2->SetHopLimit(255);
1381 msg2->SetHopCount(1);
1382 msg2->SetSequenceNumber(12345);
1387 msg2->AddressBlockPushBack(msg2a1);
1391 uint8_t buffer[] = {
1392 0x0c, 0x00, 0x15, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08,
1393 0x00, 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x1a, 0x0a,
1394 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0,
1395 0x01, 0x0a, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
1457 msg1tlv1->SetType(1);
1458 msg1->TlvPushBack(msg1tlv1);
1464 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1465 msg2->SetHopLimit(255);
1466 msg2->SetHopCount(1);
1467 msg2->SetSequenceNumber(12345);
1472 msg2->AddressBlockPushBack(msg2a1);
1477 msg2->AddressBlockPushBack(msg2a2);
1481 uint8_t buffer[] = {
1482 0x0c, 0x00, 0x16, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00, 0x02, 0x01,
1483 0x00, 0x02, 0xf3, 0x00, 0x21, 0x0a,
1484 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01, 0x0a, 0x01,
1485 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x20, 0x03, 0x0a, 0x0b, 0x00, 0x00,
1549 msg1tlv1->SetType(1);
1550 msg1->TlvPushBack(msg1tlv1);
1556 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1557 msg2->SetHopLimit(255);
1558 msg2->SetHopCount(1);
1559 msg2->SetSequenceNumber(12345);
1564 msg2->AddressBlockPushBack(msg2a1);
1572 msg2a2->PrefixPushBack(32);
1573 msg2a2->PrefixPushBack(32);
1574 msg2a2->PrefixPushBack(16);
1575 msg2a2->PrefixPushBack(24);
1577 msg2->AddressBlockPushBack(msg2a2);
1581 uint8_t buffer[] = {
1582 0x0c, 0x00, 0x17, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00,
1583 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x32, 0x0a,
1584 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01,
1585 0x0a, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x08, 0x0a,
1586 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a,
1587 0x00, 0x00, 0x06, 0x20, 0x20, 0x10, 0x18, 0x00, 0x00,
1654 msg1tlv1->SetType(1);
1655 msg1->TlvPushBack(msg1tlv1);
1661 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1662 msg2->SetHopLimit(255);
1663 msg2->SetHopCount(1);
1664 msg2->SetSequenceNumber(12345);
1669 msg2->AddressBlockPushBack(msg2a1);
1677 msg2a2->PrefixPushBack(32);
1678 msg2a2->PrefixPushBack(32);
1679 msg2a2->PrefixPushBack(16);
1680 msg2a2->PrefixPushBack(24);
1683 msg2a2tlv1->SetType(1);
1684 msg2a2->TlvPushBack(msg2a2tlv1);
1686 msg2->AddressBlockPushBack(msg2a2);
1690 uint8_t buffer[] = {
1691 0x0c, 0x00, 0x18, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00,
1692 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x34, 0x0a,
1693 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01,
1694 0x0a, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x08, 0x0a,
1695 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a,
1696 0x00, 0x00, 0x06, 0x20, 0x20, 0x10, 0x18, 0x00, 0x02, 0x01, 0x00,
1764 msg1tlv1->SetType(1);
1765 msg1->TlvPushBack(msg1tlv1);
1771 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1772 msg2->SetHopLimit(255);
1773 msg2->SetHopCount(1);
1774 msg2->SetSequenceNumber(12345);
1779 msg2->AddressBlockPushBack(msg2a1);
1787 msg2a2->PrefixPushBack(32);
1788 msg2a2->PrefixPushBack(32);
1789 msg2a2->PrefixPushBack(16);
1790 msg2a2->PrefixPushBack(24);
1793 msg2a2tlv1->SetType(1);
1794 msg2a2tlv1->SetIndexStart(1);
1795 msg2a2->TlvPushBack(msg2a2tlv1);
1797 msg2->AddressBlockPushBack(msg2a2);
1801 uint8_t buffer[] = {
1802 0x0c, 0x00, 0x19, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00,
1803 0x02, 0x01, 0x00, 0x02, 0xf3, 0x00, 0x35, 0x0a,
1804 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01,
1805 0x0a, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x08, 0x0a,
1806 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a,
1807 0x00, 0x00, 0x06, 0x20, 0x20, 0x10, 0x18, 0x00, 0x03, 0x01, 0x40, 0x01,
1876 msg1tlv1->SetType(1);
1877 msg1->TlvPushBack(msg1tlv1);
1883 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1884 msg2->SetHopLimit(255);
1885 msg2->SetHopCount(1);
1886 msg2->SetSequenceNumber(12345);
1891 msg2->AddressBlockPushBack(msg2a1);
1899 msg2a2->PrefixPushBack(32);
1900 msg2a2->PrefixPushBack(32);
1901 msg2a2->PrefixPushBack(16);
1902 msg2a2->PrefixPushBack(24);
1905 msg2a2tlv1->SetType(1);
1906 msg2a2tlv1->SetIndexStart(1);
1907 msg2a2tlv1->SetIndexStop(3);
1908 msg2a2->TlvPushBack(msg2a2tlv1);
1910 msg2->AddressBlockPushBack(msg2a2);
1914 uint8_t buffer[] = {
1915 0x0c, 0x00, 0x1a, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00, 0x02,
1916 0x01, 0x00, 0x02, 0xf3, 0x00, 0x36, 0x0a,
1917 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01, 0x0a,
1918 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x08, 0x0a, 0x00, 0x00,
1919 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00, 0x06,
1920 0x20, 0x20, 0x10, 0x18, 0x00, 0x04, 0x01, 0x20, 0x01, 0x03,
1989 msg1tlv1->SetType(1);
1990 msg1->TlvPushBack(msg1tlv1);
1996 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
1997 msg2->SetHopLimit(255);
1998 msg2->SetHopCount(1);
1999 msg2->SetSequenceNumber(12345);
2004 msg2->AddressBlockPushBack(msg2a1);
2012 msg2a2->PrefixPushBack(32);
2013 msg2a2->PrefixPushBack(32);
2014 msg2a2->PrefixPushBack(16);
2015 msg2a2->PrefixPushBack(24);
2018 msg2a2tlv1->SetType(1);
2019 msg2a2tlv1->SetIndexStart(1);
2020 msg2a2tlv1->SetIndexStop(3);
2022 uint8_t
value[] = {1, 2, 3};
2024 msg2a2tlv1->SetMultivalue(
true);
2026 msg2a2->TlvPushBack(msg2a2tlv1);
2028 msg2->AddressBlockPushBack(msg2a2);
2032 uint8_t buffer[] = {
2033 0x0c, 0x00, 0x1b, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00, 0x02, 0x01,
2034 0x00, 0x02, 0xf3, 0x00, 0x3a, 0x0a,
2035 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01, 0x0a, 0x01,
2036 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x08, 0x0a, 0x00, 0x00, 0x00, 0x0b,
2037 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00, 0x06, 0x20, 0x20, 0x10,
2038 0x18, 0x00, 0x08, 0x01, 0x34, 0x01, 0x03, 0x03, 0x01, 0x02, 0x03,
2182 msg1tlv1->SetType(1);
2183 msg1->TlvPushBack(msg1tlv1);
2189 msg2->SetOriginatorAddress(
Ipv4Address(
"10.0.0.1"));
2190 msg2->SetHopLimit(255);
2191 msg2->SetHopCount(1);
2192 msg2->SetSequenceNumber(12345);
2197 msg2->AddressBlockPushBack(msg2a1);
2205 msg2a2->PrefixPushBack(32);
2206 msg2a2->PrefixPushBack(32);
2207 msg2a2->PrefixPushBack(16);
2208 msg2a2->PrefixPushBack(24);
2211 msg2a2tlv1->SetType(1);
2212 msg2a2tlv1->SetIndexStart(1);
2213 msg2a2tlv1->SetIndexStop(3);
2216 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
2217 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
2218 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
2219 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
2220 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
2221 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
2222 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61,
2223 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
2224 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d,
2225 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b,
2226 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
2227 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
2228 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5,
2229 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3,
2230 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1,
2231 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
2232 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed,
2233 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb,
2234 0xfc, 0xfd, 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
2235 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
2236 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
2237 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,
2241 msg2a2->TlvPushBack(msg2a2tlv1);
2243 msg2->AddressBlockPushBack(msg2a2);
2247 uint8_t buffer[] = {
2248 0x0c, 0x00, 0x1c, 0x00, 0x02, 0x01, 0x00, 0x01, 0x03, 0x00, 0x08, 0x00, 0x02, 0x01,
2249 0x00, 0x02, 0xf3, 0x01, 0x64, 0x0a,
2250 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00, 0x00, 0x02, 0xc0, 0x01, 0x0a, 0x01,
2251 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04, 0x08, 0x0a, 0x00, 0x00, 0x00, 0x0b,
2252 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a, 0x00, 0x00, 0x06, 0x20, 0x20, 0x10,
2253 0x18, 0x01, 0x32, 0x01, 0x38, 0x01, 0x03, 0x01, 0x2c, 0x00, 0x01, 0x02, 0x03, 0x04,
2254 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
2255 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
2256 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e,
2257 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
2258 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,
2259 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
2260 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
2261 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74,
2262 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82,
2263 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90,
2264 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e,
2265 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac,
2266 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba,
2267 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8,
2268 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,
2269 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4,
2270 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2,
2271 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x00, 0x01,
2272 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
2273 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
2274 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
2303 uint8_t buffer[] = {
2340 uint8_t buffer[] = {
2341 0x00, 0x01, 0x8f, 0x00, 0x16, 0xab, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00,
2342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
2376 m1->AddressBlockPushBack(m1a1);
2380 uint8_t buffer[] = {
2381 0x00, 0x01, 0x8f, 0x00, 0x2a, 0xab, 0xcd, 0x00, 0x00, 0x00, 0x00,
2382 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
2383 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2384 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
2420 m1->AddressBlockPushBack(m1a1);
2424 uint8_t buffer[] = {
2425 0x00, 0x01, 0x8f, 0x00, 0x2c, 0xab, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00,
2426 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02,
2427 0x80, 0x0f, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2428 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
2464 m1->AddressBlockPushBack(m1a1);
2468 uint8_t buffer[] = {
2469 0x00, 0x01, 0x8f, 0x00, 0x2d, 0xab, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00,
2470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02,
2471 0xc0, 0x0d, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2472 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00,
2513 m1->AddressBlockPushBack(m1a1);
2518 m1->AddressBlockPushBack(m1a2);
2522 uint8_t buffer[] = {
2523 0x00, 0x01, 0x8f, 0x00, 0x36, 0xab, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0xc0, 0x0d, 0x00, 0x10,
2525 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02,
2526 0x00, 0x11, 0x00, 0x00, 0x02, 0xa0, 0x01, 0x00, 0x0e, 0x10, 0x11, 0x00, 0x00,
2569 m1->AddressBlockPushBack(m1a1);
2576 m1a2->PrefixPushBack(128);
2577 m1a2->PrefixPushBack(128);
2578 m1a2->PrefixPushBack(64);
2579 m1a2->PrefixPushBack(48);
2580 m1->AddressBlockPushBack(m1a2);
2584 uint8_t buffer[] = {
2585 0x00, 0x01, 0x8f, 0x00, 0x73, 0xab, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2586 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0xc0, 0x0d,
2587 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2588 0x02, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x04, 0x88, 0x01, 0x00, 0x10, 0x00,
2589 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2590 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2591 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2592 0x00, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2593 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x40, 0x30, 0x00, 0x00,
2758 m1->TlvPushBack(m1tlv1);
2764 m2->SetHopLimit(255);
2766 m2->SetSequenceNumber(12345);
2771 m2->AddressBlockPushBack(m2a1);
2778 m2a2->PrefixPushBack(32);
2779 m2a2->PrefixPushBack(32);
2780 m2a2->PrefixPushBack(16);
2781 m2a2->PrefixPushBack(24);
2784 m2a2tlv1->SetType(1);
2785 m2a2tlv1->SetIndexStart(1);
2786 m2a2tlv1->SetIndexStop(3);
2789 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
2790 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
2791 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
2792 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
2793 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
2794 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
2795 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61,
2796 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
2797 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d,
2798 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b,
2799 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
2800 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
2801 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5,
2802 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3,
2803 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1,
2804 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
2805 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed,
2806 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb,
2807 0xfc, 0xfd, 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
2808 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
2809 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
2810 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,
2813 m2a2->TlvPushBack(m2a2tlv1);
2815 m2->AddressBlockPushBack(m2a2);
2825 m3->AddressBlockPushBack(m3a1);
2832 m3a2->PrefixPushBack(128);
2833 m3a2->PrefixPushBack(128);
2834 m3a2->PrefixPushBack(64);
2835 m3a2->PrefixPushBack(48);
2837 m3->AddressBlockPushBack(m3a2);
2840 uint8_t buffer[] = {
2841 0x0c, 0x00, 0x1d, 0x00, 0x02, 0x01, 0x00, 0x01, 0x0f, 0x00, 0x08, 0x00, 0x02, 0x01,
2842 0x00, 0x02, 0xf3, 0x01, 0x64, 0x0a, 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00,
2843 0x00, 0x02, 0xc0, 0x01, 0x0a, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04,
2844 0x08, 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a,
2845 0x00, 0x00, 0x06, 0x20, 0x20, 0x10, 0x18, 0x01, 0x32, 0x01, 0x38, 0x01, 0x03, 0x01,
2846 0x2c, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
2847 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
2848 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
2849 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
2850 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44,
2851 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
2852 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60,
2853 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
2854 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c,
2855 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a,
2856 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
2857 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
2858 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
2859 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2,
2860 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0,
2861 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde,
2862 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec,
2863 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa,
2864 0xfb, 0xfc, 0xfd, 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
2865 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
2866 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
2867 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x01, 0x8f, 0x00, 0x73, 0xab, 0xcd, 0x00,
2868 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
2869 0x00, 0x02, 0xc0, 0x0d, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2870 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x04, 0x88, 0x01, 0x00,
2871 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2872 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2873 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2874 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2875 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x40, 0x30, 0x00, 0x00,
3040 m1->TlvPushBack(m1tlv1);
3046 m2->SetHopLimit(255);
3048 m2->SetSequenceNumber(12345);
3053 m2->AddressBlockPushBack(m2a1);
3060 m2a2->PrefixPushBack(32);
3061 m2a2->PrefixPushBack(32);
3062 m2a2->PrefixPushBack(16);
3063 m2a2->PrefixPushBack(24);
3066 m2a2tlv1->SetType(1);
3067 m2a2tlv1->SetIndexStart(1);
3068 m2a2tlv1->SetIndexStop(3);
3071 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
3072 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
3073 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
3074 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
3075 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45,
3076 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53,
3077 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61,
3078 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
3079 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d,
3080 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b,
3081 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
3082 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
3083 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5,
3084 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3,
3085 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1,
3086 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
3087 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed,
3088 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb,
3089 0xfc, 0xfd, 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
3090 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
3091 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
3092 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,
3095 m2a2->TlvPushBack(m2a2tlv1);
3097 m2->AddressBlockPushBack(m2a2);
3107 m3->AddressBlockPushBack(m3a1);
3114 m3a2->PrefixPushBack(128);
3115 m3a2->PrefixPushBack(128);
3116 m3a2->PrefixPushBack(64);
3117 m3a2->PrefixPushBack(48);
3119 m3->AddressBlockPushBack(m3a2);
3122 uint8_t buffer[] = {
3123 0x0c, 0x00, 0x1e, 0x00, 0x02, 0x01, 0x00, 0x01, 0x0f, 0x00, 0x08, 0x00, 0x02, 0x01,
3124 0x00, 0x02, 0xf3, 0x01, 0x64, 0x0a, 0x00, 0x00, 0x01, 0xff, 0x01, 0x30, 0x39, 0x00,
3125 0x00, 0x02, 0xc0, 0x01, 0x0a, 0x01, 0x02, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x04,
3126 0x08, 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x05, 0x0a,
3127 0x00, 0x00, 0x06, 0x20, 0x20, 0x10, 0x18, 0x01, 0x32, 0x01, 0x38, 0x01, 0x03, 0x01,
3128 0x2c, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c,
3129 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
3130 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
3131 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
3132 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44,
3133 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52,
3134 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60,
3135 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
3136 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c,
3137 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a,
3138 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
3139 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
3140 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
3141 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2,
3142 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0,
3143 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde,
3144 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec,
3145 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa,
3146 0xfb, 0xfc, 0xfd, 0xfe, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
3147 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
3148 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
3149 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x01, 0x8f, 0x00, 0x73, 0xab, 0xcd, 0x00,
3150 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
3151 0x00, 0x02, 0xc0, 0x0d, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3152 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x04, 0x88, 0x01, 0x00,
3153 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3154 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3155 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3156 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3157 0x00, 0x00, 0x00, 0x06, 0x80, 0x80, 0x40, 0x30, 0x00, 0x00,
void DoRun() override
Implementation to actually run this TestCase.
void TestDeserialize()
Deserialization.
Ptr< PbbPacket > m_refPacket
Reference packet.
void TestSerialize()
Serialization.
Buffer m_refBuffer
Reference buffer.
PbbTestCase(std::string name, Ptr< PbbPacket > packet, uint8_t *buffer, uint32_t size)
Constructor.
void Write(const uint8_t *buffer, uint32_t size)
automatically resized byte buffer
void AddAtStart(uint32_t start)
Buffer::Iterator Begin() const
const uint8_t * PeekData() const
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
void TlvPushBack(Ptr< PbbTlv > tlv)
Appends a packet TLV to the back of this packet.
void MessagePushBack(Ptr< PbbMessage > message)
Appends a message to the back of this packet.
void SetSequenceNumber(uint16_t number)
Sets the sequence number of this packet.
uint32_t GetSerializedSize() const override
void Serialize(Buffer::Iterator start) const override
Serializes this packet into the specified buffer.
uint32_t Deserialize(Buffer::Iterator start) override
Deserializes a packet from the specified buffer.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
const double m1
First component modulus, 232 - 209.
const double m2
Second component modulus, 232 - 22853.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static PbbTestSuite pbbTestSuite
Static variable for test initialization.