Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: [Wireshark-dev] [PATCH] wiretap: Add MPEG PES.

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: "Shaun Jackman" <sjackman@xxxxxxxxx>
Date: Sun, 5 Aug 2007 11:50:00 -0700

This patch adds MPEG PES (packetized elementary stream) to the list of
magic types in wiretap/mpeg.c.

Cheers,
Shaun

2007-08-05  Shaun Jackman  <sjackman@xxxxxxxxx>

	* wiretap/mpeg.c (magic): Add MPEG PES.

Index: wiretap/mpeg.c
===================================================================
--- wiretap/mpeg.c	(revision 22456)
+++ wiretap/mpeg.c	(working copy)
@@ -247,14 +247,15 @@
 	g_free(wth->capture.mpeg);
 }

-/* XXX We probably need more magic to open more types */
 struct _mpeg_magic {
 	size_t len;
 	const gchar* match;
 } magic[] = {
-	{3,"TAG"},
-	{3,"ID3"},
-	{0,NULL}
+	{ 3, "TAG" }, /* ID3v1 */
+	{ 3, "ID3" }, /* ID3v2 */
+	{ 3, "\0\0\1" }, /* MPEG PES */
+	/* XXX MPEG audio is missing. */
+	{ 0, NULL }
 };

 int
2007-08-05  Shaun Jackman  <sjackman@xxxxxxxxx>

	* wiretap/mpeg.c (magic): Add MPEG PES.

Index: wiretap/mpeg.c
===================================================================
--- wiretap/mpeg.c	(revision 22456)
+++ wiretap/mpeg.c	(working copy)
@@ -247,14 +247,15 @@
 	g_free(wth->capture.mpeg);
 }
 
-/* XXX We probably need more magic to open more types */
 struct _mpeg_magic {
 	size_t len;
 	const gchar* match;
 } magic[] = {
-	{3,"TAG"},
-	{3,"ID3"},
-	{0,NULL}
+	{ 3, "TAG" }, /* ID3v1 */
+	{ 3, "ID3" }, /* ID3v2 */
+	{ 3, "\0\0\1" }, /* MPEG PES */
+	/* XXX MPEG audio is missing. */
+	{ 0, NULL }
 };
 
 int 
  • Follow-Ups:
    • Re: [Wireshark-dev] [PATCH] wiretap: Add MPEG PES.
      • From: Mauro Mincarelli
    • Re: [Wireshark-dev] [PATCH] wiretap: Add MPEG PES.
      • From: Luis EG Ontanon
  • Prev by Date: Re: [Wireshark-dev] [Wireshark-commits] rev 22439: /trunk/epan/wslua/ /trunk/epan/wslua/: Makefile.am Makefile.common Makefile.nmake
  • Next by Date: Re: [Wireshark-dev] [Wireshark-commits] rev 22439: /trunk/epan/wslua/ /trunk/epan/wslua/: Makefile.am Makefile.common Makefile.nmake
  • Previous by thread: Re: [Wireshark-dev] Building wireshark-0.99.6 problems on Linux
  • Next by thread: Re: [Wireshark-dev] [PATCH] wiretap: Add MPEG PES.
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation