summaryrefslogtreecommitdiff
path: root/vrt/lib/expanded_header_parse_switch_body.h
diff options
context:
space:
mode:
Diffstat (limited to 'vrt/lib/expanded_header_parse_switch_body.h')
-rw-r--r--vrt/lib/expanded_header_parse_switch_body.h320
1 files changed, 320 insertions, 0 deletions
diff --git a/vrt/lib/expanded_header_parse_switch_body.h b/vrt/lib/expanded_header_parse_switch_body.h
new file mode 100644
index 000000000..6bfaf3799
--- /dev/null
+++ b/vrt/lib/expanded_header_parse_switch_body.h
@@ -0,0 +1,320 @@
+ case 0:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 1;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 1:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 2;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 2:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 3;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 3:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 4;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 4:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[1]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 2;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 5:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[2]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 3;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 6:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = ntohl(p[3]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 4;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 7:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = ntohl(p[4]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 5;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 8:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ n32_bit_words_header = 3;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 9:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ n32_bit_words_header = 4;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 10:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
+ n32_bit_words_header = 5;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 11:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
+ n32_bit_words_header = 6;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 12:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[1]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ n32_bit_words_header = 4;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 13:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[2]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
+ n32_bit_words_header = 5;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 14:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = ntohl(p[3]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
+ n32_bit_words_header = 6;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 15:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = ntohl(p[4]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[5])) << 32) | ntohl(p[6]);
+ n32_bit_words_header = 7;
+ h->trailer = 0;
+ n32_bit_words_trailer = 0;
+ break;
+
+ case 16:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 1;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 17:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 2;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 18:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 3;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 19:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = 0;
+ h->fractional_secs = 0;
+ n32_bit_words_header = 4;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 20:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[1]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 2;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 21:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[2]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 3;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 22:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = ntohl(p[3]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 4;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 23:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = ntohl(p[4]);
+ h->fractional_secs = 0;
+ n32_bit_words_header = 5;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 24:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ n32_bit_words_header = 3;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 25:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ n32_bit_words_header = 4;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 26:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
+ n32_bit_words_header = 5;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 27:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = 0;
+ h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
+ n32_bit_words_header = 6;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 28:
+ h->stream_id = 0;
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[1]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ n32_bit_words_header = 4;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 29:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = 0;
+ h->integer_secs = ntohl(p[2]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
+ n32_bit_words_header = 5;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 30:
+ h->stream_id = 0;
+ h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
+ h->integer_secs = ntohl(p[3]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
+ n32_bit_words_header = 6;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+
+ case 31:
+ h->stream_id = ntohl(p[1]);
+ h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
+ h->integer_secs = ntohl(p[4]);
+ h->fractional_secs = ((uint64_t)(ntohl(p[5])) << 32) | ntohl(p[6]);
+ n32_bit_words_header = 7;
+ h->trailer = ntohl(p[len-1]);
+ n32_bit_words_trailer = 1;
+ break;
+