aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 413cda347d..08865d1ea9 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,