aboutsummaryrefslogtreecommitdiffstats
path: root/metis/ccnx/forwarder/metis/testdata/metis_TestDataV1.h
blob: 2bcf4fe40f0a30493de92efd67443eb855864a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
/*
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file metis_TestDataV1
 * @brief v1 schema test packets
 *
 * Test vectors of V1 schema packets.
 *
 */

#ifndef Metis_metis_TestDataV1_h
#define Metis_metis_TestDataV1_h

// =======================
// Interests

__attribute__((unused))
static uint8_t metisTestDataV1_Interest_AllFields[] = {
    0x01, 0x00, 0x00, 100, // ver = 1, type = interest, length = 100
    0x20, 0x00, 0x11, 14,  // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,   // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 82,  // type = interest, length = 82
    // ------------------------
    0x00, 0x00, 0x00, 8,   // type = name, length = 8
    0x00, 0x02, 0x00, 4,   // type = binary, length = 4
    'c',  'o',  'o',  'l', // "cool"
    // ------------------------
    0x00, 0x02, 0x00, 16,  // type = keyid restriction, length = 16
    0xa0, 0xa1, 0xa2, 0xa3,
    0xa4, 0xa5, 0xa6, 0xa7,
    0xa8, 0xa9, 0xaa, 0xab,
    0xac, 0xad, 0xae, 0xaf,
    // ------------------------
    0x00, 0x03, 0x00, 32,  // type = hash restriction, length = 32
    0xb0, 0xb1, 0xb2, 0xb3,
    0xb4, 0xb5, 0xb6, 0xb7,
    0xb8, 0xb9, 0xba, 0xbb,
    0xbc, 0xbd, 0xbe, 0xbf,
    0xc0, 0xc1, 0xc2, 0xc3,
    0xc4, 0xc5, 0xc6, 0xc7,
    0xc8, 0xc9, 0xca, 0xcb,
    0xcc, 0xcd, 0xce, 0xcf,
    // ------------------------
    0x00, 0x04, 0x00, 1,   // Interest payload method (1 byte)
    0x00,
    // ------------------------
    0x00, 0x01, 0x00, 5,   // type = payload, length = 5
    0xD0, 0xD1, 0xD2, 0xD3,
    0xD4,
};

__attribute__((unused))
static uint8_t metisTestDataV1_Interest_NameA_Crc32c[] = {
    0x01, 0x00, 0x00, 65,  // ver = 1, type = interest, length = 65
    0x20, 0x00, 0x00, 24,  // HopLimit = 32, reserved = 0, header length = 24
    // ------------------------
    0x00, 0x03, 0x00, 12,  // Interest Fragment
    0x01, 0x02, 0x03, 0x04,
    0x05, 0x06, 0x07, 0x08, // fragment 0x0102030405060708
    0x05, 0xDC, 0x00, 0x00, // MTU 1500, fragcnt 0, fragnum 0
    // ------------------------
    0x00, 0x01, 0x00, 0x15, // type = interest, length = 21
    // ------------------------
    0x00, 0x00, 0x00, 0x11, // type = name, length = 17
    0x00, 0x02, 0x00, 0x05, // type = binary, length = 5
    'h',  'e',  'l',  'l', // "hello"
    'o',
    0xF0, 0x00, 0x00, 0x04, // type = app, length = 4
    'o',  'u',  'c',  'h', // "ouch"
    // ------------------------
    0x00, 0x03, 0x00, 4,   // validation alg, length = 4
    0x00, 0x02, 0x00, 0x00, // CRC32C
    // ------------------------
    0x00, 0x04, 0x00, 4,   // validation payload
    0x6A, 0xD7, 0xB1, 0xF2      // 6AD7B1F2
};

__attribute__((unused))
static uint8_t metisTestDataV1_Interest_NameAAndKeyId[] = {
    0x01, 0x00, 0x00, 89,  // ver = 1, type = interest, length = 73
    0x20, 0x00, 0x11, 14,  // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,   // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 71,  // type = interest, length = 55
    // ------------------------
    0x00, 0x00, 0x00, 0x11, // type = name, length = 17
    0x00, 0x02, 0x00, 0x05, // type = binary, length = 5
    'h',  'e',  'l',  'l', // "hello"
    'o',
    0xF0, 0x00, 0x00, 0x04, // type = app, length = 4
    'o',  'u',  'c',  'h', // "ouch"
    // ------------------------
    0x00, 0x02, 0x00, 32,  // type = keyid restriction, length = 32
    0x5c, 0x23, 0x4c, 0x28,
    0x50, 0xda, 0x20, 0x7b,
    0x88, 0x25, 0x8b, 0xf3,
    0x62, 0x61, 0x96, 0xd8,
    0xf0, 0x60, 0x76, 0x38,
    0xa2, 0xd4, 0xe0, 0xe2,
    0x49, 0xb2, 0xa9, 0xaf,
    0xce, 0xb8, 0x85, 0x59,
    // ------------------------
    0x00, 0x04, 0x00, 1,   // Interest payload method (1 byte)
    0x00,
    // ------------------------
    0x00, 0x01, 0x00, 5,   // type = payload, length = 5
    0xD0, 0xD1, 0xD2, 0xD3,
    0xD4,
};


// ===========================
// Content Objects

__attribute__((unused))
static uint8_t metisTestDataV1_ContentObject_NameA_Crc32c[] = {
    0x01, 0x01, 0x00, 85,  // ver = 1, type = content object, length = 85
    0x00, 0x00, 0x00, 44,  // HopLimit = 31, reserved = 0, header length = 44
    // ------------------------
    0x00, 0x04, 0x00, 20,  // ContentObject Fragment, length = 20
    0x12, 0x23, 0x34, 0x45,
    0x56, 0x67, 0x78, 0x89, // fragid 0x1223344556677889
    0x05, 0xDC, 0x01, 0x00, // MTU 1500, fragcnt 1, fragnum 0
    0x01, 0x02, 0x03, 0x04,
    0x05, 0x06, 0x07, 0x08, // interest fragment 0x0102030405060708
    // ------------------------
    0x00, 0x02, 0x00, 8,   // Recommended Cache Time
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x6D, 0xDD, 0x00, // 2 hours (0x6DDD00 milli seconds)
    // ------------------------
    0x00, 0x02, 0x00, 21,  // type = content object, length = 21
    // ------------------------
    0x00, 0x00, 0x00, 0x11, // type = name, length = 17
    0x00, 0x02, 0x00, 0x05, // type = binary, length = 5
    'h',  'e',  'l',  'l', // "hello"
    'o',
    0xF0, 0x00, 0x00, 0x04, // type = app, length = 4
    'o',  'u',  'c',  'h', // "ouch"
    // ------------------------
    0x00, 0x03, 0x00, 4,   // validation alg, length = 4
    0x00, 0x02, 0x00, 0x00, // CRC32C
    // ------------------------
    0x00, 0x04, 0x00, 4,   // validation payload
    0x2C, 0x3C, 0xC0, 0xAF      // 2C3CC0AF
};

