aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2013-11-12 22:04:47 +0000
committerMartin Kaiser <wireshark@kaiser.cx>2013-11-12 22:04:47 +0000
commit72f3c258a04d6323699eb9ebca13e53d2cb5b22e (patch)
tree67e60b803d1868fc657db52d4a808ed923a1bd2c
parent7221215cdca74a587615e4e1ab9d79540bf58043 (diff)
share the text description of service types between MPEG PMT and DVB-CI
svn path=/trunk/; revision=53289
-rw-r--r--epan/dissectors/Makefile.common1
-rw-r--r--epan/dissectors/packet-dvbci.c6
-rw-r--r--epan/dissectors/packet-mpeg-pmt.c2
-rw-r--r--epan/dissectors/packet-mpeg-pmt.h31
4 files changed, 37 insertions, 3 deletions
diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common
index a776be1514..a4fb44675c 100644
--- a/epan/dissectors/Makefile.common
+++ b/epan/dissectors/Makefile.common
@@ -1457,6 +1457,7 @@ DISSECTOR_INCLUDES = \
packet-mount.h \
packet-mp4ves.h \
packet-mpeg-descriptor.h \
+ packet-mpeg-pmt.h \
packet-mpeg-sect.h \
packet-mpls.h \
packet-mq.h \
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index d2d737d71b..229fac71c4 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -45,6 +45,7 @@
#include <epan/asn1.h>
#include <epan/dissectors/packet-dvbci.h>
#include <epan/dissectors/packet-mpeg-descriptor.h>
+#include <epan/dissectors/packet-mpeg-pmt.h>
#include <epan/dissectors/packet-x509af.h>
#include <epan/dissectors/packet-x509ce.h>
@@ -5133,8 +5134,9 @@ proto_register_dvbci(void)
FT_UINT16, BASE_HEX, NULL, 0x0FFF, NULL, HFILL }
},
{ &hf_dvbci_stream_type,
- { "Stream type", "dvb-ci.ca.stream_type",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ { "Stream type", "dvb-ci.ca.stream_type", FT_UINT8,
+ BASE_HEX|BASE_EXT_STRING, &mpeg_pmt_stream_type_vals_ext,
+ 0, NULL, HFILL }
},
{ &hf_dvbci_es_pid,
{ "Elementary stream PID", "dvb-ci.ca.elementary_pid",
diff --git a/epan/dissectors/packet-mpeg-pmt.c b/epan/dissectors/packet-mpeg-pmt.c
index c364ee76df..09980bdc26 100644
--- a/epan/dissectors/packet-mpeg-pmt.c
+++ b/epan/dissectors/packet-mpeg-pmt.c
@@ -115,7 +115,7 @@ static const value_string mpeg_pmt_stream_type_vals[] = {
{ 0xC0, "ETV-AM EISS Signaling" },
{ 0x00, NULL }
};
-static value_string_ext mpeg_pmt_stream_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_pmt_stream_type_vals);
+value_string_ext mpeg_pmt_stream_type_vals_ext = VALUE_STRING_EXT_INIT(mpeg_pmt_stream_type_vals);
static int
dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
diff --git a/epan/dissectors/packet-mpeg-pmt.h b/epan/dissectors/packet-mpeg-pmt.h
new file mode 100644
index 0000000000..e76daa7f94
--- /dev/null
+++ b/epan/dissectors/packet-mpeg-pmt.h
@@ -0,0 +1,31 @@
+/* packet-mpeg-pmt.h
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __PACKET_MPEG_PMT_H__
+#define __PACKET_MPEG_PMT_H__
+
+#include <epan/value_string.h>
+
+extern value_string_ext mpeg_pmt_stream_type_vals_ext;
+
+#endif