2012-02-11 16:38:01 +00:00
|
|
|
/* packet-mpeg-sect.c
|
|
|
|
* Routines for MPEG2 (ISO/ISO 13818-1) Section dissection
|
|
|
|
* Copyright 2012, Guy Martin <gmsoft@tuxicoman.be>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2012-02-11 16:38:01 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
|
|
|
#include <epan/prefs.h>
|
2012-03-13 08:57:04 +00:00
|
|
|
#include <epan/crc32-tvb.h>
|
|
|
|
#include <epan/expert.h>
|
2014-12-20 21:23:59 +00:00
|
|
|
#include "packet-mpeg-sect.h"
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-12-14 16:09:57 +00:00
|
|
|
void proto_register_mpeg_sect(void);
|
|
|
|
|
2012-02-11 16:38:01 +00:00
|
|
|
static int proto_mpeg_sect = -1;
|
|
|
|
static int hf_mpeg_sect_table_id = -1;
|
|
|
|
static int hf_mpeg_sect_syntax_indicator = -1;
|
|
|
|
static int hf_mpeg_sect_reserved = -1;
|
|
|
|
static int hf_mpeg_sect_length = -1;
|
|
|
|
static int hf_mpeg_sect_crc = -1;
|
2016-07-11 03:47:28 +00:00
|
|
|
static int hf_mpeg_sect_crc_status = -1;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
|
|
|
static gint ett_mpeg_sect = -1;
|
|
|
|
|
2013-05-27 17:30:43 +00:00
|
|
|
static expert_field ei_mpeg_sect_crc = EI_INIT;
|
|
|
|
|
2012-02-11 16:38:01 +00:00
|
|
|
static dissector_table_t mpeg_sect_tid_dissector_table;
|
|
|
|
|
2012-03-13 11:26:37 +00:00
|
|
|
static gboolean mpeg_sect_check_crc = FALSE;
|
|
|
|
|
2013-11-25 17:04:58 +00:00
|
|
|
/* minimum length of the entire section ==
|
|
|
|
bytes from table_id to section_length == 3 bytes */
|
|
|
|
#define MPEG_SECT_MIN_LEN 3
|
|
|
|
/* the section_length field is 12 bits, it can add up to 4096 bytes
|
|
|
|
after the initial bytes */
|
|
|
|
#define MPEG_SECT_MAX_LEN MPEG_SECT_MIN_LEN+4096
|
|
|
|
|
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
#define MPEG_SECT_SYNTAX_INDICATOR_MASK 0x8000
|
|
|
|
#define MPEG_SECT_RESERVED_MASK 0x7000
|
|
|
|
#define MPEG_SECT_LENGTH_MASK 0x0FFF
|
2012-02-11 16:38:01 +00:00
|
|
|
|
|
|
|
/* From ISO/IEC 13818-1 */
|
|
|
|
enum {
|
2013-03-14 14:42:12 +00:00
|
|
|
TID_PAT,
|
|
|
|
TID_CA,
|
|
|
|
TID_PMT,
|
|
|
|
TID_TS_DESC,
|
|
|
|
TID_SCENE_DESC,
|
|
|
|
TID_OBJECT_DESC,
|
|
|
|
TID_FORBIDEN = 0xFF
|
2012-02-11 16:38:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* From ETSI EN 300 468 */
|
|
|
|
enum {
|
2013-03-14 14:42:12 +00:00
|
|
|
TID_NIT = 0x40,
|
|
|
|
TID_NIT_OTHER,
|
|
|
|
TID_SDT,
|
|
|
|
TID_SDT_OTHER = 0x46,
|
|
|
|
TID_BAT = 0x4A,
|
|
|
|
TID_EIT = 0x4E,
|
|
|
|
TID_EIT_OTHER,
|
|
|
|
TID_TDT = 0x70,
|
|
|
|
TID_RST,
|
|
|
|
TID_ST,
|
|
|
|
TID_TOT
|
2012-02-11 16:38:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* From ETSI EN 301 790 */
|
|
|
|
enum {
|
2013-03-14 14:42:12 +00:00
|
|
|
TID_RMT = 0x41, /* Conflict with TID_NIT_OTHER */
|
|
|
|
TID_SCT = 0xA0,
|
|
|
|
TID_FCT,
|
|
|
|
TID_TCT,
|
|
|
|
TID_SPT,
|
|
|
|
TID_CMT,
|
|
|
|
TID_TBTP,
|
|
|
|
TID_PCR,
|
|
|
|
TID_TIM = 0xB0
|
2012-02-11 16:38:01 +00:00
|
|
|
};
|
|
|
|
|
2013-11-28 23:09:55 +00:00
|
|
|
/* From ETSI EN 301 192 */
|
2012-02-11 16:38:01 +00:00
|
|
|
enum {
|
2013-03-14 14:42:12 +00:00
|
|
|
TID_DVB_MPE = 0x3E
|
2012-02-11 16:38:01 +00:00
|
|
|
};
|
|
|
|
|
2012-03-16 12:02:56 +00:00
|
|
|
/* From OC-SP-ETV-AM 1.0-IO5 */
|
|
|
|
enum {
|
2013-03-14 14:42:12 +00:00
|
|
|
TID_ETV_EISS = 0xE0,
|
|
|
|
TID_ETV_DII = 0xE3,
|
|
|
|
TID_ETV_DDB = 0xE4
|
2012-03-16 12:02:56 +00:00
|
|
|
};
|
|
|
|
|
2012-05-29 21:36:39 +00:00
|
|
|
/* From ETSI TS 102 899 */
|
|
|
|
enum {
|
2013-03-14 14:42:12 +00:00
|
|
|
TID_AIT = 0x74
|
2012-05-29 21:36:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-02-11 16:38:01 +00:00
|
|
|
static const value_string mpeg_sect_table_id_vals[] = {
|
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
{ TID_PAT, "Program Association Table (PAT)" },
|
|
|
|
{ TID_CA, "Conditional Access (CA)" },
|
|
|
|
{ TID_PMT, "Program Map Table (PMT)" },
|
|
|
|
{ TID_TS_DESC, "Transport Stream Description" },
|
|
|
|
{ TID_SCENE_DESC, "ISO/IEC 14496 Scene Description" },
|
|
|
|
{ TID_OBJECT_DESC, "ISO/IEC 14496 Object Description" },
|
|
|
|
{ TID_NIT, "Network Information Table (NIT), current network" },
|
|
|
|
{ TID_NIT_OTHER, "Network Information Table (NIT), other network" },
|
|
|
|
{ TID_SDT, "Service Description Table (SDT), current network" },
|
|
|
|
{ TID_SDT_OTHER, "Service Description (SDT), other network" },
|
2016-01-06 00:58:42 +00:00
|
|
|
{ TID_BAT, "Bouquet Association Table (BAT)" },
|
2013-03-14 14:42:12 +00:00
|
|
|
{ TID_EIT, "Event Information Table (EIT), actual TS" },
|
|
|
|
{ TID_EIT_OTHER, "Event Information Table (EIT), other TS" },
|
|
|
|
{ TID_TDT, "Time and Date Table (TDT)" },
|
|
|
|
{ TID_RST, "Running Status Table (RST)" },
|
|
|
|
{ TID_ST, "Stuffing Table (ST)" },
|
|
|
|
{ TID_TOT, "Time Offset Table (TOT)" },
|
|
|
|
{ TID_AIT, "Application Information Table (AIT)" },
|
|
|
|
{ TID_SCT, "Superframe Composition Table (SCT)" },
|
|
|
|
{ TID_FCT, "Frame Composition Table (FCT)" },
|
|
|
|
{ TID_TCT, "Time-Slot Composition Table (TCT)" },
|
|
|
|
{ TID_SPT, "Satellite Position Table (SPT)" },
|
|
|
|
{ TID_CMT, "Correction Message Table (CMT)" },
|
|
|
|
{ TID_TBTP, "Terminal Burst Time Plan (TBTP)" },
|
|
|
|
{ TID_TIM, "Terminal Information Message (TIM)" },
|
|
|
|
{ TID_DVB_MPE, "DVB MultiProtocol Encapsulation (MPE)" },
|
|
|
|
{ TID_ETV_EISS, "ETV Integrated Signaling Stream (EISS)" },
|
|
|
|
{ TID_ETV_DII, "ETV Download Info Indication" },
|
|
|
|
{ TID_ETV_DDB, "ETV Download Data Block" },
|
|
|
|
{ TID_FORBIDEN, "Forbidden" },
|
|
|
|
{ 0, NULL }
|
2012-02-11 16:38:01 +00:00
|
|
|
};
|
|
|
|
|
2013-11-25 20:56:34 +00:00
|
|
|
/* read a utc_time field in a tvb and write it to the utc_time struct
|
2012-03-23 23:49:14 +00:00
|
|
|
the encoding of the field is according to DVB-SI specification, section 5.2.5
|
|
|
|
16bit modified julian day (MJD), 24bit 6*4bit BCD digits hhmmss
|
2012-05-03 21:01:22 +00:00
|
|
|
return the length in bytes or -1 for error */
|
2012-03-23 23:49:14 +00:00
|
|
|
gint
|
|
|
|
packet_mpeg_sect_mjd_to_utc_time(tvbuff_t *tvb, gint offset, nstime_t *utc_time)
|
2012-05-03 21:01:22 +00:00
|
|
|
{
|
2013-03-14 14:42:12 +00:00
|
|
|
gint bcd_time_offset; /* start offset of the bcd time in the tvbuff */
|
|
|
|
guint8 hour, min, sec;
|
|
|
|
|
|
|
|
if (!utc_time)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
nstime_set_zero(utc_time);
|
|
|
|
utc_time->secs = (tvb_get_ntohs(tvb, offset) - 40587) * 86400;
|
|
|
|
bcd_time_offset = offset+2;
|
|
|
|
hour = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset));
|
|
|
|
min = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset+1));
|
|
|
|
sec = MPEG_SECT_BCD44_TO_DEC(tvb_get_guint8(tvb, bcd_time_offset+2));
|
|
|
|
if (hour>23 || min>59 || sec>59)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
utc_time->secs += hour*3600 + min*60 + sec;
|
|
|
|
return 5;
|
2012-03-23 23:49:14 +00:00
|
|
|
}
|
|
|
|
|
2012-03-13 08:57:04 +00:00
|
|
|
guint
|
|
|
|
packet_mpeg_sect_header(tvbuff_t *tvb, guint offset,
|
2013-03-14 14:42:12 +00:00
|
|
|
proto_tree *tree, guint *sect_len, gboolean *ssi)
|
2012-03-16 12:02:56 +00:00
|
|
|
{
|
2013-03-14 14:42:12 +00:00
|
|
|
return packet_mpeg_sect_header_extra(tvb, offset, tree, sect_len,
|
|
|
|
NULL, ssi, NULL);
|
2012-03-16 12:02:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
guint
|
|
|
|
packet_mpeg_sect_header_extra(tvbuff_t *tvb, guint offset, proto_tree *tree,
|
2013-03-14 14:42:12 +00:00
|
|
|
guint *sect_len, guint *reserved, gboolean *ssi,
|
|
|
|
proto_item **items)
|
2012-02-11 16:38:01 +00:00
|
|
|
{
|
2013-03-14 14:42:12 +00:00
|
|
|
guint tmp;
|
|
|
|
guint len = 0;
|
|
|
|
proto_item *pi[PACKET_MPEG_SECT_PI__SIZE];
|
|
|
|
gint i;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
for (i = 0; i < PACKET_MPEG_SECT_PI__SIZE; i++) {
|
|
|
|
pi[i] = NULL;
|
|
|
|
}
|
2012-03-16 12:02:56 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (tree) {
|
|
|
|
pi[PACKET_MPEG_SECT_PI__TABLE_ID] =
|
|
|
|
proto_tree_add_item(tree, hf_mpeg_sect_table_id,
|
|
|
|
tvb, offset + len, 1, ENC_BIG_ENDIAN);
|
|
|
|
}
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
len++;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (tree) {
|
|
|
|
pi[PACKET_MPEG_SECT_PI__SSI] =
|
|
|
|
proto_tree_add_item(tree, hf_mpeg_sect_syntax_indicator,
|
|
|
|
tvb, offset + len, 2, ENC_BIG_ENDIAN);
|
2012-03-16 12:02:56 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
pi[PACKET_MPEG_SECT_PI__RESERVED] =
|
|
|
|
proto_tree_add_item(tree, hf_mpeg_sect_reserved, tvb,
|
|
|
|
offset + len, 2, ENC_BIG_ENDIAN);
|
2012-03-16 12:02:56 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
pi[PACKET_MPEG_SECT_PI__LENGTH] =
|
|
|
|
proto_tree_add_item(tree, hf_mpeg_sect_length, tvb,
|
|
|
|
offset + len, 2, ENC_BIG_ENDIAN);
|
|
|
|
}
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
tmp = tvb_get_ntohs(tvb, offset + len);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (sect_len)
|
|
|
|
*sect_len = MPEG_SECT_LENGTH_MASK & tmp;
|
2012-03-16 13:30:12 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (reserved)
|
|
|
|
*reserved = (MPEG_SECT_RESERVED_MASK & tmp) >> 12;
|
2012-03-16 13:30:12 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (ssi)
|
|
|
|
*ssi = (MPEG_SECT_SYNTAX_INDICATOR_MASK & tmp);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (items) {
|
|
|
|
for (i = 0; i < PACKET_MPEG_SECT_PI__SIZE; i++) {
|
|
|
|
items[i] = pi[i];
|
|
|
|
}
|
|
|
|
}
|
2012-03-16 12:02:56 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
len += 2;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
return len;
|
2012-03-13 08:57:04 +00:00
|
|
|
}
|
2012-02-11 16:38:01 +00:00
|
|
|
|
|
|
|
|
2012-05-29 21:36:39 +00:00
|
|
|
guint
|
2012-03-13 08:57:04 +00:00
|
|
|
packet_mpeg_sect_crc(tvbuff_t *tvb, packet_info *pinfo,
|
2013-03-14 14:42:12 +00:00
|
|
|
proto_tree *tree, guint start, guint end)
|
2012-03-13 08:57:04 +00:00
|
|
|
{
|
2013-03-14 14:42:12 +00:00
|
|
|
if (mpeg_sect_check_crc) {
|
2016-07-11 03:47:28 +00:00
|
|
|
proto_tree_add_checksum(tree, tvb, end, hf_mpeg_sect_crc, hf_mpeg_sect_crc_status, &ei_mpeg_sect_crc, pinfo, crc32_mpeg2_tvb_offset(tvb, start, end),
|
|
|
|
ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY);
|
2013-03-14 14:42:12 +00:00
|
|
|
} else {
|
2016-07-11 03:47:28 +00:00
|
|
|
proto_tree_add_checksum(tree, tvb, end, hf_mpeg_sect_crc, hf_mpeg_sect_crc_status, &ei_mpeg_sect_crc, pinfo, crc32_mpeg2_tvb_offset(tvb, start, end),
|
|
|
|
ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
|
2013-03-14 14:42:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 4;
|
2012-03-13 08:57:04 +00:00
|
|
|
}
|
2012-02-11 16:38:01 +00:00
|
|
|
|
|
|
|
|
2013-11-25 17:04:58 +00:00
|
|
|
static int
|
|
|
|
dissect_mpeg_sect(tvbuff_t *tvb, packet_info *pinfo,
|
|
|
|
proto_tree *tree, void *data _U_)
|
2012-03-13 08:57:04 +00:00
|
|
|
{
|
2013-11-25 17:04:58 +00:00
|
|
|
gint tvb_len;
|
2013-03-14 14:42:12 +00:00
|
|
|
gint offset = 0;
|
|
|
|
guint section_length = 0;
|
|
|
|
gboolean syntax_indicator = FALSE;
|
|
|
|
guint8 table_id;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *mpeg_sect_tree;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-11-25 17:04:58 +00:00
|
|
|
/* the incoming tvb contains only one section, no additional data */
|
|
|
|
|
|
|
|
tvb_len = (gint)tvb_reported_length(tvb);
|
|
|
|
if (tvb_len<MPEG_SECT_MIN_LEN || tvb_len>MPEG_SECT_MAX_LEN)
|
|
|
|
return 0;
|
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
table_id = tvb_get_guint8(tvb, offset);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
/* Check if a dissector can parse the current table */
|
|
|
|
if (dissector_try_uint(mpeg_sect_tid_dissector_table, table_id, tvb, pinfo, tree))
|
2013-11-25 17:04:58 +00:00
|
|
|
return tvb_len;
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
/* If no dissector is registered, use the common one */
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPEG SECT");
|
|
|
|
col_add_fstr(pinfo->cinfo, COL_INFO, "Table ID 0x%02x", table_id);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_mpeg_sect, tvb, offset, -1, ENC_NA);
|
|
|
|
mpeg_sect_tree = proto_item_add_subtree(ti, ett_mpeg_sect);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
proto_item_append_text(ti, " Table_ID=0x%02x", table_id);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
packet_mpeg_sect_header(tvb, offset, mpeg_sect_tree,
|
|
|
|
§ion_length, &syntax_indicator);
|
2012-03-16 12:02:56 +00:00
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
if (syntax_indicator)
|
|
|
|
packet_mpeg_sect_crc(tvb, pinfo, mpeg_sect_tree, 0, (section_length-1));
|
2013-11-25 17:04:58 +00:00
|
|
|
|
|
|
|
return tvb_len;
|
2012-02-11 16:38:01 +00:00
|
|
|
}
|
|
|
|
|
2012-03-13 08:57:04 +00:00
|
|
|
|
2012-02-11 16:38:01 +00:00
|
|
|
void
|
|
|
|
proto_register_mpeg_sect(void)
|
|
|
|
{
|
2013-03-14 14:42:12 +00:00
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_mpeg_sect_table_id, {
|
|
|
|
"Table ID", "mpeg_sect.tid",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(mpeg_sect_table_id_vals), 0, NULL, HFILL
|
|
|
|
} },
|
|
|
|
|
|
|
|
{ &hf_mpeg_sect_syntax_indicator, {
|
|
|
|
"Syntax indicator", "mpeg_sect.syntax_indicator",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, MPEG_SECT_SYNTAX_INDICATOR_MASK, NULL, HFILL
|
|
|
|
} },
|
|
|
|
|
|
|
|
{ &hf_mpeg_sect_reserved, {
|
|
|
|
"Reserved", "mpeg_sect.reserved",
|
|
|
|
FT_UINT16, BASE_HEX, NULL, MPEG_SECT_RESERVED_MASK, NULL, HFILL
|
|
|
|
} },
|
|
|
|
|
|
|
|
{ &hf_mpeg_sect_length, {
|
|
|
|
"Length", "mpeg_sect.len",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, MPEG_SECT_LENGTH_MASK, NULL, HFILL
|
|
|
|
} },
|
|
|
|
|
|
|
|
{ &hf_mpeg_sect_crc, {
|
|
|
|
"CRC 32", "mpeg_sect.crc",
|
|
|
|
FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
|
2016-07-11 03:47:28 +00:00
|
|
|
} },
|
|
|
|
|
|
|
|
{ &hf_mpeg_sect_crc_status, {
|
|
|
|
"CRC 32 Status", "mpeg_sect.crc.status",
|
|
|
|
FT_UINT8, BASE_NONE, VALS(proto_checksum_vals), 0, NULL, HFILL
|
|
|
|
} },
|
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_mpeg_sect
|
|
|
|
};
|
2013-05-27 17:30:43 +00:00
|
|
|
|
|
|
|
static ei_register_info ei[] = {
|
|
|
|
{ &ei_mpeg_sect_crc, { "mpeg_sect.crc.invalid", PI_CHECKSUM, PI_WARN, "Invalid CRC", EXPFILL }},
|
|
|
|
};
|
|
|
|
|
2013-03-14 14:42:12 +00:00
|
|
|
module_t *mpeg_sect_module;
|
2013-05-27 17:30:43 +00:00
|
|
|
expert_module_t* expert_mpeg_sect;
|
2013-03-14 14:42:12 +00:00
|
|
|
|
|
|
|
proto_mpeg_sect = proto_register_protocol("MPEG2 Section", "MPEG SECT", "mpeg_sect");
|
2015-12-09 04:04:01 +00:00
|
|
|
register_dissector("mpeg_sect", dissect_mpeg_sect, proto_mpeg_sect);
|
2013-03-14 14:42:12 +00:00
|
|
|
|
|
|
|
proto_register_field_array(proto_mpeg_sect, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2013-05-27 17:30:43 +00:00
|
|
|
expert_mpeg_sect = expert_register_protocol(proto_mpeg_sect);
|
|
|
|
expert_register_field_array(expert_mpeg_sect, ei, array_length(ei));
|
2013-03-14 14:42:12 +00:00
|
|
|
|
|
|
|
mpeg_sect_module = prefs_register_protocol(proto_mpeg_sect, NULL);
|
|
|
|
|
|
|
|
prefs_register_bool_preference(mpeg_sect_module,
|
|
|
|
"verify_crc",
|
|
|
|
"Verify the section CRC",
|
|
|
|
"Whether the section dissector should verify the CRC",
|
|
|
|
&mpeg_sect_check_crc);
|
|
|
|
|
|
|
|
mpeg_sect_tid_dissector_table = register_dissector_table("mpeg_sect.tid",
|
|
|
|
"MPEG SECT Table ID",
|
2016-08-30 22:51:54 +00:00
|
|
|
proto_mpeg_sect, FT_UINT8, BASE_HEX);
|
2012-02-11 16:38:01 +00:00
|
|
|
|
|
|
|
}
|
2012-09-03 18:37:03 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 4
|
2013-03-14 14:42:12 +00:00
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
2012-09-03 18:37:03 +00:00
|
|
|
* End:
|
|
|
|
*
|
2013-03-14 14:42:12 +00:00
|
|
|
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
2012-09-03 18:37:03 +00:00
|
|
|
*/
|