__attribute__((unused))
static uint8_t metisTestDataV1_ContentObject_NameA_KeyId1_RsaSha256[] = {
    0x01, 0x01, 0x01, 0xB4, // ver = 1, type = content object, length = 436
    0x00, 0x00, 0x00, 32,  // HopLimit = 0, reserved = 0, header length = 32
    // ------------------------
    0x00, 0x04, 0x00, 20,  // ContentObject Fragment, length = 20
    0x12, 0x23, 0x34, 0x45,
    0x56, 0x67, 0x78, 0x89, // fragid 0x1223344556677889
    0x05, 0xDC, 0x01, 0x00, // MTU 1500, fragcnt 1, fragnum 0
    0x01, 0x02, 0x03, 0x04,
    0x05, 0x06, 0x07, 0x08, // interest fragment 0x0102030405060708
    // ------------------------
    0x00, 0x02, 0x00, 58,  // type = content object, length = 58
    // ------------------------
    0x00, 0x00, 0x00, 17,  // type = name, length = 17
    0x00, 0x02, 0x00, 0x05, // type = binary, length = 5
    'h',  'e',  'l',  'l', // "hello"
    'o',
    0xF0, 0x00, 0x00, 0x04, // type = app, length = 4
    'o',  'u',  'c',  'h', // "ouch"
    // ------------------------
    0x00, 0x05, 0x00, 1,   // PayloadType
    1,    // type 1 = key
    0x00, 0x06, 0x00, 0x08, // expiry time in msec
    0x00, 0x00, 0x01, 0x43, // 1,388,534,400,000 msec
    0x4B, 0x19, 0x84, 0x00,
    0x00, 0x19, 0x00, 4,   // end chunk number
    0x06, 0x05, 0x04, 0x03,
    // ------------------------
    0x00, 0x01, 0x00, 8,   // paylaod, length = 8
    0x73, 0x75, 0x72, 0x70,
    0x72, 0x69, 0x73, 0x65,
    // ------------------------
    0x00, 0x03, 0x00, 206, // validation alg, length = 206
    0x00, 0x06, 0x00, 202, // RSA-SHA256, length = 162 + 4 + 32 + 4 = 202
    0x00, 0x09, 0x00, 32,  // type = keyid, length = 32
    0x5c, 0x23, 0x4c, 0x28,
    0x50, 0xda, 0x20, 0x7b,
    0x88, 0x25, 0x8b, 0xf3,
    0x62, 0x61, 0x96, 0xd8,
    0xf0, 0x60, 0x76, 0x38,
    0xa2, 0xd4, 0xe0, 0xe2,
    0x49, 0xb2, 0xa9, 0xaf,
    0xce, 0xb8, 0x85, 0x59,
    0x00, 0x0B, 0x00, 162, // public key, length = 162
    0x30, 0x81, 0x9f, 0x30,0x0d,  0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
    0x0d, 0x01, 0x01, 0x01,0x05,  0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81,
    0x89, 0x02, 0x81, 0x81,0x00,  0xa7, 0xd6, 0x93, 0xc5, 0xf1, 0x73, 0xc6,
    0x12, 0xb5, 0xfa, 0x79,0xc5,  0xef, 0x18, 0x8b, 0xef, 0xaa, 0xcd, 0x04,
    0x01, 0x8f, 0x83, 0x77,0x3f,  0xb1, 0x66, 0xa1, 0x5a, 0xb9, 0x39, 0x2a,
    0xb2, 0x3e, 0x30, 0xfb,0x11,  0xfc, 0x57, 0xfc, 0x9d, 0xd1, 0x2f, 0x77,
    0xf0, 0xab, 0x77, 0xad,0x66,  0x2c, 0x26, 0xc8, 0x9b, 0x51, 0x6f, 0x69,
    0xbf, 0x26, 0x10, 0x06,0x29,  0xee, 0xcb, 0xb0, 0x2c, 0x5e, 0x91, 0x0e,
    0x24, 0x42, 0x8d, 0xe6,0x75,  0xa0, 0x4e, 0x04, 0x43, 0x0c, 0x3e, 0x4c,
    0x06, 0x74, 0x67, 0xad,0x84,  0xc3, 0xe8, 0xf4, 0xc5, 0x94, 0x73, 0xc4,
    0x9f, 0x25, 0xa8, 0x42,0x06,  0xbf, 0x45, 0x19, 0xe2, 0x98, 0x1c, 0x36,
    0xa1, 0x43, 0x4d, 0x9b,0x71,  0x08, 0xe1, 0x82, 0xdf, 0xe2, 0x4f, 0x2a,
    0x3c, 0x3d, 0x0f, 0x35,0x92,  0xae, 0x70, 0x27, 0xfb, 0xd2, 0xe4, 0x1e,
    0x27, 0x02, 0x03, 0x01,0x00,  0x01,
    // ------------------------
    0x00, 0x04, 0x00, 128, // validation payload, length = 128
    0x03, 0x46, 0xee, 0xb7,0x30,  0x1c, 0xea, 0x13, 0x0c, 0xce, 0x83, 0x5b,
    0x7b, 0x4f, 0xf5, 0x83,0x37,  0x08, 0x7f, 0xe0, 0xe1, 0xc9, 0x70, 0x09,
    0x5e, 0xc2, 0x1c, 0xd3,0x74,  0xbb, 0xbd, 0x72, 0x35, 0xa4, 0x1b, 0x0f,
    0x3d, 0x04, 0x5e, 0xf7,0xc1,  0xdf, 0xea, 0xc3, 0x50, 0x47, 0x14, 0xf9,
    0xb7, 0xbb, 0x42, 0xf9,0x3e,  0xaa, 0x49, 0xd2, 0x9f, 0xd1, 0xab, 0xf6,
    0xda, 0x32, 0x4a, 0xb1,0xb9,  0x69, 0x91, 0x57, 0x43, 0x5d, 0x06, 0xcf,
    0x1d, 0x9f, 0x7c, 0x28,0xee,  0x35, 0xaa, 0xd0, 0xb2, 0x8d, 0x34, 0x09,
    0xcd, 0xdb, 0x01, 0xf7,0xda,  0xe8, 0x59, 0x98, 0x4e, 0x59, 0xfa, 0x13,
    0xd0, 0xd1, 0x54, 0x8e,0x64,  0x8c, 0xc6, 0xd7, 0x6b, 0xc5, 0x89, 0xeb,
    0x37, 0x8f, 0x53, 0x04,0xba,  0x03, 0x05, 0xb4, 0x67, 0x73, 0xe1, 0x51,
    0x59, 0x12, 0xbc, 0x25,0xaa,  0xa2, 0xc1, 0x18
};

