aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-04-11 22:01:11 -0700
committerGuy Harris <guy@alum.mit.edu>2018-04-12 05:01:45 +0000
commitd0d0cf05cc6872c7d49f1ed7b2432ba97a66331f (patch)
tree6440177dd2da5798aa2962d08b18e6e5b4ae5b7a
parent148f39d900b516cac575d7de689a44545a663c70 (diff)
Update a comment.
We don't just reassemble DOCSIS MAC frames, we reassemble other forms of higher-level packet atop an MPEG Transport Stream as well. Change-Id: If6e709a8d2d3e574fbaedb1fcac74797c5664aa5 Reviewed-on: https://code.wireshark.org/review/26905 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/packet-mp2t.c64
1 files changed, 46 insertions, 18 deletions
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c
index 413cda3..08865d1 100644
--- a/epan/dissectors/packet-mp2t.c
+++ b/epan/dissectors/packet-mp2t.c
@@ -553,24 +553,52 @@ mp2t_fragment_handle(tvbuff_t *tvb, guint offset, packet_info *pinfo,
}
-/* Decoding of DOCSIS MAC frames within MPEG packets. MAC frames may begin anywhere
- * within an MPEG packet or span multiple MPEG packets.
- * payload_unit_start_indicator bit in MPEG header, and pointer field are used to
- * decode fragmented DOCSIS frames within MPEG packet.
- *-------------------------------------------------------------------------------
- *MPEG Header | pointer_field | stuff_bytes | Start of MAC Frame #1 |
- *(PUSI = 1) | (= 0) | (0 or more) |(up to 183 bytes) |
- *-------------------------------------------------------------------------------
- *-------------------------------------------------------------------------------
- *MPEG Header | Continuation of MAC Frame #1 |
- *(PUSI = 0) | (up to 183 bytes) |
- *-------------------------------------------------------------------------------
- *-------------------------------------------------------------------------------
- *MPEG Header | pointer_field |Tail of MAC Frame| stuff_bytes |Start of MAC Frame|
- *(PUSI = 1) | (= M) | #1 (M bytes) | (0 or more) |# 2 (N bytes) |
- *-------------------------------------------------------------------------------
- * Source - Data-Over-Cable Service Interface Specifications
- * CM-SP-DRFI-I07-081209
+/*
+ * Reassembly of various payload types.
+ *
+ * DOCSIS MAC frames, PES packets, etc. may begin anywhere within an MPEG-TS
+ * packet or span multiple MPEG packets.
+ *
+ * The payload_unit_start_indicator bit in the MPEG-TS header, and the pointer
+ * field, are used to reassemble fragmented frames from MPEG-TS packets.
+ *
+ * If that bit is set, a higher-level packet begins in this MPEG-TS
+ * packet, and the MPEG-TS header is followed by a 1-octet pointer field.
+ * The value of the pointer field indicates at which byte the higher-
+ * level packet begins. If that bit is not set, the packet begun in
+ * an earlier MPEG-TS packet continues in this packet, with the data
+ * in the payload going after the data in the previous MPEG-TS packet
+ * (there can be more than one continuing packet).
+ *
+ * If the pointer field is non-zero, this MPEG-TS packet contains
+ * the conclusion of one higher-level packet and the beginning of
+ * the next packet.
+ *
+ * As the MPEG-TS packets are of a fixed size, stuff bytes are used
+ * as padding before the first byte of a higher-level packet as
+ * necessary.
+ *
+ * This diagram is from Data-Over-Cable Service Interface Specifications,
+ * Downstream RF Interface Specification, CM-SP-DRFI-I16-170111, section 7
+ * "DOWNSTREAM TRANSMISSION CONVERGENCE SUBLAYER", and shows how the
+ * higher-level packets are transported over the MPEG Transport Stream:
+ *
+ *+--------------------------------------------------------------------------------+
+ *|MPEG Header | pointer_field | stuff_bytes | Start of Packet #1 |
+ *|(PUSI = 1) | (= 0) | (0 or more) | (up to 183 bytes) |
+ *+--------------------------------------------------------------------------------+
+ *+--------------------------------------------------------------------------------+
+ *|MPEG Header | Continuation of Packet #1 |
+ *|(PUSI = 0) | (up to 183 bytes) |
+ *+--------------------------------------------------------------------------------+
+ *+---------------------------------------------------------------------------------+
+ *|MPEG Header | pointer_field |Tail of Packet #1 | stuff_bytes |Start of Packet #2 |
+ *|(PUSI = 1) | (= M) |(M bytes) | (0 or more) |(N bytes) |
+ *+---------------------------------------------------------------------------------+
+ *
+ * For PES and PSI, see ISO/IEC 13818-1 / ITU-T Rec. H.222.0 (05/2006),
+ * section 2.4.3.3 "Semantic definition of fields in Transport Stream packet
+ * layer", which says much the same thing.
*/
static void
mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, packet_info *pinfo,