2 * Declarations of exported routines from mpeg-sect dissector
3 * Copyright 2012, Weston Schmidt <weston_schmidt@alumni.purdue.edu>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __PACKET_MPEG_SECT_H__
13 #define __PACKET_MPEG_SECT_H__
15 /* From ISO/IEC 13818-1 */
16 #define MPEG_PAT_TID 0x00 /* packet-mpeg-pat.c */
17 #define MPEG_CA_TID 0x01 /* packet-mpeg-ca.c */
18 #define MPEG_PMT_TID 0x02 /* packet-mpeg-pmt.c */
20 /* From ISO/IEC 13818-6 */
21 #define DSMCC_TID_LLCSNAP 0x3A /* packet-mpeg-dsmcc.c */
22 #define DSMCC_TID_UN_MSG 0x3B /* packet-mpeg-dsmcc.c */
23 #define DSMCC_TID_DD_MSG 0x3C /* packet-mpeg-dsmcc.c */
24 #define DSMCC_TID_DESC_LIST 0x3D /* packet-mpeg-dsmcc.c */
25 #define DSMCC_TID_PRIVATE 0x3E /* packet-mpeg-dsmcc.c */
27 /* From ETSI EN 300 468 */
28 #define DVB_NIT_TID 0x40 /* packet-dvb-nit.c */
29 #define DVB_NIT_TID_OTHER 0x41 /* packet-dvb-nit.c */
30 #define DVB_SDT_TID_ACTUAL 0x42 /* packet-dvb-sdt.c */
31 #define DVB_SDT_TID_OTHER 0x46 /* packet-dvb-sdt.c */
32 #define DVB_BAT_TID 0x4A /* packet-dvb-bat.c */
33 #define DVB_EIT_TID_MIN 0x4E /* packet-dvb-eit.c */
34 #define DVB_EIT_TID_MAX 0x6F /* packet-dvb-eit.c */
35 #define DVB_TDT_TID 0x70 /* packet-dvb-tdt.c */
36 #define DVB_TOT_TID 0x73 /* packet-dvb-tot.c */
37 #define DVB_SIT_TID 0x7f /* packet-dvb-sit.c */
39 /* From ETSI TS 102 899 */
40 #define DVB_AIT_TID 0x74 /* packet-dvb-ait.c */
42 /* From ETSI EN 301 192 */
43 /* Duplicates / implementation of DSMCC_TID_PRIVATE */
44 #define DVB_DATA_MPE_TID 0x3E /* packet-dvb-data-mpe.c */
46 /* From OC-SP-ETV-AM 1.0-IO5 */
47 #define EISS_SECTION_TID 0xE0 /* packet-eiss.c */
48 #define ETV_TID_DII_SECTION 0xE3 /* packet-etv.c */
49 #define ETV_TID_DDB_SECTION 0xE4 /* packet-etv.c */
51 #define PACKET_MPEG_SECT_PI__TABLE_ID 0
52 #define PACKET_MPEG_SECT_PI__SSI 1
53 #define PACKET_MPEG_SECT_PI__RESERVED 2
54 #define PACKET_MPEG_SECT_PI__LENGTH 3
55 #define PACKET_MPEG_SECT_PI__SIZE 4
57 /* Per-packet proto_data */
58 #define MPEG_SECT_TID_KEY 0
60 /* convert a byte that contains two 4bit BCD digits into a decimal value */
61 #define MPEG_SECT_BCD44_TO_DEC(x) ((((x)&0xf0) >> 4) * 10 + ((x)&0x0f))
64 * Used to read a date provided in MJD format into a utc_time structure
67 packet_mpeg_sect_mjd_to_utc_time(tvbuff_t
*tvb
, int offset
, nstime_t
*utc_time
);
70 * Used to process the 'standard' mpeg section header that is described below
71 * and populate the data into the tree
74 packet_mpeg_sect_header(tvbuff_t
*tvb
, unsigned offset
,
75 proto_tree
*tree
, unsigned *sect_len
, bool *ssi
);
78 * Used to return all the values & items for 'strict' processing of the
79 * sub-dissectors that make use of this dissector
82 packet_mpeg_sect_header_extra(tvbuff_t
*tvb
, unsigned offset
, proto_tree
*tree
,
83 unsigned *sect_len
, unsigned *reserved
, bool *ssi
,
87 * Used to process the mpeg CRC information & report errors found with it.
90 packet_mpeg_sect_crc(tvbuff_t
*tvb
, packet_info
*pinfo
,
91 proto_tree
*tree
, unsigned start
, unsigned end
);