__attribute__((unused))
static uint8_t metisTestDataV1_CPI_AddRoute_Crc32c[] = "\x01\xA4\x00\xB7"
                                                       "\x00\x00\x00\x08"
                                                       "\xBE\xEF\x00\x9A"
                                                       "{\"CPI_REQUEST\":{\"SEQUENCE\":22,\"REGISTER\":{\"PREFIX\":\"lci:/howdie/stranger\",\"INTERFACE\":55,\"FLAGS\":0,\"PROTOCOL\":\"STATIC\",\"ROUTETYPE\":\"LONGEST\",\"COST\":200}}}"
                                                       "\x00\x03\x00\x04"
                                                       "\x00\x02\x00\x00"
                                                       "\x00\x04\x00\x04"
                                                       "\x78\xfd\x92\x6a";

// ===============================================
// HopByHop Fragments
// These fragments together make a small Interest packet.

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_Begin[] = {
    0x01, 4,    0x00, 20,       // ver = 1, type = hop-by-hop frag, length = 20
    0x40, 0x00, 0x01, 8,        // B, seqnum = 1, header length = 8
    // ------------------------
    0x00, 0x05, 0x00, 8,        // Interest Fragment
    // ------------------------
    0x01, 0x00, 0x00, 24,       // ver = 1, type = interest, length = 24
    0x20, 0x00, 0x11, 8,        // HopLimit = 32, reserved = 0, flags = 0x11, header length = 8
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_Begin_Fragment[] = {
    0x01, 0x00, 0x00, 24,       // ver = 1, type = interest, length = 24
    0x20, 0x00, 0x11, 8,        // HopLimit = 32, reserved = 0, flags = 0x11, header length = 8
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_Middle[] = {
    0x01, 4,    0x00, 16,       // ver = 1, type = hop-by-hop frag, length = 16
    0x00, 0x00, 0x02, 8,        // no flag, seqnum = 2, header length = 8
    // ------------------------
    0x00, 0x05, 0x00, 4,        // Interest Fragment
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_Middle_Fragment[] = {
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_End[] = {
    0x01, 4,    0x00, 24,       // ver = 1, type = hop-by-hop frag, length = 24
    0x20, 0x00, 0x03, 8,        // E, seqnum = 3, header length = 8
    // ------------------------
    0x00, 0x05, 0x00, 12,       // Interest Fragment
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_End_Fragment[] = {
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_BeginEnd[] = {
    0x01, 4,    0x00, 36,       // ver = 1, type = hop-by-hop frag, length = 36
    0x60, 0x00, 0x04, 8,        // B, seqnum = 4, header length = 8
    // ------------------------
    0x00, 0x05, 0x00, 24,       // Interest Fragment
    // ------------------------
    0x01, 0x00, 0x00, 24,       // ver = 1, type = interest, length = 24
    0x20, 0x00, 0x11, 8,        // HopLimit = 32, reserved = 0, flags = 0x11, header length = 8
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_BeginEnd_Fragment[] = {
    0x01, 0x00, 0x00, 24,       // ver = 1, type = interest, length = 24
    0x20, 0x00, 0x11, 8,        // HopLimit = 32, reserved = 0, flags = 0x11, header length = 8
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

__attribute__((unused))
static uint8_t metisTestDataV1_HopByHopFrag_Idle[] = {
    0x01, 4,    0x00, 8,        // ver = 1, type = hop-by-hop frag, length = 16
    0x10, 0x00, 0x05, 8,        // B, seqnum = 1, header length = 8
};

// ===============================================
// Ethernet padded interest

__attribute__((unused))
static uint8_t metisTestDataV1_InterestWithEthernetPadding[] = {
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,   // dmac
    0x00, 0x11, 0x22, 0x33, 0x44, 0x55,   // smac
    0x08, 0x01, // ethertype
    0x01, 0x00, 0x00, 0x18, // ver = 1, len = 24
    0xfe, 0x00, 0x00, 0x08, // hoplimit = 254, header length = 8
    0x00, 0x01, 0x00, 0x0c, // interest
    0x00, 0x00, 0x00, 0x08, // name
    0x00, 0x01, 0x00, 0x04, // name component
    0x64, 0x61, 0x74, 0x65, // "date"
    0x00, 0x00, 0x00, 0x00, // ethernet padding
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00,
    0x00, 0x00
};

__attribute__((unused))
static uint8_t metisTestDataV1_InterestWithEthernetPaddingStripped[] = {
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,   // dmac
    0x00, 0x11, 0x22, 0x33, 0x44, 0x55,   // smac
    0x08, 0x01, // ethertype
    0x01, 0x00, 0x00, 0x18, // ver = 1, len = 24
    0xfe, 0x00, 0x00, 0x08, // hoplimit = 254, header length = 8
    0x00, 0x01, 0x00, 0x0c, // interest
    0x00, 0x00, 0x00, 0x08, // name
    0x00, 0x01, 0x00, 0x04, // name component
    0x64, 0x61, 0x74, 0x65, // "date"
};

// ===============================================
// Error frames for coding violation testing

// Less than fixed header size
__attribute__((unused))
static uint8_t metisTestDataV1_Runt[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11
};

// Version Unknown
__attribute__((unused))
static uint8_t metisTestDataV1_BadVersion[] = {
    0xFF, 0x00, 0x00, 30,       // ver = 255 (bad), type = interest, length = 30
    0x20, 0x00, 0x11, 14,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// PacketType Unknown
__attribute__((unused))
static uint8_t metisTestDataV1_BadPacketType[] = {
    0x01, 0x77, 0x00, 30,       // ver = 1, type = 77 (bad), length = 30
    0x20, 0x00, 0x11, 14,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// packet length less than fixed header length
__attribute__((unused))
static uint8_t metisTestDataV1_PacketLengthLessFixedHeaderLength[] = {
    0x01, 0x00, 0x00, 6,        // ver = 1, type = interest, length = 6 (too short)
    0x20, 0x00, 0x11, 14,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// packet length less than fixed header length
__attribute__((unused))
static uint8_t metisTestDataV1_PacketLengthLessBeyondEnd[] = {
    0x01, 0x00, 0x00, 40,       // ver = 1, type = interest, length = 40 (beyond end of frame)
    0x20, 0x00, 0x11, 14,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};


// header length less than fixed header length
__attribute__((unused))
static uint8_t metisTestDataV1_HeaderLengthLessFixedHeaderLength[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 7,        // HopLimit = 32, reserved = 0, flags = 0x11, header length = 7
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// header length less than actual header length
__attribute__((unused))
static uint8_t metisTestDataV1_HeaderLengthTooShort[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 13,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 13 (1 byte too short)
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// header length less than actual header length
__attribute__((unused))
static uint8_t metisTestDataV1_HeaderLengthTooLong[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 16,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 16 (2 bytes too long)
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// header length swallows whole message
__attribute__((unused))
static uint8_t metisTestDataV1_HeaderLengthWholePacket[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 30,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 30
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};

// header length beyond end of frame
__attribute__((unused))
static uint8_t metisTestDataV1_HeaderLengthBeyondEnd[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 40,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 40
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};


// packet length less than optional header length
__attribute__((unused))
static uint8_t metisTestDataV1_PacketLengthLessHeaderLength[] = {
    0x01, 0x00, 0x00, 12,       // ver = 1, type = interest, length = 12 (past fixed header, less than optional header)
    0x20, 0x00, 0x11, 14,       // HopLimit = 32, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 12,       // type = interest, length = 12
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4
    'c',  'o',  'o',  'l',      // "cool"
};


// T_INTEREST length too long
__attribute__((unused))
static uint8_t metisTestDataV1_Interest_MessageLengthTooLong[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 14,       // HopLimit = 31, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 13,       // type = interest, length = 13 (1 byte too far)
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4 (this goes beyond the T_INTEREST length)
    'c',  'o',  'o',  'l',      // "cool"
};


// T_INTEREST length too short
__attribute__((unused))
static uint8_t metisTestDataV1_Interest_MessageLengthTooShort[] = {
    0x01, 0x00, 0x00, 30,       // ver = 1, type = interest, length = 30
    0x20, 0x00, 0x11, 14,       // HopLimit = 31, reserved = 0, flags = 0x11, header length = 14
    // ------------------------
    0x00, 0x01, 0x00, 2,        // Interest Lifetime (2 bytes)
    0xEA, 0xEB,
    // ------------------------
    0x00, 0x01, 0x00, 11,       // type = interest, length = 11 (1 byte too short)
    // ------------------------
    0x00, 0x00, 0x00, 8,        // type = name, length = 8
    0x00, 0x02, 0x00, 4,        // type = binary, length = 4 (this goes beyond the T_INTEREST length)
    'c',  'o',  'o',  'l',      // "cool"
};

#define FRAMEPAIR(array) { .frame = array, .length = sizeof(array) }

__attribute__((unused))
struct metisTestDataV1_frame_array {
    const uint8_t *frame;
    size_t length;
} metisTestDataV1_ErrorFrames[] = {
    FRAMEPAIR(metisTestDataV1_Runt),                             // 0
    FRAMEPAIR(metisTestDataV1_BadVersion),
    FRAMEPAIR(metisTestDataV1_BadPacketType),
    FRAMEPAIR(metisTestDataV1_PacketLengthLessFixedHeaderLength),
    FRAMEPAIR(metisTestDataV1_PacketLengthLessBeyondEnd),
    FRAMEPAIR(metisTestDataV1_HeaderLengthLessFixedHeaderLength), // 5
    FRAMEPAIR(metisTestDataV1_HeaderLengthTooShort),
    FRAMEPAIR(metisTestDataV1_HeaderLengthTooLong),
    FRAMEPAIR(metisTestDataV1_HeaderLengthWholePacket),
    FRAMEPAIR(metisTestDataV1_HeaderLengthBeyondEnd),
    FRAMEPAIR(metisTestDataV1_PacketLengthLessHeaderLength),
    FRAMEPAIR(metisTestDataV1_Interest_MessageLengthTooLong),
    FRAMEPAIR(metisTestDataV1_Interest_MessageLengthTooShort),
    { .frame = NULL,                                             .length= 0 }
};


#endif // Metis_metis_TestDataV1_h