├── NEWS ├── src ├── ebu │ ├── .cvsignore │ ├── Makefile.am │ ├── wss.h │ ├── vps.h │ ├── teletext.h │ ├── ebu_misc.h │ └── wss.c ├── misc │ ├── .cvsignore │ ├── helper.c │ ├── crc32.h │ ├── pid_mem.h │ ├── Makefile.am │ ├── print_header.h │ ├── sig_abort.h │ ├── hexprint.h │ ├── pkt_time.h │ ├── packet_mem.h │ ├── print_header.c │ ├── pid_mem.c │ ├── pkt_time.c │ ├── helper.h │ ├── cmdline.h │ ├── sig_abort.c │ ├── output.h │ └── output.c ├── pes │ ├── .cvsignore │ ├── pes_psdir.h │ ├── pes_psm.h │ ├── pes_dsmcc.h │ ├── pes_std.h │ ├── pes_data.h │ ├── pes_data_ebu.h │ ├── pes_data_sync.h │ ├── mpeg_sysheader.h │ ├── pes_misc.h │ ├── mpeg_packheader.h │ ├── pespacket.h │ ├── Makefile.am │ ├── mpeg2_video.h │ ├── pes_misc.c │ ├── pes_data.c │ ├── mpeg_packheader.c │ ├── pes_psm.c │ ├── mpeg_sysheader.c │ └── pes_data_sync.c ├── ts │ ├── .cvsignore │ ├── ts_mip.c │ ├── Makefile.am │ ├── ts_cc_check.h │ ├── ts_misc.h │ ├── ts_mip.h │ ├── tslayer.h │ ├── ts2secpes.h │ ├── ts_misc.c │ └── ts_cc_check.c ├── dvb_api │ ├── .cvsignore │ ├── dmx_ts.h │ ├── dmx_error.h │ ├── dmx_pes.h │ ├── dmx_sect.h │ ├── dmx_tspidscan.h │ ├── fe_info.h │ ├── dmx_tspidbandwidth.h │ ├── fe_signal.h │ ├── Makefile.am │ ├── file_io.h │ ├── dmx_error.c │ ├── fe_info.c │ ├── fe_misc.h │ └── dvb_api.h ├── net_ip │ ├── .cvsignore │ ├── ip.c │ ├── Makefile.am │ └── ip.h ├── private │ ├── .cvsignore │ ├── default │ │ ├── .cvsignore │ │ ├── Makefile.am │ │ ├── section_private_default.h │ │ ├── descriptor_private_default.h │ │ ├── descriptor_private_default.c │ │ └── section_private_default.c │ ├── eicta.org │ │ ├── .cvsignore │ │ ├── Makefile.am │ │ ├── eicta_org.h │ │ ├── dvb_descriptor_eicta.h │ │ └── eicta_org.c │ ├── nordig.org │ │ ├── .cvsignore │ │ ├── Makefile.am │ │ ├── nordig_org.h │ │ ├── dvb_descriptor_nordig.h │ │ ├── nordig_org.c │ │ └── dvb_descriptor_nordig.c │ ├── premiere.de │ │ ├── .cvsignore │ │ ├── Makefile.am │ │ ├── section_premiere_cit.h │ │ ├── section_premiere_cpt.h │ │ ├── premiere_de.h │ │ ├── dvb_descriptor_premiere.h │ │ ├── premiere_de.c │ │ └── section_premiere_cit.c │ ├── Makefile.am │ ├── _read_me.txt │ └── userdefs.h ├── sections │ ├── .cvsignore │ ├── mdt.c │ ├── bat.h │ ├── cat.h │ ├── dit.h │ ├── eit.h │ ├── nit.h │ ├── pat.h │ ├── pmt.h │ ├── rst.h │ ├── sdt.h │ ├── sit.h │ ├── st.h │ ├── emm_ecm.h │ ├── tot.h │ ├── mdt.h │ ├── tdt.h │ ├── tsdt.h │ ├── sectables.h │ ├── Makefile.am │ ├── tdt.c │ ├── st.c │ ├── tot.c │ ├── dit.c │ ├── emm_ecm.c │ ├── cat.c │ ├── tsdt.c │ └── rst.c ├── strings │ ├── .cvsignore │ ├── identifiers │ │ ├── .cvsignore │ │ ├── rootOfTrustID.h │ │ ├── cpSystemID.h │ │ ├── Makefile.am │ │ ├── mhpProtocolID.h │ │ ├── mhpApplicationTypeID.h │ │ ├── mhpAITDescriptors.h │ │ ├── platformID.h │ │ └── dataBroadcastID.h │ ├── dvb_str.c │ ├── Makefile.am │ ├── net_str.h │ ├── tva_str.h │ ├── strtable_misc.c │ ├── strtable_misc.h │ ├── net_str.c │ ├── tva_str.c │ └── dsmcc_str.h ├── testdata │ ├── .cvsignore │ ├── Makefile.am │ ├── test0x1d.h │ └── test0x1d.c ├── tvanytime │ ├── .cvsignore │ ├── Makefile.am │ ├── cs.h │ ├── rnt.h │ └── cs.c ├── .cvsignore ├── datacarousel │ ├── .cvsignore │ ├── dsmcc.c │ ├── datagram.c │ ├── llc_snap.h │ ├── dsmcc.h │ ├── ints.h │ ├── unts.h │ ├── ait.h │ ├── biop_message.h │ ├── datagram.h │ ├── biop_modinfo.h │ ├── dsmcc_unm.h │ ├── dsmcc_ddb.h │ ├── iop_ior.h │ ├── biop_servgatinf.h │ ├── mpe_fec.h │ ├── dsmcc_grpinfind.h │ ├── dsmcc_unm_dii.h │ ├── dsmcc_unm_dsi.h │ ├── dsmcc_unm_dlcancel.h │ ├── biop_tag_tap.h │ ├── mhp_misc.h │ ├── biop.h │ ├── biop_dsm.h │ ├── Makefile.am │ ├── mhp_misc.c │ ├── dsmcc_unm_dlcancel.c │ ├── dsmcc_misc.h │ ├── dsmcc_unm.c │ ├── iop_ior.c │ ├── dsmcc_ddb.c │ ├── biop_servgatinf.c │ ├── ints.c │ ├── llc_snap.c │ ├── dsmcc_grpinfind.c │ ├── unts.c │ ├── mpe_fec.c │ ├── biop_modinfo.c │ └── ait.c ├── descriptors │ ├── .cvsignore │ ├── descriptor_misc.h │ ├── Makefile.am │ ├── descriptor.h │ ├── tva_rnt_descriptor.h │ ├── descriptor_misc.c │ ├── dsmcc_carousel_descriptor.h │ ├── mhp_ait_descriptor.h │ ├── dsmcc_int_unt_descriptor.h │ ├── descriptor.c │ └── mpeg_descriptor.h ├── version.h ├── dvbsnoop.h └── Makefile.am ├── Makefile.am ├── ChangeLog ├── AUTHORS ├── autogen.sh └── configure.ac /NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/ebu/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/misc/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/pes/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/ts/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/dvb_api/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/net_ip/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/private/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/sections/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/strings/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/testdata/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/tvanytime/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | dvbsnoop 3 | -------------------------------------------------------------------------------- /src/datacarousel/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/descriptors/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/private/default/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/private/eicta.org/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/private/nordig.org/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/private/premiere.de/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /src/strings/identifiers/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = gnu 2 | 3 | SUBDIRS = src 4 | 5 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/ChangeLog -------------------------------------------------------------------------------- /src/net_ip/ip.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/net_ip/ip.c -------------------------------------------------------------------------------- /src/ts/ts_mip.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/ts/ts_mip.c -------------------------------------------------------------------------------- /src/misc/helper.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/misc/helper.c -------------------------------------------------------------------------------- /src/sections/mdt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/sections/mdt.c -------------------------------------------------------------------------------- /src/strings/dvb_str.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/strings/dvb_str.c -------------------------------------------------------------------------------- /src/datacarousel/dsmcc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/datacarousel/dsmcc.c -------------------------------------------------------------------------------- /src/datacarousel/datagram.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/foxsen/dvbsnoop/master/src/datacarousel/datagram.c -------------------------------------------------------------------------------- /src/strings/identifiers/rootOfTrustID.h: -------------------------------------------------------------------------------- 1 | { 0x0000, 0x0001, "Reserved | DVB" }, 2 | { 0x0002, 0x0002, "Content Management License Administrator (CMLA) | CLMA" }, 3 | { 0, 0, NULL } 4 | -------------------------------------------------------------------------------- /src/net_ip/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libnetip.a 4 | 5 | noinst_HEADERS = \ 6 | ip.h 7 | 8 | 9 | libnetip_a_SOURCES = \ 10 | ip.c 11 | 12 | -------------------------------------------------------------------------------- /src/testdata/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libtestdata.a 4 | 5 | noinst_HEADERS = \ 6 | test0x1d.h 7 | 8 | 9 | libtestdata_a_SOURCES = \ 10 | test0x1d.c 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/tvanytime/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libtvanytime.a 4 | 5 | noinst_HEADERS = \ 6 | rnt.h \ 7 | cs.h 8 | 9 | libtvanytime_a_SOURCES = \ 10 | rnt.c \ 11 | cs.c 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/private/eicta.org/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libprivateEictaORG.a 4 | 5 | noinst_HEADERS = \ 6 | eicta_org.h \ 7 | dvb_descriptor_eicta.h 8 | 9 | libprivateEictaORG_a_SOURCES = \ 10 | eicta_org.c \ 11 | dvb_descriptor_eicta.c 12 | 13 | -------------------------------------------------------------------------------- /src/ebu/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libebu.a 4 | 5 | noinst_HEADERS = \ 6 | teletext.h \ 7 | vps.h \ 8 | wss.h \ 9 | ebu_misc.h 10 | 11 | 12 | libebu_a_SOURCES = \ 13 | teletext.c \ 14 | vps.c \ 15 | wss.c \ 16 | ebu_misc.c 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/private/nordig.org/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libprivateNordigORG.a 4 | 5 | noinst_HEADERS = \ 6 | nordig_org.h \ 7 | dvb_descriptor_nordig.h 8 | 9 | libprivateNordigORG_a_SOURCES = \ 10 | nordig_org.c \ 11 | dvb_descriptor_nordig.c 12 | 13 | -------------------------------------------------------------------------------- /src/strings/identifiers/cpSystemID.h: -------------------------------------------------------------------------------- 1 | { 0x0000, 0x0000, "DVB" }, 2 | { 0x0001, 0x0001, "DVB" }, 3 | { 0x0002, 0x0002, "DVB" }, 4 | { 0x0003, 0x00FF, "DVB" }, 5 | { 0x0100, 0x0100, "Digital Transmission Licensing Administrator, LLC" }, 6 | { 0x0101, 0x0101, "Digital Content Protection, LLC" }, 7 | { 0, 0, NULL } 8 | -------------------------------------------------------------------------------- /src/private/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | 4 | 5 | SUBDIRS = \ 6 | default \ 7 | eicta.org \ 8 | nordig.org \ 9 | premiere.de 10 | 11 | noinst_LIBRARIES = libprivate.a 12 | 13 | noinst_HEADERS = \ 14 | userdefs.h 15 | 16 | libprivate_a_SOURCES = \ 17 | userdefs.c 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/sections/bat.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: bat.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_BAT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/cat.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: cat.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_CAT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/dit.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_DIT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/eit.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: eit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_EIT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/nit.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: nit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_NIT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/pat.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pat.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_PAT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/pmt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pmt.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_PMT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/rst.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: rst.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_RST (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/sdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: sdt.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_SDT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/sit.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: sit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_SIT (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/sections/st.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: st.h,v 1.5 2006/01/02 18:24:25 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | void section_ST (u_char *b, int len); 18 | 19 | -------------------------------------------------------------------------------- /src/private/default/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libprivatedefault.a 4 | 5 | noinst_HEADERS = \ 6 | descriptor_private_default.h \ 7 | section_private_default.h 8 | 9 | 10 | libprivatedefault_a_SOURCES = \ 11 | descriptor_private_default.c \ 12 | section_private_default.c 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/ts/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libts.a 4 | 5 | noinst_HEADERS = \ 6 | tslayer.h \ 7 | ts2secpes.h \ 8 | ts_cc_check.h \ 9 | ts_mip.h \ 10 | ts_misc.h 11 | 12 | libts_a_SOURCES = \ 13 | tslayer.c \ 14 | ts2secpes.c \ 15 | ts_cc_check.c \ 16 | ts_mip.c \ 17 | ts_misc.c 18 | 19 | -------------------------------------------------------------------------------- /src/sections/emm_ecm.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: emm_ecm.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | void section_EMM_ECM (u_char *b, int len); 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/datacarousel/llc_snap.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DVBSNOOP 4 | 5 | a dvb sniffer and mpeg2 stream analyzer tool 6 | http://dvbsnoop.sourceforge.net/ 7 | 8 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 9 | 10 | */ 11 | 12 | 13 | #ifndef __LLC_SNAP 14 | #define __LLC_SNAP 1 15 | 16 | int llc_snap (int verbosity, u_char *buf); 17 | 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /src/testdata/test0x1d.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DVBSNOOP 4 | 5 | a dvb sniffer and mpeg2 stream analyzer tool 6 | http://dvbsnoop.sourceforge.net/ 7 | 8 | (c) 2001-2006 Rainer.Scherg@gmx.de 9 | 10 | 11 | */ 12 | 13 | #ifndef __TEST0X1D_H 14 | #define __TEST0X1D_H 15 | 16 | void section_TESTDATA (u_char *b, int len); 17 | 18 | #endif 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/pes/pes_psdir.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DVBSNOOP 4 | 5 | a dvb sniffer and mpeg2 stream analyzer tool 6 | http://dvbsnoop.sourceforge.net/ 7 | 8 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 9 | 10 | 11 | 12 | */ 13 | 14 | #ifndef __PES_PSDIR_H__ 15 | #define __PES_PSDIR_H__ 16 | 17 | void PES_decodePSDIR (u_char *b, int len); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /src/pes/pes_psm.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DVBSNOOP 4 | 5 | a dvb sniffer and mpeg2 stream analyzer tool 6 | http://dvbsnoop.sourceforge.net/ 7 | 8 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 9 | 10 | 11 | 12 | */ 13 | 14 | #ifndef __PES_PSM_H__ 15 | #define __PES_PSM_H__ 16 | 17 | void PES_decodePSM (u_char *b, int len); 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /src/pes/pes_dsmcc.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DVBSNOOP 4 | 5 | a dvb sniffer and mpeg2 stream analyzer tool 6 | http://dvbsnoop.sourceforge.net/ 7 | 8 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 9 | 10 | 11 | 12 | */ 13 | 14 | #ifndef __PES_DSMCC_H__ 15 | #define __PES_DSMCC_H__ 16 | 17 | void PES_decodeDSMCC (u_char *b, int len); 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /src/strings/identifiers/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = \ 2 | bouquetID.h \ 3 | caSystemID.h \ 4 | cpSystemID.h \ 5 | dataBroadcastID.h \ 6 | mhpAITDescriptors.h \ 7 | mhpApplicationTypeID.h \ 8 | mhpOrganisationID.h \ 9 | mhpProtocolID.h \ 10 | networkID.h \ 11 | originalNetworkID.h \ 12 | platformID.h \ 13 | privateDataSpecifierID.h \ 14 | rootOfTrustID.h 15 | -------------------------------------------------------------------------------- /src/strings/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | SUBDIRS = identifiers 4 | 5 | noinst_LIBRARIES = libstrings.a 6 | 7 | noinst_HEADERS = \ 8 | dsmcc_str.h \ 9 | tva_str.h \ 10 | dvb_str.h \ 11 | net_str.h \ 12 | strtable_misc.h 13 | 14 | libstrings_a_SOURCES = \ 15 | dsmcc_str.c \ 16 | tva_str.c \ 17 | dvb_str.c \ 18 | net_str.c \ 19 | strtable_misc.c 20 | 21 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_ts.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_ts.h,v 1.7 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __DMX_TS_H 15 | #define __DMX_TS_H 16 | 17 | 18 | int doReadTS (OPTION *opt); 19 | 20 | 21 | #endif 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/sections/tot.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tot.h,v 1.7 2006/01/02 18:24:25 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __TOT_H 17 | #define __TOT_H 18 | 19 | 20 | void section_TOT (u_char *b, int len); 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /src/tvanytime/cs.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: cs.h,v 1.2 2006/01/02 18:24:46 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __CS_H 17 | #define __CS_H 18 | 19 | 20 | void section_TVA_CS (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_error.h,v 1.4 2005/12/27 23:30:27 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __DMX_ERROR_H 15 | #define __DMX_ERROR_H 16 | 17 | 18 | int IO_error (char *str); 19 | 20 | 21 | #endif 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/net_ip/ip.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ip.h,v 1.1 2006/09/04 15:26:48 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _IP_H 17 | #define _IP_H 18 | 19 | 20 | void net_IP_data (int v, u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/sections/mdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mdt.h,v 1.3 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | #ifndef __MDT_H 18 | #define __MDT_H 19 | 20 | 21 | void section_MDT (u_char *b, int len); 22 | 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /src/sections/tdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tdt.h,v 1.6 2006/01/02 18:24:25 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | #ifndef __TDT_H 18 | #define __TDT_H 19 | 20 | 21 | void section_TDT (u_char *b, int len); 22 | 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /src/tvanytime/rnt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: rnt.h,v 1.4 2006/01/02 18:24:46 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __RNT_H 17 | #define __RNT_H 18 | 19 | 20 | void section_TVA_RNT (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_pes.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_pes.h,v 1.6 2006/01/02 18:23:58 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DMX_PES_H 17 | #define __DMX_PES_H 18 | 19 | 20 | int doReadPES (OPTION *opt); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/sections/tsdt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tsdt.h,v 1.6 2006/01/02 18:24:25 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | #ifndef __TSDT_H 18 | #define __TSDT_H 19 | 20 | 21 | void section_TSDT (u_char *b, int len); 22 | 23 | 24 | #endif 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc.h,v 1.5 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_H 17 | #define __DSMCC_H 18 | 19 | 20 | void section_DSMCC (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/ints.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ints.h,v 1.8 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __INTS_H 17 | #define __INTS_H 18 | 19 | 20 | void section_DSMCC_INT (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/unts.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: unts.h,v 1.4 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __UNTS_H 17 | #define __UNTS_H 18 | 19 | 20 | void section_DSMCC_UNT (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_sect.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_sect.h,v 1.6 2006/01/02 18:23:58 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | #ifndef __DMX_SECT_H 18 | #define __DMX_SECT_H 19 | 20 | 21 | int doReadSECT (OPTION *opt); 22 | 23 | 24 | #endif 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_tspidscan.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_tspidscan.h,v 1.4 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __DMX_TSPIDSCAN_H 15 | #define __DMX_TSPIDSCAN_H 16 | 17 | 18 | int ts_pidscan (OPTION *opt); 19 | 20 | 21 | 22 | #endif 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/pes/pes_std.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_std.h,v 1.4 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PES_STD_H__ 17 | #define __PES_STD_H__ 18 | 19 | void PES_decode_std (u_char *b, int len, u_int PES_streamID); 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /src/private/premiere.de/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libprivatePremiereDE.a 4 | 5 | noinst_HEADERS = \ 6 | premiere_de.h \ 7 | dvb_descriptor_premiere.h \ 8 | section_premiere_cit.h \ 9 | section_premiere_cpt.h 10 | 11 | 12 | libprivatePremiereDE_a_SOURCES = \ 13 | premiere_de.c \ 14 | dvb_descriptor_premiere.c \ 15 | section_premiere_cit.c \ 16 | section_premiere_cpt.c 17 | 18 | -------------------------------------------------------------------------------- /src/strings/identifiers/mhpProtocolID.h: -------------------------------------------------------------------------------- 1 | { 0x0000, 0x0000, "reserved_future_use" }, 2 | { 0x0001, 0x0001, "MHP Object Carousel as defined in annex B, \"(normative): Object Carousel\" on Page 295 of V1.1.1" }, 3 | { 0x0002, 0x0002, "IP via DVB multiprotocol encapsulation as defined in ETSI EN 301 192, ETSI TR 101 202" }, 4 | { 0x0003, 0x00FF, "reserved_future_use" }, 5 | { 0x0100, 0xFFFF, "[subject to registration by DVB]" }, 6 | { 0, 0, NULL } 7 | -------------------------------------------------------------------------------- /src/datacarousel/ait.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ait.h,v 1.4 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __AIT_H 17 | #define __AIT_H 18 | 19 | 20 | 21 | void section_MHP_AIT (u_char *b, int len); 22 | 23 | 24 | 25 | #endif 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/dvb_api/fe_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: fe_info.h,v 1.2 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __FE_INFO_H 15 | #define __FE_INFO_H 16 | 17 | 18 | #include "misc/cmdline.h" 19 | 20 | int do_FE_Info (OPTION *opt); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/pes/pes_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_data.h,v 1.4 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PES_DATA_H 17 | #define __PES_DATA_H 18 | 19 | 20 | void PES_decodeDATA_private_stream_1 (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/datacarousel/biop_message.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop_message.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _BIOP_MESSAGE 17 | #define _BIOP_MESSAGE 18 | 19 | 20 | u_long BIOP_Message (int v, u_char *b); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/datacarousel/datagram.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: datagram.h,v 1.6 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _DATAGRAM_H 17 | #define _DATAGRAM_H 18 | 19 | 20 | void section_DSMCC_DATAGRAM (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/pes/pes_data_ebu.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_data_ebu.h,v 1.3 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PES_DATA_EBU_H 17 | #define __PES_DATA_EBU_H 18 | 19 | 20 | void PES_decodeDATA_EBU_etc (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/pes/pes_data_sync.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_data_sync.h,v 1.3 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PES_DATA_SYNC_H 17 | #define __PES_DATA_SYNC_H 18 | 19 | 20 | void PES_decodeDATA_SYNC (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/datacarousel/biop_modinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop_modinfo.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _BIOP_MODINFO 17 | #define _BIOP_MODINFO 18 | 19 | 20 | int BIOP_ModuleInfo (int v, u_char *b, u_int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_tspidbandwidth.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_tspidbandwidth.h,v 1.4 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __DMX_TSPIDBANDWIDTH_H 15 | #define __DMX_TSPIDBANDWIDTH_H 16 | 17 | 18 | int ts_pidbandwidth (OPTION *opt); 19 | 20 | 21 | #endif 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/dvb_api/fe_signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: fe_signal.h,v 1.3 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __FE_SIGNAL_H 15 | #define __FE_SIGNAL_H 16 | 17 | 18 | #include "misc/cmdline.h" 19 | 20 | int do_SignalStrength (OPTION *opt); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/pes/mpeg_sysheader.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpeg_sysheader.h,v 1.2 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __MPEG_SYS_HEADER__ 17 | #define __MPEG_SYS_HEADER__ 18 | 19 | 20 | void mpeg_system_header (int v, u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/pes/pes_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_misc.h,v 1.4 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PES_MISC_H__ 17 | #define __PES_MISC_H__ 18 | 19 | 20 | void print_xTS_field (int v, const char *str, u_char *b, int bit_offset); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_unm.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_unm.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_UNM_H 17 | #define __DSMCC_UNM_H 18 | 19 | 20 | int dsmcc_UserNetworkMessage (int v, u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/misc/crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: crc32.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Code Module CRC32 taken von linuxtv.org 14 | 15 | */ 16 | 17 | 18 | 19 | #ifndef __CRC32_H 20 | #define __CRC32_H 21 | 22 | 23 | u_long crc32 (char *data, int len); 24 | 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/pes/mpeg_packheader.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpeg_packheader.h,v 1.2 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __MPEG_PACK_HEADER__ 17 | #define __MPEG_PACK_HEADER__ 18 | 19 | 20 | void mpeg_pack_header (int v, u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_ddb.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_ddb.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_DDB_H 17 | #define __DSMCC_DDB_H 18 | 19 | 20 | int dsmcc_DownloadDataMessage (int v, u_char *b, u_int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/iop_ior.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: iop_ior.h,v 1.3 2006/03/06 00:04:50 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _IOP_IOR 17 | #define _IOP_IOR 18 | 19 | 20 | int IOP_IOR (int v, u_char *b); 21 | u_long IOP_taggedProfile (int v, u_char *b); 22 | 23 | 24 | #endif 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/biop_servgatinf.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop_servgatinf.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _BIOP_SERVGATINF 17 | #define _BIOP_SERVGATINF 18 | 19 | 20 | int BIOP_ServiceGatewayInfo (int v, u_char *b, u_int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/datacarousel/mpe_fec.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpe_fec.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __MPE_FEC_H 17 | #define __MPE_FEC_H 18 | 19 | 20 | void section_MPE_FEC (u_char *b, int len); 21 | int real_time_parameters (u_char *b); 22 | 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /src/ebu/wss.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: wss.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- misc routines for EBU WSS (Wide Screen Signalling) 14 | 15 | 16 | 17 | */ 18 | 19 | #ifndef _WSS_H_ 20 | #define _WSS_H_ 21 | 22 | 23 | void print_wss_decode (int v, u_char *b); 24 | 25 | 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_grpinfind.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_grpinfind.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_GRPINFIND_H 17 | #define __DSMCC_GRPINFIND_H 18 | 19 | int dsmcc_GroupInfoIndication (int v, u_char *b, u_int len); 20 | 21 | 22 | #endif 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_unm_dii.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_unm_dii.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_UNM_DII_H 17 | #define __DSMCC_UNM_DII_H 18 | 19 | 20 | int dsmcc_DownloadInfoIndication (int v, u_char *b, u_int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_unm_dsi.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_unm_dsi.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_UNM_DSI_H 17 | #define __DSMCC_UNM_DSI_H 18 | 19 | 20 | int dsmcc_DownloadServerInitiate (int v, u_char *b, u_int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/ebu/vps.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: vps.h,v 1.2 2006/01/02 18:24:03 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- misc routines for EBU Video Programming System 14 | 15 | 16 | 17 | */ 18 | 19 | #ifndef _VPS_H_ 20 | #define _VPS_H_ 21 | 22 | 23 | int print_vps_decode (int v, u_char *b, int len); 24 | 25 | 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/strings/net_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: net_str.h,v 1.2 2009/11/22 15:36:31 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | -- Network strings (IP, UDP, ICMP) 14 | 15 | */ 16 | 17 | 18 | #ifndef __NET_STR_H 19 | #define __NET_STR_H 20 | 21 | 22 | char *netStr_RFC790_protocol_nr (u_int i); 23 | 24 | 25 | #endif 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_unm_dlcancel.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_unm_dlcancel.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_UNM_DLCANCEL_H 17 | #define __DSMCC_UNM_DLCANCEL_H 18 | 19 | 20 | int dsmcc_DownloadCancel (int v, u_char *b, u_int len); 21 | 22 | 23 | #endif 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/private/premiere.de/section_premiere_cit.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: section_premiere_cit.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _SECTION_PREMIERE_CIT_H 17 | #define _SECTION_PREMIERE_CIT_H 18 | 19 | 20 | void section_PRIVATE_PremiereDE_CIT (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/private/premiere.de/section_premiere_cpt.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: section_premiere_cpt.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _SECTION_PREMIERE_CPT_H 17 | #define _SECTION_PREMIERE_CPT_H 18 | 19 | 20 | void section_PRIVATE_PremiereDE_CPT (u_char *b, int len); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/datacarousel/biop_tag_tap.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop_tag_tap.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _BIOP_TAG_TAP 17 | #define _BIOP_TAG_TAP 18 | 19 | 20 | u_long BIOP_TAG_dispatch (int v, u_char *b); 21 | int BIOP_TAP (int v, const char *str, u_char *b); 22 | 23 | 24 | #endif 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/private/default/section_private_default.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: section_private_default.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | 18 | #ifndef __SECTION_PRIVATE_DEFAULT_H 19 | #define __SECTION_PRIVATE_DEFAULT_H 20 | 21 | 22 | void section_PRIVATE_default (u_char *b, int len); 23 | 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/mhp_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mhp_misc.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __MHP_MISC_H 17 | #define __MHP_MISC_H 18 | 19 | 20 | int mhp_application_identifier (int v, u_char *b); 21 | int mhp_application_profile_version (int v, u_char *b); 22 | 23 | 24 | #endif 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/private/default/descriptor_private_default.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: descriptor_private_default.h,v 1.3 2009/11/22 15:36:18 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | #ifndef __DESCRIPTOR_PRIVATE_DEFAULT_H 16 | #define __DESCRIPTOR_PRIVATE_DEFAULT_H 17 | 18 | 19 | void descriptor_PRIVATE_default (u_char *b); 20 | 21 | 22 | #endif 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/pes/pespacket.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pespacket.h,v 1.11 2006/01/02 18:24:12 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PESPACKET_H__ 17 | #define __PESPACKET_H__ 18 | 19 | void processPS_PES_packet (u_int pid, long pkt_nr, u_char *buf, int len); 20 | void decodePS_PES_packet (u_char *b, u_int len, int pid); 21 | 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /src/ts/ts_cc_check.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ts_cc_check.h,v 1.2 2006/01/02 18:24:34 rasc Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __TS_CC_CHECK_H 18 | #define __TS_CC_CHECK_H 19 | 20 | 21 | void ts_cc_init (void); 22 | void ts_cc_free (void); 23 | void ts_cc_SetPid (int pid); 24 | char *ts_cc_StatusStr (int cc); 25 | 26 | 27 | #endif 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/misc/pid_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pid_mem.h,v 1.3 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | #ifndef __PID_MEM 16 | #define __PID_MEM 17 | 18 | 19 | 20 | void init_PidMemory (void); 21 | int store_PidToMem (int pid); 22 | int get_UnusedPidFromMem (void); 23 | void mark_PidMem_as_used (int pid); 24 | 25 | 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/misc/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libmisc.a 4 | 5 | noinst_HEADERS = \ 6 | cmdline.h \ 7 | helper.h \ 8 | hexprint.h \ 9 | output.h \ 10 | pkt_time.h \ 11 | pid_mem.h \ 12 | packet_mem.h \ 13 | print_header.h \ 14 | crc32.h \ 15 | sig_abort.h 16 | 17 | 18 | libmisc_a_SOURCES = \ 19 | cmdline.c \ 20 | helper.c \ 21 | hexprint.c \ 22 | output.c \ 23 | pkt_time.c \ 24 | pid_mem.c \ 25 | packet_mem.c \ 26 | print_header.c \ 27 | crc32.c \ 28 | sig_abort.c 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/misc/print_header.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: print_header.h,v 1.4 2006/01/02 18:24:04 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __PRINT_HEADER_H 17 | #define __PRINT_HEADER_H 18 | 19 | #include "misc/cmdline.h" 20 | 21 | 22 | void print_packet_header (OPTION *opt, char *packetTyp, u_int pid, int count, int length); 23 | 24 | 25 | #endif 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/descriptors/descriptor_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: descriptor_misc.h,v 1.4 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Descriptors misc. routines, helpers, etc. 14 | 15 | */ 16 | 17 | 18 | #ifndef _DESCRIPTOR_MISC_H 19 | #define _DESCRIPTOR_MISC_H 20 | 21 | 22 | void out_nl_calc_NPT (int v, unsigned long long npt); 23 | 24 | 25 | #endif 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/strings/tva_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tva_str.h,v 1.3 2009/11/22 15:36:31 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | -- TV-Anytime Strings 14 | 15 | */ 16 | 17 | 18 | #ifndef __TVA_STR_H 19 | #define __TVA_STR_H 20 | 21 | 22 | char *tvaStrTVA_DescriptorTAG (u_int i); 23 | 24 | char *tvastr_CRI_DATA_scheduled_flag (u_int i); 25 | 26 | 27 | 28 | 29 | #endif 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/sections/sectables.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: sectables.h,v 1.6 2006/01/02 18:24:24 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | 18 | #ifndef __SECTABLES_H 19 | #define __SECTABLES_H 20 | 21 | 22 | void processSI_packet (u_int pid, long packet_nr, u_char *b, int len); 23 | void decodeSI_packet (u_char *buf, int len, u_int pid); 24 | 25 | 26 | #endif 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/private/eicta.org/eicta_org.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: eicta_org.h,v 1.1 2008/08/30 19:23:40 obi Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private Data Structures for: 14 | -- eicta.org 15 | 16 | */ 17 | 18 | #ifndef _EICTA_ORG_H 19 | #define _EICTA_ORG_H_ 20 | 21 | #include "private/userdefs.h" 22 | 23 | void getPrivate_EictaORG ( PRIV_SECTION_ID_FUNC **psect, 24 | PRIV_DESCR_ID_FUNC **pdesc); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/misc/sig_abort.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: sig_abort.h,v 1.3 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Handle Kill/Interrupt Signals from User/OS 14 | -- (e.g. Kill -1) 15 | 16 | */ 17 | 18 | 19 | #ifndef __SIG_ABORT_H 20 | #define __SIG_ABORT_H 21 | 22 | 23 | void initOSSigHandler (void); 24 | int isSigAbort (void); 25 | void restoreOSSigHandler (void); 26 | 27 | 28 | #endif 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/private/_read_me.txt: -------------------------------------------------------------------------------- 1 | 2 | Private Data Decoding 3 | ===================== 4 | 5 | Here is a place to provide code and structures 6 | for decoding of private/userdef section tables or descriptors. 7 | 8 | If you know section or descriptor strcutures of "private" 9 | protocols or provider defined structures, please let the 10 | author know. 11 | 12 | 13 | Please check for legal issues, when using provider specific 14 | data structures in your own software! 15 | Using these data structures may require a certification or 16 | licensing process by the provider. 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/ebu/teletext.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: teletext.h,v 1.5 2006/01/02 18:24:03 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- misc routines for EBU teletext 14 | 15 | 16 | 17 | */ 18 | 19 | #ifndef _TELETEXT_H_ 20 | #define _TELETEXT_H_ 21 | 22 | 23 | int print_teletext_control_decode (int v, u_char *b, int len); 24 | void print_teletext_data_x0_x25 (int v, char *s, u_char *b, int len); 25 | 26 | 27 | 28 | #endif 29 | 30 | 31 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Authors: 2 | 3 | Rainer Scherg (rasc) 4 | Andreas Oberritter (obi) 5 | 6 | 7 | Change, bugfixes and adaptions also by members of the 8 | tuxbox (linux@dbox2) development team (for more info please 9 | read the modification history in the files). 10 | Tnx for all the help to the team. 11 | 12 | Special thanks to all helping to improve dvbsnoop by sending 13 | code snippsets, ideas, bug reports, etc. Please see changelog 14 | for more information. 15 | 16 | 17 | (c) 2001-2006 Rainer Scherg (rasc) 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/misc/hexprint.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: hexprint.h,v 1.9 2006/01/02 18:24:04 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | 15 | */ 16 | 17 | #ifndef __HEXPRINT_H 18 | #define __HEXPRINT_H 19 | 20 | void setHexPrintMode (int i); 21 | void printhex_buf (int verbose, u_char *buf, int len); 22 | void printhexline_buf (int verbose, u_char *buf, int len); 23 | void printasciiline_buf (int verbose, u_char *buf, int n); 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /src/misc/pkt_time.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pkt_time.h,v 1.11 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | #ifndef __PKT_TIME 16 | #define __PKT_TIME 17 | 18 | 19 | #include "cmdline.h" 20 | #include "sys/time.h" 21 | 22 | 23 | 24 | void out_receive_time (int verbose, OPTION *opt); 25 | void init_receive_time (void); 26 | long delta_time_ms (struct timeval *tv, struct timeval *tv_last); 27 | 28 | 29 | #endif 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/descriptors/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libdescriptors.a 4 | 5 | noinst_HEADERS = \ 6 | descriptor.h \ 7 | dvb_descriptor.h \ 8 | mpeg_descriptor.h \ 9 | dsmcc_carousel_descriptor.h \ 10 | dsmcc_int_unt_descriptor.h \ 11 | mhp_ait_descriptor.h \ 12 | tva_rnt_descriptor.h \ 13 | descriptor_misc.h 14 | 15 | 16 | libdescriptors_a_SOURCES = \ 17 | descriptor.c \ 18 | dvb_descriptor.c \ 19 | mpeg_descriptor.c \ 20 | dsmcc_carousel_descriptor.c \ 21 | dsmcc_int_unt_descriptor.c \ 22 | mhp_ait_descriptor.c \ 23 | tva_rnt_descriptor.c \ 24 | descriptor_misc.c 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/datacarousel/biop.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _BIOP 17 | #define _BIOP 18 | 19 | 20 | u_long BIOP_BIOPProfileBody (int v, u_char *b); 21 | u_long BIOP_LiteOptionsProfileBody (int v, u_char *b); 22 | u_long BIOP_LiteComponent (int v, u_char *b); 23 | u_long BIOP_ObjectLocation (int v, u_char *b); 24 | int BIOP_Name (int v, u_char *b, u_long *p_kinddata); 25 | 26 | 27 | #endif 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/private/nordig.org/nordig_org.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: nordig_org.h,v 1.2 2009/11/22 15:36:18 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private Data Structures for: 14 | -- nordig.org 15 | 16 | */ 17 | 18 | 19 | 20 | #ifndef _NORDIG_ORG_H 21 | #define _NORDIG_ORG_H_ 22 | 23 | 24 | #include "private/userdefs.h" 25 | 26 | 27 | void getPrivate_NordigORG ( PRIV_SECTION_ID_FUNC **psect, 28 | PRIV_DESCR_ID_FUNC **pdesc); 29 | 30 | 31 | 32 | #endif 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/private/nordig.org/dvb_descriptor_nordig.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dvb_descriptor_nordig.h,v 1.3 2009/11/22 15:36:18 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- private DVB Descriptors nordig.org 14 | 15 | */ 16 | 17 | 18 | #ifndef _NORDIG_DVB_DESCRIPTOR_H 19 | #define _NORDIG_DVB_DESCRIPTOR_H 20 | 21 | 22 | void descriptor_PRIVATE_NordigORG_LogicChannelDescriptor (u_char *b); 23 | void descriptor_PRIVATE_NordigORG_ContentProtectionDescriptor (u_char *b); 24 | 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /src/private/premiere.de/premiere_de.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: premiere_de.h,v 1.4 2009/11/22 15:36:20 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private Data Structures for: 14 | -- Premiere.de 15 | 16 | */ 17 | 18 | 19 | 20 | #ifndef _PREMIERE_DE_H 21 | #define _PREMIERE_DE_H_ 22 | 23 | 24 | #include "private/userdefs.h" 25 | 26 | 27 | void getPrivate_PremiereDE ( PRIV_SECTION_ID_FUNC **psect, 28 | PRIV_DESCR_ID_FUNC **pdesc); 29 | 30 | 31 | 32 | #endif 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/dvb_api/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src \ 2 | -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 3 | 4 | 5 | noinst_LIBRARIES = libdvbapi.a 6 | 7 | noinst_HEADERS = \ 8 | dvb_api.h \ 9 | file_io.h \ 10 | dmx_pes.h \ 11 | dmx_sect.h \ 12 | dmx_ts.h \ 13 | dmx_tspidscan.h \ 14 | dmx_tspidbandwidth.h \ 15 | dmx_error.h \ 16 | fe_signal.h \ 17 | fe_info.h \ 18 | fe_misc.h 19 | 20 | 21 | libdvbapi_a_SOURCES = \ 22 | dmx_pes.c \ 23 | dmx_sect.c \ 24 | dmx_ts.c \ 25 | dmx_tspidscan.c \ 26 | dmx_tspidbandwidth.c \ 27 | dmx_error.c \ 28 | fe_signal.c \ 29 | fe_info.c \ 30 | fe_misc.c 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/pes/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libpes.a 4 | 5 | noinst_HEADERS = \ 6 | pespacket.h \ 7 | pes_std.h \ 8 | pes_dsmcc.h \ 9 | pes_psm.h \ 10 | pes_psdir.h \ 11 | pes_data.h \ 12 | pes_data_sync.h \ 13 | pes_data_ebu.h \ 14 | pes_misc.h \ 15 | mpeg_packheader.h \ 16 | mpeg_sysheader.h \ 17 | mpeg2_video.h 18 | 19 | 20 | libpes_a_SOURCES = \ 21 | pespacket.c \ 22 | pes_std.c \ 23 | pes_dsmcc.c \ 24 | pes_psm.c \ 25 | pes_psdir.c \ 26 | pes_data.c \ 27 | pes_data_sync.c \ 28 | pes_data_ebu.c \ 29 | pes_misc.c \ 30 | mpeg_packheader.c \ 31 | mpeg_sysheader.c \ 32 | mpeg2_video.c 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/misc/packet_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: packet_mem.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __PACKET_MEM_H 18 | #define __PACKET_MEM_H 19 | 20 | 21 | int packetMem_acquire (u_long requested_length); 22 | void packetMem_free (int handle); 23 | void packetMem_clear (int handle); 24 | u_long packetMem_length (int handle); 25 | u_char *packetMem_buffer_start (int handle); 26 | int packetMem_add_data (int handle, u_char *buf, u_long len); 27 | 28 | 29 | #endif 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/sections/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libsections.a 4 | 5 | noinst_HEADERS = \ 6 | sectables.h \ 7 | bat.h \ 8 | cat.h \ 9 | dit.h \ 10 | eit.h \ 11 | eit.h \ 12 | mdt.h \ 13 | nit.h \ 14 | pat.h \ 15 | pmt.h \ 16 | rst.h \ 17 | sdt.h \ 18 | sit.h \ 19 | st.h \ 20 | tdt.h \ 21 | tot.h \ 22 | tsdt.h \ 23 | emm_ecm.h 24 | 25 | 26 | libsections_a_SOURCES = \ 27 | sectables.c \ 28 | bat.c \ 29 | cat.c \ 30 | dit.c \ 31 | eit.c \ 32 | mdt.c \ 33 | nit.c \ 34 | pat.c \ 35 | pmt.c \ 36 | rst.c \ 37 | sdt.c \ 38 | sit.c \ 39 | st.c \ 40 | tdt.c \ 41 | tot.c \ 42 | tsdt.c \ 43 | emm_ecm.c 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/descriptors/descriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: descriptor.h,v 1.13 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Descriptors Section 14 | 15 | */ 16 | 17 | 18 | #ifndef __DESCRIPTOR_H 19 | #define __DESCRIPTOR_H 20 | 21 | 22 | // Descriptor tag space/scope... 23 | typedef enum { 24 | MPEG, DVB_SI, 25 | DSMCC_STREAM, DSMCC_CAROUSEL, DSMCC_INT_UNT, MHP_AIT, TVA_RNT 26 | } DTAG_SCOPE; 27 | 28 | 29 | int descriptor (u_char *b, DTAG_SCOPE s); 30 | void descriptor_any (u_char *b); 31 | 32 | 33 | #endif 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/datacarousel/biop_dsm.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop_dsm.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef _BIOP_DSM 17 | #define _BIOP_DSM 18 | 19 | 20 | int BIOP_DSM_ConnBinder (int v, u_char *b); 21 | int BIOP_DSM_ServiceLocation (int v, u_char *b); 22 | int BIOP_DSM_ServiceDomain (int v, u_char *b, int len); 23 | int BIOP_DSM_CosNaming_Name (int v, u_char *b); 24 | int BIOP_DSM_Stream_Info_T (int v, u_char *b); 25 | int BIOP_DSM_Event_EventList_T (int v, u_char *b); 26 | 27 | 28 | #endif 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/descriptors/tva_rnt_descriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tva_rnt_descriptor.h,v 1.3 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private TAG Space TS 102 323 TV-Anytime 14 | -- RNT Descriptors 15 | 16 | */ 17 | 18 | 19 | #ifndef __TVA_RNT_DESCRIPTOR_H 20 | #define __TVA_RNT_DESCRIPTOR_H 21 | 22 | 23 | int descriptorTVA (u_char *b); 24 | 25 | void descriptorTVA_RAR_over_DVB_stream (u_char *b); 26 | void descriptorTVA_RAR_over_IP_stream (u_char *b); 27 | void descriptorTVA_RNT_scan (u_char *b); 28 | 29 | 30 | #endif 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/private/premiere.de/dvb_descriptor_premiere.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dvb_descriptor_premiere.h,v 1.4 2009/11/22 15:36:20 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- private DVB Descriptors Premiere.de 14 | 15 | */ 16 | 17 | 18 | #ifndef _PREMIERE_DVB_DESCRIPTOR_H 19 | #define _PREMIERE_DVB_DESCRIPTOR_H 20 | 21 | 22 | void descriptor_PRIVATE_PremiereDE_ContentOrder (u_char *b); 23 | void descriptor_PRIVATE_PremiereDE_ParentalInformation (u_char *b); 24 | void descriptor_PRIVATE_PremiereDE_ContentTransmission (u_char *b); 25 | 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /src/ts/ts_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ts_misc.h,v 1.1 2006/02/12 23:17:13 rasc Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __TS_MISC_H 18 | #define __TS_MISC_H 19 | 20 | 21 | // -- Transport Stream Packet Header Data 22 | 23 | typedef struct _tsphd { 24 | int sync; 25 | int tei; 26 | int pusi; 27 | int tprio; 28 | int tsc; 29 | int afc; 30 | int pid; 31 | int cc; 32 | } TSPHD; 33 | 34 | 35 | 36 | int decodeTS_PacketHeader (u_char *b, TSPHD *header_data); 37 | int check_TS_PID_special (u_int pid); 38 | 39 | 40 | #endif 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/strings/strtable_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: strtable_misc.c,v 1.4 2009/11/22 15:36:31 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | -- String table misc. 14 | 15 | */ 16 | 17 | #include "strtable_misc.h" 18 | 19 | /* 20 | -- match id in range from STR_TABLE 21 | */ 22 | 23 | char *findTableID (STR_TABLE *t, u_int id) 24 | 25 | { 26 | 27 | while (t->str) { 28 | if (t->from <= id && t->to >= id) 29 | return (char *) t->str; 30 | t++; 31 | } 32 | 33 | return (char *) ">>ERROR: not (yet) defined... Report!<<"; 34 | } 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/ebu/ebu_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ebu_misc.h,v 1.4 2006/01/02 18:24:03 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __EBU_MISC_H 17 | #define __EBU_MISC_H 18 | 19 | 20 | void unParityTeletextData (u_char *b, int len); 21 | 22 | u_char unhamB84 (u_char c); 23 | u_char unhamW84 (u_char lsb, u_char msb); 24 | u_long unhamT24_18 (u_char lsb, u_char msb1, u_char msb2); 25 | 26 | 27 | u_char invertChar (u_char *b); 28 | void invertBuffer (u_char *b, int len); 29 | 30 | 31 | void ebu_rfl_out (int v, u_char *b); 32 | 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /src/strings/strtable_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: strtable_misc.h,v 1.2 2005/12/27 23:30:30 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __STRTABLE_MISC_H 18 | #define __STRTABLE_MISC_H 19 | 20 | 21 | #include "dvbsnoop.h" 22 | 23 | 24 | 25 | typedef struct _STR_TABLE { 26 | u_int from; /* e.g. from id 1 */ 27 | u_int to; /* to id 3 */ 28 | const char *str; /* is string xxx */ 29 | } STR_TABLE; 30 | 31 | 32 | 33 | 34 | char *findTableID (STR_TABLE *t, u_int id); 35 | 36 | 37 | #endif 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/ts/ts_mip.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ts_mip.h,v 1.1 2006/02/12 23:17:13 rasc Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __TS_MIP_H 18 | #define __TS_MIP_H 19 | 20 | 21 | void decodeTS_MIP (u_char *b, int len); 22 | 23 | int MIP_function (u_char *b); 24 | 25 | void MIP_FUNC_tx_time_offset (u_char *b); 26 | void MIP_FUNC_tx_frequency_offset (u_char *b); 27 | void MIP_FUNC_tx_power (u_char *b); 28 | void MIP_FUNC_private_data (u_char *b); 29 | void MIP_FUNC_cell_id (u_char *b); 30 | void MIP_FUNC_enable (u_char *b); 31 | void MIP_FUNC_bandwidth (u_char *b); 32 | 33 | 34 | #endif 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: version.h,v 1.20 2007/06/02 12:26:09 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2007 Rainer.Scherg@gmx.de 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __VERSION_H 17 | #define __VERSION_H 18 | 19 | /* 20 | * Version set in configure.ac 21 | */ 22 | #define DVBSNOOP_VERSION PACKAGE_VERSION 23 | #define DVBSNOOP_PROG_VERSION "dvbsnoop V"PACKAGE_VERSION 24 | 25 | 26 | #define DVBSNOOP_URL "http://dvbsnoop.sourceforge.net/" 27 | #define DVBSNOOP_COPYRIGHT "(c) 2001-2007 Rainer Scherg (rasc)\n\nThis is a modified version of dvbsnoop, see https://github.com/cotdp/dvbsnoop for more info." 28 | 29 | 30 | #endif 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/private/eicta.org/dvb_descriptor_eicta.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dvb_descriptor_eicta.h,v 1.1 2008/08/30 19:23:40 obi Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- private DVB Descriptors eicta.org 14 | 15 | */ 16 | 17 | #ifndef _EICTA_DVB_DESCRIPTOR_H 18 | #define _EICTA_DVB_DESCRIPTOR_H 19 | 20 | void descriptor_PRIVATE_EictaORG_LogicalChannelDescriptor (u_char *b); 21 | void descriptor_PRIVATE_EictaORG_PreferredNameListDescriptor (u_char *b); 22 | void descriptor_PRIVATE_EictaORG_PreferredNameIdentifierDescriptor (u_char *b); 23 | void descriptor_PRIVATE_EictaORG_EacemStreamIdentifierDescriptor (u_char *b); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/ts/tslayer.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tslayer.h,v 1.12 2006/07/19 20:05:46 rasc Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __TSLAYER_H 18 | #define __TSLAYER_H 19 | 20 | 21 | void processTS_packet (u_int pid, long packet_nr, u_char *b, int len); 22 | void decodeTS_packet (u_char *b, int len); 23 | 24 | void decodeTS_iso13818 (u_char *b, int len); 25 | void decodeTS_NullPacket (u_char *b, int len); 26 | int ts_adaptation_field (u_char *b); 27 | int ts_adaptation_field_extension (u_char *b); 28 | int print_PCR_field (int v, const char *str, u_char *b, int bit_offset); 29 | 30 | 31 | #endif 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/private/default/descriptor_private_default.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: descriptor_private_default.c,v 1.3 2009/11/22 15:36:18 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Descriptors 14 | 15 | */ 16 | 17 | 18 | #include "dvbsnoop.h" 19 | #include "descriptor_private_default.h" 20 | #include "misc/helper.h" 21 | #include "misc/output.h" 22 | 23 | 24 | 25 | 26 | 27 | 28 | /* 29 | User defined descriptor (Basic Descriptor output) 30 | ETSI 300 468 // ISO 13818-1 31 | */ 32 | 33 | void descriptor_PRIVATE_default (u_char *b) 34 | { 35 | int len; 36 | 37 | // tag = b[0]; 38 | len = b[1]; 39 | 40 | print_databytes (4,"Descriptor-data:", b+2, len); 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/dvb_api/file_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: file_io.h,v 1.3 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __FILE_IO_H 15 | #define __FILE_IO_H 16 | 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | 28 | #ifndef O_LARGEFILE 29 | /* dummy Flag, if not supported */ 30 | #warning "No large file support..." 31 | #define O_LARGEFILE 0x00 32 | #endif 33 | 34 | 35 | #ifndef O_BINARY 36 | /* dummy Flag, if not supported - needed for CYGWIN support */ 37 | #define O_BINARY 0x00 38 | #endif 39 | 40 | 41 | #endif 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/testdata/test0x1d.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: test0x1d.c,v 1.11 2009/11/22 15:36:32 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | 14 | -- test data section 15 | -- DVB test and measurement signalling channel 16 | -- ETSI TR 101 291 17 | 18 | */ 19 | 20 | #include "dvbsnoop.h" 21 | #include "test0x1d.h" 22 | #include "misc/output.h" 23 | #include "misc/hexprint.h" 24 | 25 | void section_TESTDATA (u_char *b, int len) 26 | { 27 | 28 | out_nl (3,"TESTDATA-decoding...."); 29 | 30 | outBit_Sx_NL (3,"Table_ID: ", b, 0, 6); 31 | outBit_Sx_NL (3,"priority_level: ", b, 6, 2); 32 | outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); 33 | 34 | 35 | // $$$ TODO ... 36 | print_databytes(5,"Data:",b,len); 37 | 38 | } 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/dvb_api/dmx_error.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dmx_error.c,v 1.4 2009/11/22 15:36:07 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- simple error output for DMX & file I/O 14 | 15 | */ 16 | 17 | 18 | #include 19 | #include 20 | #include 21 | 22 | 23 | 24 | int IO_error (char *str) 25 | { 26 | char *s; 27 | int err; 28 | 29 | 30 | s = (str) ? str : ""; 31 | err = errno; 32 | 33 | switch (err) { 34 | 35 | case EOVERFLOW: 36 | fprintf (stderr, 37 | "Error(%d): %s: Buffer overflow, stream bandwidth to high\n", 38 | err,s); 39 | break; 40 | 41 | default: 42 | fprintf (stderr,"Error(%d): ",err); 43 | perror(s); 44 | break; 45 | 46 | } 47 | 48 | return err; 49 | 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/ts/ts2secpes.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ts2secpes.h,v 1.8 2006/01/02 18:24:34 rasc Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de 12 | 13 | 14 | */ 15 | 16 | 17 | #ifndef __TS2SECPES_H 18 | #define __TS2SECPES_H 19 | 20 | 21 | int ts2SecPesInit (void); 22 | void ts2SecPesFree (void); 23 | int ts2SecPes_AddPacketStart (int pid, int cc, u_char *b, u_int len); 24 | int ts2SecPes_AddPacketContinue (int pid, int cc, u_char *b, u_int len); 25 | 26 | void ts2SecPes_subdecode (u_char *b, int len, u_int pid); 27 | int ts2SecPes_checkAndDo_PacketSubdecode_Output (void); 28 | int ts2SecPes_LastPacketReadSubdecode_Output (void); 29 | void ts2SecPes_Output_subdecode (u_int overleap_bytes); 30 | 31 | void ts2sec_multipacket (u_char *b, int len, u_int pid); 32 | void ts2ps_pes_multipacket (u_char *b, int len, u_int pid); 33 | 34 | 35 | 36 | 37 | #endif 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/descriptors/descriptor_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: descriptor_misc.c,v 1.3 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | -- Descriptors misc. routines, helpers, etc. 15 | 16 | */ 17 | 18 | 19 | #include "dvbsnoop.h" 20 | #include "misc/helper.h" 21 | #include "misc/output.h" 22 | 23 | 24 | 25 | 26 | void out_nl_calc_NPT (int v, unsigned long long npt) 27 | { 28 | long sec,usec; 29 | 30 | /* 31 | system clock frequency == (90kHz) 32 | NPT_seconds = NPT / (System_Clock_Frequency / 300) 33 | NPT_microseconds = ( (NPT * 1000000) / (System_Clock_Frequency / 300) ) 34 | - (NPT_seconds * 1000000) 35 | */ 36 | 37 | sec = npt / (300); 38 | usec= ((npt * 10000) / 3) - (sec * 1000000); 39 | 40 | out_nl (v," [= %lu.%06lu sec]",sec,usec); 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/strings/net_str.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: net_str.c,v 1.2 2009/11/22 15:36:31 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | -- Network strings (IP, UDP, ICMP) 14 | 15 | */ 16 | 17 | #include "dvbsnoop.h" 18 | #include "net_str.h" 19 | #include "strtable_misc.h" 20 | 21 | /* 22 | -- Assigned Internet Protocol Numbers 23 | -- RFC 790 24 | -- (incomplete, only stuff used with DVB) 25 | */ 26 | 27 | char *netStr_RFC790_protocol_nr (u_int i) 28 | { 29 | STR_TABLE Table[] = { 30 | { 0x00, 0x00, "Reserved" }, 31 | { 0x01, 0x01, "ICMP" }, 32 | { 0x03, 0x03, "Gateway-to-Gateway" }, 33 | { 0x06, 0x06, "TCP" }, 34 | { 0x11, 0x11, "UDP" }, 35 | 36 | { 0x00, 0xFF, "see: RFC790" }, // filler to match all entries 37 | { 0,0, NULL } 38 | }; 39 | 40 | return findTableID (Table, i); 41 | } 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/strings/identifiers/mhpApplicationTypeID.h: -------------------------------------------------------------------------------- 1 | { 0x0000, 0x0001, "Reserved | DVB" }, 2 | { 0x0002, 0x0002, "DVB-HTML | DVB" }, 3 | { 0x0003, 0x0003, "MediaHighway | Canal+ Technologies" }, 4 | { 0x0004, 0x0004, "CLI application | Microsoft Corporation" }, 5 | { 0x0005, 0x0005, "MediaHighway Declarative Applications | Canal+ Technologies" }, 6 | { 0x0006, 0x0006, "DCAP-J: DCAP Java applications | ATSC/CableLabs" }, 7 | { 0x0007, 0x0007, "DCAP-X: DCAP XHTML applications | ATSC/CableLabs" }, 8 | { 0x0008, 0x0008, "MHEG | DTG" }, 9 | { 0x0009, 0x0009, "H4TV applications | French DTT" }, 10 | { 0x0010, 0x0010, "CE-HTML / Open IPTV Forum profile | German hybrid broadcast / broadband profile group" }, 11 | { 0x4000, 0x7FFF, "Application_ids for signed applications" }, 12 | { 0x8000, 0xFFFD, "Reserved for future use by DVB | DVB" }, 13 | { 0xFFFE, 0xFFFE, "Special wildcard value for signed applications of an organisation | DVB" }, 14 | { 0xFFFF, 0xFFFF, "Special wildcard value for all applications of an organisation | DVB" }, 15 | { 0, 0, NULL } 16 | -------------------------------------------------------------------------------- /src/datacarousel/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/src 2 | 3 | noinst_LIBRARIES = libdatacarousel.a 4 | 5 | noinst_HEADERS = \ 6 | ait.h \ 7 | dsmcc.h \ 8 | ints.h \ 9 | unts.h \ 10 | mpe_fec.h \ 11 | datagram.h \ 12 | dsmcc_ddb.h \ 13 | dsmcc_unm.h \ 14 | dsmcc_unm_dsi.h \ 15 | dsmcc_unm_dii.h \ 16 | dsmcc_unm_dlcancel.h \ 17 | dsmcc_misc.h \ 18 | dsmcc_grpinfind.h \ 19 | biop.h \ 20 | biop_dsm.h \ 21 | biop_message.h \ 22 | biop_tag_tap.h \ 23 | biop_modinfo.h \ 24 | biop_servgatinf.h \ 25 | iop_ior.h \ 26 | mhp_misc.h \ 27 | llc_snap.h 28 | 29 | 30 | libdatacarousel_a_SOURCES = \ 31 | ait.c \ 32 | dsmcc.c \ 33 | ints.c \ 34 | unts.c \ 35 | mpe_fec.c \ 36 | datagram.c \ 37 | dsmcc_ddb.c \ 38 | dsmcc_unm.c \ 39 | dsmcc_unm_dsi.c \ 40 | dsmcc_unm_dii.c \ 41 | dsmcc_unm_dlcancel.c \ 42 | dsmcc_misc.c \ 43 | dsmcc_grpinfind.c \ 44 | biop.c \ 45 | biop_dsm.c \ 46 | biop_message.c \ 47 | biop_tag_tap.c \ 48 | biop_modinfo.c \ 49 | biop_servgatinf.c \ 50 | iop_ior.c \ 51 | mhp_misc.c \ 52 | llc_snap.c 53 | 54 | -------------------------------------------------------------------------------- /src/private/nordig.org/nordig_org.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: nordig_org.c,v 1.3 2009/11/22 15:36:18 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private Data Structures for: 14 | -- nordig.org 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "nordig_org.h" 23 | #include "dvb_descriptor_nordig.h" 24 | 25 | 26 | static PRIV_DESCR_ID_FUNC pdescriptors[] = { 27 | { 0x83, DVB_SI, descriptor_PRIVATE_NordigORG_LogicChannelDescriptor }, 28 | { 0xA0, DVB_SI, descriptor_PRIVATE_NordigORG_ContentProtectionDescriptor }, 29 | { 0x00, 0, NULL } // end of table (id = 0x00, funct = NULL) 30 | }; 31 | 32 | // 33 | // -- Return private section/descriptor id tables 34 | // -- for this scope 35 | // 36 | 37 | void getPrivate_NordigORG ( PRIV_SECTION_ID_FUNC **psect, 38 | PRIV_DESCR_ID_FUNC **pdesc) 39 | { 40 | *psect = NULL; 41 | *pdesc = pdescriptors; 42 | } 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | package="dvbsnoop" 4 | 5 | srcdir=`dirname $0` 6 | test -z "$srcdir" && srcdir=. 7 | 8 | cd "$srcdir" 9 | DIE=0 10 | 11 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { 12 | echo 13 | echo "You must have autoconf installed to compile $package." 14 | echo "Download the appropriate package for your system," 15 | echo "or get the source from one of the GNU ftp sites" 16 | echo "listed in http://www.gnu.org/order/ftp.html" 17 | DIE=1 18 | } 19 | 20 | (automake --version) < /dev/null > /dev/null 2>&1 || { 21 | echo 22 | echo "You must have automake installed to compile $package." 23 | echo "Download the appropriate package for your system," 24 | echo "or get the source from one of the GNU ftp sites" 25 | echo "listed in http://www.gnu.org/order/ftp.html" 26 | DIE=1 27 | } 28 | 29 | if test "$DIE" -eq 1; then 30 | exit 1 31 | fi 32 | 33 | echo "Generating configuration files for $package, please wait...." 34 | 35 | echo " aclocal" 36 | aclocal 37 | echo " autoconf" 38 | autoconf 39 | echo " automake --add-missing" 40 | automake --add-missing 41 | 42 | -------------------------------------------------------------------------------- /src/private/eicta.org/eicta_org.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: eicta_org.c,v 1.1 2008/08/30 19:23:40 obi Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private Data Structures for: 14 | -- eicta.org 15 | 16 | */ 17 | 18 | #include "dvbsnoop.h" 19 | #include "eicta_org.h" 20 | #include "dvb_descriptor_eicta.h" 21 | 22 | static PRIV_DESCR_ID_FUNC pdescriptors[] = { 23 | { 0x83, DVB_SI, descriptor_PRIVATE_EictaORG_LogicalChannelDescriptor }, 24 | { 0x84, DVB_SI, descriptor_PRIVATE_EictaORG_PreferredNameListDescriptor }, 25 | { 0x85, DVB_SI, descriptor_PRIVATE_EictaORG_PreferredNameIdentifierDescriptor }, 26 | { 0x86, DVB_SI, descriptor_PRIVATE_EictaORG_EacemStreamIdentifierDescriptor }, 27 | { 0x00, 0, NULL } // end of table (id = 0x00, funct = NULL) 28 | }; 29 | 30 | // 31 | // -- Return private section/descriptor id tables 32 | // -- for this scope 33 | // 34 | 35 | void getPrivate_EictaORG ( PRIV_SECTION_ID_FUNC **psect, 36 | PRIV_DESCR_ID_FUNC **pdesc) 37 | { 38 | *psect = NULL; 39 | *pdesc = pdescriptors; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /src/private/userdefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: userdefs.h,v 1.3 2005/12/29 02:43:38 rasc Exp $ 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | 17 | 18 | #ifndef _USERDEFS_H_ 19 | #define _USERDEFS_H_ 20 | 21 | 22 | #include "descriptors/descriptor.h" 23 | 24 | 25 | 26 | typedef struct _PRIVATE_SECTION_STRUCTURES_FUNC { 27 | u_int table_id; /* section table ID */ 28 | void (*func)(); /* function for table decoding */ 29 | } PRIV_SECTION_ID_FUNC; 30 | 31 | 32 | typedef struct _PRIVATE_DESCRIPTOR_STRUCTURES_FUNC { 33 | u_int descriptor_tag; /* descriptor tag ID */ 34 | DTAG_SCOPE tag_scope; /* MPEG, DVB_SI, DSMCC_STREAM, ... */ 35 | void (*func)(); /* function for descriptor decoding */ 36 | } PRIV_DESCR_ID_FUNC; 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | void section_PRIVATE (u_char *b, int len); 45 | void descriptor_PRIVATE (u_char *b, DTAG_SCOPE scope); 46 | 47 | void set_PRIVATE_ProviderStr (char *s); 48 | void list_PRIVATE_ProviderStrs (void); 49 | 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /src/strings/identifiers/mhpAITDescriptors.h: -------------------------------------------------------------------------------- 1 | { 0x00, 0x00, "Reserved | DVB" }, 2 | { 0x66, 0x66, "Abstract Service Descriptor | Cable Television Laboratories, Inc." }, 3 | { 0x67, 0x67, "Unbound Application Descriptor | Cable Television Laboratories, Inc." }, 4 | { 0x68, 0x68, "Privileged Certification Descriptor | Cable Television Laboratories, Inc." }, 5 | { 0x69, 0x69, "Application Storage Descriptor | Cable Television Laboratories, Inc." }, 6 | { 0x6A, 0x6A, "OCAP_J Registered API Descriptor | Cable Television Laboratories, Inc." }, 7 | { 0x6B, 0x6B, "OCAP 1.0: OC-SP-OCAP1.0 V1.0.2: Table 11-12: addressing_descriptor | Cable Television Laboratories, Inc." }, 8 | { 0x6C, 0x6C, "OCAP 1.0: OC-SP-OCAP1.0 V1.0.2: Table 11-19: addressing_attribute_descriptor | Cable Television Laboratories, Inc." }, 9 | { 0x6D, 0x6D, "OCAP 1.0: OC-SP-OCAP1.0 V1.0.2: Table 11-20: addressable_application_descriptor | Cable Television Laboratories, Inc." }, 10 | { 0x6E, 0x6E, "OCAP: multiple_screen_usage_descriptor | Cable Television Laboratories, Inc." }, 11 | { 0x6F, 0x6F, "OCAP: application_mode_descriptor | Cable Television Laboratories, Inc." }, 12 | { 0x80, 0xFF, "Reserved for future use" }, 13 | { 0, 0, NULL } 14 | -------------------------------------------------------------------------------- /src/strings/tva_str.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tva_str.c,v 1.3 2009/11/22 15:36:31 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | -- TV-ANYTIME -Strings 14 | 15 | */ 16 | 17 | #include "dvbsnoop.h" 18 | #include "tva_str.h" 19 | #include "strtable_misc.h" 20 | 21 | 22 | /* 23 | -- TVA RNT Descriptors 24 | */ 25 | 26 | char *tvaStrTVA_DescriptorTAG (u_int i) 27 | { 28 | STR_TABLE Table[] = { 29 | { 0x40, 0x40, "RAR_over_DVB_stream_descriptor" }, 30 | { 0x41, 0x41, "RAR_over_IP_descriptor" }, 31 | { 0x42, 0x42, "RNT_scan_descriptor" }, 32 | { 0,0, NULL } 33 | }; 34 | 35 | return findTableID (Table, i); 36 | } 37 | 38 | 39 | /* 40 | -- TVA RNT scheduling flag 41 | */ 42 | 43 | char *tvastr_CRI_DATA_scheduled_flag (u_int i) 44 | { 45 | STR_TABLE Table[] = { 46 | { 0x00, 0x00, "referenced CRI data is delivered continuously" }, 47 | { 0x01, 0x01, "referenced CRI data is scheduled" }, 48 | { 0,0, NULL } 49 | }; 50 | 51 | return findTableID (Table, i); 52 | } 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/dvbsnoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dvbsnoop.h,v 1.25 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2005 Rainer.Scherg@gmx.de 11 | 12 | */ 13 | 14 | #ifndef __DVBSNOOP_H 15 | #define __DVBSNOOP_H 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "version.h" 24 | #include "misc/helper.h" 25 | #include "misc/output.h" 26 | 27 | 28 | 29 | // 30 | // -- some DVB definitions 31 | // 32 | 33 | #define MAX_PID 0x1FFF 34 | #define PID_FULL_TS 0x2000 /* special PID for reading full/raw TS */ 35 | /* THIS is defined by Linux DVB-API !! */ 36 | 37 | #define DUMMY_PID 0xFFFF /* special if no pid is needed */ 38 | #define INVALID_PID 0xFEFE /* a invalid PID*/ 39 | 40 | 41 | 42 | 43 | // 44 | // -- BSD style type shortcuts... 45 | // -- may be already defined by system (typedef in linux/types.h) 46 | // -- so we overwrite this via #define to avoid compiler warnings 47 | // 48 | 49 | #define u_char unsigned char 50 | #define u_int unsigned int 51 | #define u_long unsigned long 52 | 53 | 54 | #endif 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/descriptors/dsmcc_carousel_descriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_carousel_descriptor.h,v 1.17 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private TAG Space DSM-CC 14 | -- DSM-CC Carousel Descriptors 15 | 16 | */ 17 | 18 | 19 | #ifndef __DSMCC_CAROUSEL_DESCRIPTOR_H 20 | #define __DSMCC_CAROUSEL_DESCRIPTOR_H 21 | 22 | 23 | int descriptorDSMCC_CAROUSEL (u_char *b); 24 | 25 | void descriptorDSMCC_type (u_char *b); 26 | void descriptorDSMCC_name (u_char *b); 27 | void descriptorDSMCC_info (u_char *b); 28 | void descriptorDSMCC_module_link (u_char *b); 29 | void descriptorDSMCC_crc32 (u_char *b); 30 | void descriptorDSMCC_location (u_char *b); 31 | void descriptorDSMCC_est_download_time (u_char *b); 32 | void descriptorDSMCC_group_link (u_char *b); 33 | void descriptorDSMCC_compressed_module (u_char *b); 34 | void descriptorDSMCC_subgroup_association (u_char *b); 35 | 36 | void descriptorDSMCC_MHP_label (u_char *b); 37 | void descriptorDSMCC_MHP_caching_priority (u_char *b); 38 | void descriptorDSMCC_MHP_content_type (u_char *b); 39 | 40 | 41 | #endif 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/datacarousel/mhp_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mhp_misc.c,v 1.5 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | 16 | 17 | #include "dvbsnoop.h" 18 | #include "mhp_misc.h" 19 | #include "strings/dvb_str.h" 20 | #include "strings/dsmcc_str.h" 21 | #include "misc/output.h" 22 | 23 | 24 | 25 | 26 | /* 27 | * used in AIT and in descriptors 28 | * ETSI TS 102 812 29 | */ 30 | 31 | int mhp_application_identifier (int v, u_char *b) 32 | { 33 | outBit_Sx_NL (v,"organisation_id: ", b, 0, 32); 34 | outBit_S2x_NL (v,"appliction_id: ", b, 32, 16, 35 | (char *(*)(u_long)) dsmccStrMHP_application_id ); 36 | return 6; 37 | } 38 | 39 | 40 | 41 | 42 | /* 43 | * used in AIT and in descriptors 44 | * ETSI TS 102 812 45 | */ 46 | 47 | int mhp_application_profile_version (int v, u_char *b) 48 | { 49 | outBit_Sx_NL (v,"application_profile: ", b, 0, 16); 50 | outBit_Sx_NL (v,"version.major: ", b, 16, 8); 51 | outBit_Sx_NL (v,"version.minor: ", b, 24, 8); 52 | outBit_Sx_NL (v,"version.micro: ", b, 32, 8); 53 | 54 | return 5; 55 | } 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT([dvbsnoop],[1.4.5X],[rasc@users.sourceforge.net]) 2 | AM_INIT_AUTOMAKE([dist-bzip2 no-define]) 3 | 4 | AC_PROG_CC 5 | AC_PROG_RANLIB 6 | 7 | AC_ARG_WITH(dvbincludes, 8 | [ --with-dvbincludes=PATH path for dvb includes [[NONE]]], 9 | [DVBINCLUDES="$withval"],[DVBINCLUDES=""]) 10 | 11 | if test "$DVBINCLUDES"; then 12 | CPPFLAGS="$CPPFLAGS -I$DVBINCLUDES" 13 | fi 14 | 15 | AC_CHECK_HEADER([linux/dvb/dmx.h]) 16 | AC_CHECK_HEADER([ost/dmx.h]) 17 | 18 | if test "$ac_cv_header_ost_dmx_h" = yes; then 19 | AC_DEFINE([HAVE_OST_DMX_H]) 20 | elif test "$ac_cv_header_linux_dvb_dmx_h" = yes; then 21 | AC_DEFINE([HAVE_LINUX_DVB_DMX_H]) 22 | else 23 | AC_MSG_ERROR([linux dvb api headers are required to build dvbsnoop]) 24 | fi 25 | 26 | AC_OUTPUT([ 27 | Makefile 28 | src/Makefile 29 | src/datacarousel/Makefile 30 | src/descriptors/Makefile 31 | src/dvb_api/Makefile 32 | src/ebu/Makefile 33 | src/misc/Makefile 34 | src/pes/Makefile 35 | src/sections/Makefile 36 | src/strings/Makefile 37 | src/strings/identifiers/Makefile 38 | src/testdata/Makefile 39 | src/ts/Makefile 40 | src/tvanytime/Makefile 41 | src/private/Makefile 42 | src/private/default/Makefile 43 | src/private/eicta.org/Makefile 44 | src/private/nordig.org/Makefile 45 | src/private/premiere.de/Makefile 46 | src/net_ip/Makefile 47 | ]) 48 | 49 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_unm_dlcancel.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_unm_dlcancel.c,v 1.3 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- dsmcc download Cancel 13 | -- to be called from U-N-Message 14 | 15 | */ 16 | 17 | 18 | 19 | 20 | #include "dvbsnoop.h" 21 | #include "dsmcc_unm_dlcancel.h" 22 | #include "dsmcc_misc.h" 23 | #include "misc/output.h" 24 | #include "misc/hexprint.h" 25 | 26 | 27 | 28 | 29 | 30 | /* 31 | * ISO/IEC 13818-6 32 | * dsmcc_DownloadCancel 33 | */ 34 | 35 | 36 | int dsmcc_DownloadCancel (int v, u_char *b, u_int len) 37 | { 38 | int len_org = len; 39 | int len2; 40 | 41 | 42 | 43 | 44 | // already read dsmcc_MessageHeader (v, b, len, &dmh); 45 | 46 | outBit_Sx_NL (v,"downloadId: ", b, 0, 32); 47 | outBit_Sx_NL (v,"moduleId: ", b, 32, 16); 48 | outBit_Sx_NL (v,"blockNumber: ", b, 48, 16); 49 | outBit_Sx_NL (v,"downloadCancelReason: ", b, 64, 8); 50 | outBit_Sx_NL (v,"reserved: ", b, 72, 8); 51 | 52 | len2 = outBit_Sx_NL (v,"privateDataLength: ", b, 80, 16); 53 | 54 | b += 12; 55 | len -= 12; 56 | 57 | print_databytes (v, "private data: ", b, len); 58 | 59 | return len_org; 60 | } 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/sections/tdt.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tdt.c,v 1.10 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- TDT section 14 | -- Time Date Table 15 | -- ETSI EN 300 468 5.2.5 16 | 17 | */ 18 | 19 | #include "dvbsnoop.h" 20 | #include "tdt.h" 21 | #include "strings/dvb_str.h" 22 | #include "misc/output.h" 23 | 24 | 25 | void section_TDT (u_char *b, int len) 26 | { 27 | 28 | u_int table_id; 29 | u_long UTC_time_MJD; 30 | u_long UTC_time_UTC; 31 | 32 | 33 | 34 | out_nl (3,"TDT-decoding...."); 35 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 36 | (char *(*)(u_long)) dvbstrTableID ); 37 | if (table_id != 0x70) { 38 | out_nl (3,"wrong Table ID"); 39 | return; 40 | } 41 | 42 | 43 | 44 | outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); 45 | outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); 46 | outBit_Sx_NL (6,"reserved_2: ", b, 10, 2); 47 | outBit_Sx_NL (3,"Section_length: ", b, 12, 12); 48 | 49 | 50 | out (3,"UTC_time: "); 51 | UTC_time_MJD = getBits (b, 0, 24, 16); 52 | UTC_time_UTC = getBits (b, 0, 40, 24); 53 | print_time40 (3, UTC_time_MJD,UTC_time_UTC); 54 | out_NL (3); 55 | 56 | } 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | bin_PROGRAMS = dvbsnoop 3 | 4 | INCLUDES = \ 5 | -I$(top_srcdir) 6 | 7 | EXTRA_DIST = \ 8 | $(man_MANS) 9 | 10 | 11 | SUBDIRS = \ 12 | dvb_api \ 13 | pes \ 14 | ts \ 15 | datacarousel \ 16 | tvanytime \ 17 | testdata \ 18 | descriptors \ 19 | sections \ 20 | private \ 21 | ebu \ 22 | net_ip \ 23 | strings \ 24 | misc 25 | 26 | 27 | noinst_HEADERS = \ 28 | dvbsnoop.h \ 29 | version.h 30 | 31 | dvbsnoop_SOURCES = \ 32 | dvbsnoop.c 33 | 34 | 35 | dvbsnoop_LDADD = \ 36 | $(top_builddir)/src/dvb_api/libdvbapi.a \ 37 | $(top_builddir)/src/pes/libpes.a \ 38 | $(top_builddir)/src/sections/libsections.a \ 39 | $(top_builddir)/src/ts/libts.a \ 40 | $(top_builddir)/src/datacarousel/libdatacarousel.a \ 41 | $(top_builddir)/src/tvanytime/libtvanytime.a \ 42 | $(top_builddir)/src/testdata/libtestdata.a \ 43 | $(top_builddir)/src/descriptors/libdescriptors.a \ 44 | $(top_builddir)/src/private/libprivate.a \ 45 | $(top_builddir)/src/private/default/libprivatedefault.a \ 46 | $(top_builddir)/src/private/eicta.org/libprivateEictaORG.a \ 47 | $(top_builddir)/src/private/nordig.org/libprivateNordigORG.a \ 48 | $(top_builddir)/src/private/premiere.de/libprivatePremiereDE.a \ 49 | $(top_builddir)/src/ebu/libebu.a \ 50 | $(top_builddir)/src/net_ip/libnetip.a \ 51 | $(top_builddir)/src/strings/libstrings.a \ 52 | $(top_builddir)/src/misc/libmisc.a 53 | 54 | man_MANS = dvbsnoop.1 55 | 56 | -------------------------------------------------------------------------------- /src/pes/mpeg2_video.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpeg2_video.h,v 1.3 2005/12/27 23:30:29 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | #ifndef __MPEG2_VIDEO__ 17 | #define __MPEG2_VIDEO__ 18 | 19 | 20 | void MPEG2_decodeSequenceEnd (int v, u_char *b, int len); 21 | void MPEG2_decodeUserData (int v, u_char *b, int len); 22 | void MPEG2_decodeGroupOfPictures (int v, u_char *b, int len); 23 | void MPEG2_decodeSequenceHeader (int v, u_char *b, int len); 24 | void MPEG2_decodePictureHeader (int v, u_char *b, int len); 25 | 26 | void MPEG2_decodeExtension (int v, u_char *b, int len); 27 | void MPEG2_decodeSequenceExtension (int v, u_char *b, int len); 28 | void MPEG2_decodeSequenceDisplayExtension (int v, u_char *b, int len); 29 | void MPEG2_decodeSequenceScalableExtension (int v, u_char *b, int len); 30 | void MPEG2_decodePictureCodingExtension (int v, u_char *b, int len); 31 | void MPEG2_decodeQuantMatrixExtension (int v, u_char *b, int len); 32 | void MPEG2_decodePictureDisplayExtension (int v, u_char *b, int len); 33 | void MPEG2_decodePictureTemporalScalableExtension (int v, u_char *b, int len); 34 | void MPEG2_decodePictureSpatialScalableExtension (int v, u_char *b, int len); 35 | void MPEG2_decodeCopyrightExtension (int v, u_char *b, int len); 36 | 37 | void MPEG2_decodeSlice (int v, u_char *b, int len); 38 | 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /src/descriptors/mhp_ait_descriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mhp_ait_descriptor.h,v 1.8 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private TAG Space MHP AIT 14 | -- MHP AIT Descriptors 15 | 16 | */ 17 | 18 | 19 | #ifndef __MHP_AIT_DESCRIPTOR_H 20 | #define __MHP_AIT_DESCRIPTOR_H 21 | 22 | 23 | int descriptorMHP_AIT (u_char *b); 24 | 25 | void descriptorMHP_AIT_application (u_char *b); 26 | void descriptorMHP_AIT_application_name (u_char *b); 27 | void descriptorMHP_AIT_transport_protocol (u_char *b); 28 | void descriptorMHP_AIT_dvb_j_application (u_char *b); 29 | void descriptorMHP_AIT_dvb_j_application_location (u_char *b); 30 | void descriptorMHP_AIT_external_application_authorisation (u_char *b); 31 | void descriptorMHP_AIT_dvb_html_application (u_char *b); 32 | void descriptorMHP_AIT_dvb_html_application_location (u_char *b); 33 | void descriptorMHP_AIT_dvb_html_application_boundary (u_char *b); 34 | void descriptorMHP_AIT_application_icons (u_char *b); 35 | void descriptorMHP_AIT_pre_fetch (u_char *b); 36 | void descriptorMHP_AIT_DII_location (u_char *b); 37 | void descriptorMHP_AIT_delegated_application (u_char *b); 38 | void descriptorMHP_AIT_plug_in (u_char *b); 39 | void descriptorMHP_AIT_application_storage (u_char *b); 40 | void descriptorMHP_AIT_ip_signalling (u_char *b); 41 | 42 | 43 | 44 | #endif 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/strings/identifiers/platformID.h: -------------------------------------------------------------------------------- 1 | { 0x000000, 0x000000, "Reserved | DVB" }, 2 | { 0x000001, 0x000001, "TV digitale mobile | Telecom Italia s.p.a" }, 3 | { 0x000002, 0x000002, "Digita TV Mobile 1 | Digita Oy" }, 4 | { 0x000003, 0x000003, "Digita TV Mobile 2 | Digita Oy" }, 5 | { 0x000004, 0x000004, "TV digitale mobile | Telecom Italia s.p.a" }, 6 | { 0x0000A2A0, 0x0000A2A0, "Kentavr | Kentavr" }, 7 | { 0x028001, 0x028001, "DVB-H Austria" }, 8 | { 0x090001, 0x090001, "Dialog Mobile TV" }, 9 | { 0x0E9001, 0x0E9001, "Levira Mobile TV | Levira AS" }, 10 | { 0x168001, 0x168001, "PT MAC | PT. Mediatama Anugrah Citra" }, 11 | { 0x168002, 0x168002, "Trenmobile | PT. Citra Karya Investasi" }, 12 | { 0x170001, 0x170001, "Mobision | Alsumaria TV" }, 13 | { 0x1CA001, 0x1CA001, "MiTV Networks Broadcast Terrestrial Network" }, 14 | { 0x210001, 0x210001, "DVB-H by Digitenne" }, 15 | { 0x260001, 0x260001, "Dream Mobile TV | Philippines Multimedia System, Inc." }, 16 | { 0x260002, 0x260002, "MyTV | 360media (SMART)" }, 17 | { 0x00260003, 0x00260003, "RMN Platform | Radio Mindanao Network Inc." }, 18 | { 0x283001, 0x283001, "Dominanta" }, 19 | { 0x2E0001, 0x2E0001, "Sudatel Mobile TV | Sudatel" }, 20 | { 0x348001, 0x348001, "ICO mim | ICO Satellite Services G.P." }, 21 | { 0x00704001, 0x00704001, "VTC MobileTV | VTC Mobile TV" }, 22 | { 0xFFF000, 0xFFFFFE, "Managed by the network operator, and may be used for IP/MAC Platforms supporting services only withi" }, 23 | { 0xFFFFFF, 0xFFFFFF, "Reserved | DVB" }, 24 | { 0, 0, NULL } 25 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_misc.h,v 1.10 2006/03/06 20:25:37 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __DSMCC_MISC_H 17 | #define __DSMCC_MISC_H 18 | 19 | 20 | 21 | // U-N defines (server messages only) 22 | 23 | #define DownloadInfoIndication 0x1002 24 | #define DownloadDataBlock 0x1003 25 | #define DownloadCancel 0x1005 26 | #define DownloadServerInitiate 0x1006 27 | 28 | 29 | // data from dsmcc_message_header 30 | typedef struct _DSMCC_MSG_HEADER { 31 | int msg_len; 32 | int dsmccType; 33 | int messageId; 34 | u_long transaction_id; // also download_id 35 | } DSMCC_MSG_HD; 36 | 37 | 38 | 39 | 40 | int dsmcc_pto_descriptor_loop (char *name, u_char *b); 41 | int dsmcc_CompatibilityDescriptor(u_char *b); 42 | 43 | int dsmcc_MessageHeader (int v, u_char *b, int len, DSMCC_MSG_HD *dmh); 44 | int dsmcc_AdaptationHeader (int v, u_char *b, int len); 45 | int dsmcc_ConditionalAccess (int v, u_char *b, int len); 46 | int dsmcc_UserID (int v, u_char *b, int len); 47 | 48 | u_long dsmcc_print_transactionID_32 (int v, u_char *b); 49 | 50 | int dsmcc_carousel_NSAP_address_B20 (int v, const char *s, u_char *b); 51 | int dsmcc_CarouselDescriptor_Loop (const char *s, u_char *b, int len); 52 | int dsmcc_DVB_service_location (int v, u_char *b); 53 | 54 | 55 | #endif 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/misc/print_header.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: print_header.c,v 1.8 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | #include 16 | 17 | #include "dvbsnoop.h" 18 | #include "print_header.h" 19 | #include "misc/cmdline.h" 20 | #include "misc/output.h" 21 | #include "misc/pkt_time.h" 22 | 23 | 24 | 25 | 26 | void print_packet_header (OPTION *opt, char *packetTyp, u_int pid, int count, int length) 27 | 28 | { 29 | char str[50]; 30 | char *s; 31 | 32 | 33 | if (pid != DUMMY_PID) { 34 | sprintf (str,"%u (0x%04x)",pid,pid); 35 | s = str; 36 | } else { 37 | s = "(Unkown PID)"; 38 | } 39 | 40 | // Full Transport Stream Read? 41 | if (opt->ts_raw_mode && (opt->packet_mode == TS)) { 42 | s = "(Full TS read)"; 43 | } 44 | 45 | 46 | out_nl (1,"\n------------------------------------------------------------"); 47 | out_nl (1,"%s-Packet: %08ld PID: %s, Length: %d (0x%04x)", 48 | packetTyp, count, s, length,length); 49 | 50 | if (opt->inpPidFile) { 51 | out_nl (1,"from file: %s",opt->inpPidFile); 52 | } else { 53 | out_receive_time (1, opt); 54 | } 55 | 56 | // if (skipped_bytes) { 57 | // out_nl (1,"Syncing %s... (%ld bytes skipped)", 58 | // packetTyp,skipped_bytes); 59 | // } 60 | 61 | out_nl (1,"------------------------------------------------------------"); 62 | 63 | 64 | } 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_unm.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_unm.c,v 1.4 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- dsmcc User Network Message 13 | -- ISO/IEC 13818-6:2000 7. User-Network Download 14 | 15 | */ 16 | 17 | 18 | 19 | 20 | #include "dvbsnoop.h" 21 | #include "dsmcc_unm.h" 22 | #include "dsmcc_unm_dsi.h" 23 | #include "dsmcc_unm_dii.h" 24 | #include "dsmcc_unm_dlcancel.h" 25 | #include "dsmcc_misc.h" 26 | #include "misc/output.h" 27 | #include "misc/hexprint.h" 28 | 29 | 30 | 31 | 32 | 33 | 34 | /* 35 | * ISO/IEC 13818-6 36 | * user Network Message 37 | */ 38 | 39 | 40 | int dsmcc_UserNetworkMessage (int v, u_char *b, int len) 41 | { 42 | int x; 43 | int len_org = len; 44 | DSMCC_MSG_HD dmh; 45 | 46 | 47 | 48 | x = dsmcc_MessageHeader (v, b, len, &dmh); 49 | b += x; 50 | len -= x; 51 | 52 | switch (dmh.messageId) { 53 | case DownloadInfoIndication: 54 | dsmcc_DownloadInfoIndication (v, b, len); 55 | break; 56 | 57 | case DownloadServerInitiate: 58 | dsmcc_DownloadServerInitiate (v, b, len); 59 | break; 60 | 61 | case DownloadCancel: 62 | dsmcc_DownloadCancel (v, b, len); 63 | break; 64 | 65 | default: 66 | out_nl (v,"unsupported messageId (please report!)"); 67 | print_databytes (v, "Data bytes: ", b, len); 68 | break; 69 | } 70 | 71 | 72 | return len_org; 73 | } 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/pes/pes_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_misc.c,v 1.12 2009/11/22 15:36:13 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | -- PS misc. 15 | -- PES misc. 16 | 17 | */ 18 | 19 | 20 | 21 | 22 | #include "dvbsnoop.h" 23 | #include "pes_misc.h" 24 | #include "strings/dvb_str.h" 25 | #include "misc/hexprint.h" 26 | #include "misc/helper.h" 27 | #include "misc/output.h" 28 | 29 | 30 | 31 | 32 | /* 33 | * PTS // DTS 34 | * Len is 36 bits fixed 35 | */ 36 | 37 | void print_xTS_field (int v, const char *str, u_char *b, int bit_offset) 38 | { 39 | long long xTS_32_30; 40 | long long xTS_29_15; 41 | long long xTS_14_0; 42 | long long ull; 43 | int bo = bit_offset; 44 | int v1 = v+1; 45 | 46 | 47 | out_nl (v,"%s:",str); 48 | indent (+1); 49 | 50 | xTS_32_30 = outBit_Sx_NL (v1,"bit[32..30]: ", b, bo+0, 3); 51 | outBit_Sx_NL (v1,"marker_bit: ", b, bo+3, 1); 52 | xTS_29_15 = outBit_Sx_NL (v1,"bit[29..15]: ", b, bo+4, 15); 53 | outBit_Sx_NL (v1,"marker_bit: ", b, bo+19, 1); 54 | xTS_14_0 = outBit_Sx_NL (v1,"bit[14..0]: ", b, bo+20,15); 55 | outBit_Sx_NL (v1,"marker_bit: ", b, bo+35, 1); 56 | 57 | ull = (xTS_32_30<<30) + (xTS_29_15<<15) + xTS_14_0; 58 | out (v," ==> %s: ", str); 59 | print_timebase90kHz (v, ull); 60 | out_NL (v); 61 | 62 | indent (-1); 63 | } 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/sections/st.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: st.c,v 1.9 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- ST section (stuffing) 14 | 15 | */ 16 | 17 | #include "dvbsnoop.h" 18 | #include "st.h" 19 | #include "strings/dvb_str.h" 20 | #include "misc/output.h" 21 | #include "misc/hexprint.h" 22 | 23 | /* 24 | -- ST section (stuffing) 25 | -- ETSI EN 300 468 5.2.8 26 | */ 27 | 28 | void section_ST (u_char *b, int len) 29 | { 30 | 31 | typedef struct _ST { 32 | u_int table_id; 33 | u_int section_syntax_indicator; 34 | u_int reserved_1; 35 | u_int reserved_2; 36 | u_int section_length; 37 | 38 | // N databytes 39 | 40 | } ST; 41 | 42 | 43 | ST s; 44 | 45 | 46 | 47 | s.table_id = b[0]; 48 | s.section_syntax_indicator = getBits (b, 0, 8, 1); 49 | s.reserved_1 = getBits (b, 0, 9, 1); 50 | s.reserved_2 = getBits (b, 0, 10, 2); 51 | s.section_length = getBits (b, 0, 12, 12); 52 | 53 | 54 | out_nl (3,"ST-decoding...."); 55 | out_S2B_NL (3,"Table_ID: ",s.table_id, dvbstrTableID (s.table_id)); 56 | if (s.table_id != 0x72) { 57 | out_nl (3,"wrong Table ID"); 58 | return; 59 | } 60 | 61 | out_SB_NL (3,"section_syntax_indicator: ",s.section_syntax_indicator); 62 | out_SB_NL (6,"reserved_1: ",s.reserved_1); 63 | out_SB_NL (6,"reserved_2: ",s.reserved_2); 64 | out_SW_NL (5,"Section_length: ",s.section_length); 65 | 66 | b += 3; 67 | print_databytes (3,"Section data:", b, s.section_length); 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/pes/pes_data.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_data.c,v 1.6 2009/11/22 15:36:13 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2007 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | -- PES Data Privat_stream_1 15 | -- Data Packet Synchronous and synchronized data streaming 16 | 17 | */ 18 | 19 | 20 | 21 | 22 | #include "dvbsnoop.h" 23 | #include "pes_data.h" 24 | #include "pes_data_ebu.h" 25 | #include "pes_data_sync.h" 26 | // $$$ TODO #include "pes_dvb_subtitles.h" 27 | #include "strings/dvb_str.h" 28 | #include "misc/helper.h" 29 | #include "misc/hexprint.h" 30 | #include "misc/output.h" 31 | 32 | 33 | 34 | 35 | 36 | /* 37 | -- Data Packet Synchronous and synchronized data streaming 38 | -- Privat_stream_1 39 | */ 40 | 41 | void PES_decodeDATA_private_stream_1 (u_char *b, int len) 42 | { 43 | u_int data_identifier; 44 | 45 | 46 | // -- Data Buffer starts at PES_DATA_BYTES... 47 | 48 | data_identifier = getBits (b, 0, 0, 8); 49 | 50 | 51 | 52 | // -- Async Data Streaming will be done as private_stream_2 (pes_std) 53 | 54 | 55 | if (data_identifier >= 0x10 && data_identifier <= 0x1F) { 56 | 57 | // Teletext EBU data (see EN 300 472) 58 | PES_decodeDATA_EBU_etc (b, len); 59 | 60 | } else if (data_identifier == 0x20) { 61 | 62 | // DVB subtitling (see EN 300 743) 63 | // $$$ TODO -- PES_decodeDATA_dvb_subtitles (b, len); 64 | print_databytes (4,"TODO dvb subtitles:", b, len); 65 | 66 | 67 | } else { 68 | 69 | // default sync. data streams (see EN 301 192) 70 | PES_decodeDATA_SYNC (b, len); 71 | 72 | } 73 | 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/descriptors/dsmcc_int_unt_descriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_int_unt_descriptor.h,v 1.15 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Private TAG Space DSM-CC INT, UNT, ... 14 | -- DSM-CC INT/UNT Descriptors 15 | 16 | */ 17 | 18 | 19 | #ifndef __DSM_INT_UNT_DESCRIPTOR_H 20 | #define __DSM_INT_UNT_DESCRIPTOR_H 21 | 22 | 23 | int descriptorDSMCC_INT_UNT (u_char *b); 24 | 25 | void descriptorDSMCC_scheduling (u_char *b); 26 | void descriptorDSMCC_update (u_char *b); 27 | void descriptorDSMCC_ssu_location (u_char *b); 28 | void descriptorDSMCC_message(u_char *b); 29 | void descriptorDSMCC_ssu_event_name (u_char *b); 30 | void descriptorDSMCC_target_smartcard (u_char *b); 31 | void descriptorDSMCC_target_MAC_address (u_char *b); 32 | void descriptorDSMCC_target_serial_number (u_char *b); 33 | void descriptorDSMCC_target_IP_address (u_char *b); 34 | void descriptorDSMCC_target_IPv6_address (u_char *b); 35 | void descriptorDSMCC_ssu_subgroup_association (u_char *b); 36 | void descriptorDSMCC_IP_MAC_platform_name (u_char *b); 37 | void descriptorDSMCC_IP_MAC_platform_provider_name (u_char *b); 38 | void descriptorDSMCC_target_MAC_address_range (u_char *b); 39 | void descriptorDSMCC_target_IP_slash (u_char *b); 40 | void descriptorDSMCC_target_IP_source_slash (u_char *b); 41 | void descriptorDSMCC_target_IPv6_slash (u_char *b); 42 | void descriptorDSMCC_target_IPv6_source_slash (u_char *b); 43 | void descriptorDSMCC_IP_MAC_StreamLocation (u_char *b); 44 | void descriptorDSMCC_ISP_access_mode (u_char *b); 45 | 46 | 47 | #endif 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/private/premiere.de/premiere_de.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: premiere_de.c,v 1.6 2009/11/22 15:36:20 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- User defined table // Private 14 | -- Premiere Content Information Table CIT 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "premiere_de.h" 23 | 24 | #include "section_premiere_cit.h" 25 | #include "section_premiere_cpt.h" 26 | #include "dvb_descriptor_premiere.h" 27 | 28 | 29 | 30 | /* 31 | 32 | Please check for legal issues, when using provider specific 33 | data structures in your own software! 34 | Using these data structures may require a certification or 35 | licensing process by the provider. 36 | 37 | */ 38 | 39 | static PRIV_DESCR_ID_FUNC pdescriptors[] = { 40 | { 0xF0, DVB_SI, descriptor_PRIVATE_PremiereDE_ContentOrder }, 41 | { 0xF1, DVB_SI, descriptor_PRIVATE_PremiereDE_ParentalInformation }, 42 | { 0xF2, DVB_SI, descriptor_PRIVATE_PremiereDE_ContentTransmission }, 43 | { 0x00, 0, NULL } // end of table (id = 0x00, funct = NULL) 44 | }; 45 | 46 | 47 | static PRIV_SECTION_ID_FUNC psections[] = { 48 | { 0xA0, section_PRIVATE_PremiereDE_CIT }, 49 | { 0xA1, section_PRIVATE_PremiereDE_CPT }, 50 | { 0x00, NULL } // end of table (id = 0x00, funct = NULL) 51 | 52 | }; 53 | 54 | 55 | 56 | 57 | 58 | // 59 | // -- Return private section/descriptor id tables 60 | // -- for this scope 61 | // 62 | 63 | void getPrivate_PremiereDE ( PRIV_SECTION_ID_FUNC **psect, 64 | PRIV_DESCR_ID_FUNC **pdesc) 65 | { 66 | *psect = psections; 67 | *pdesc = pdescriptors; 68 | } 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/dvb_api/fe_info.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: fe_info.c,v 1.8 2009/11/22 15:36:07 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- FrontProcessor Info 14 | -- DVB-API 15 | 16 | */ 17 | 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | 24 | #include "dvbsnoop.h" 25 | #include "fe_info.h" 26 | #include "fe_misc.h" 27 | #include "misc/cmdline.h" 28 | #include "misc/output.h" 29 | 30 | #include "dmx_error.h" 31 | #include "dvb_api.h" 32 | 33 | 34 | #if DVB_API_VERSION == 1 35 | 36 | // -- not supported in DVB-API 1 37 | 38 | int do_FE_Info (OPTION *opt) 39 | { 40 | fprintf (stderr,"FE_info function not supported in DVB-API 1\n"); 41 | return 1; 42 | } 43 | 44 | 45 | #else 46 | 47 | 48 | 49 | 50 | int do_FE_Info (OPTION *opt) 51 | 52 | { 53 | int fd_fe = 0; 54 | 55 | 56 | 57 | if (opt->inpPidFile) { 58 | fprintf (stderr,"Error: FileMode not possible...\n"); 59 | return -1; 60 | } 61 | 62 | 63 | if((fd_fe = open(opt->devFE,O_RDONLY)) < 0){ 64 | IO_error(opt->devFE); 65 | return -1; 66 | } 67 | 68 | 69 | 70 | indent (0); 71 | out_NL (2); 72 | out_nl (2,"---------------------------------------------------------"); 73 | out_nl (2,"FrontEnd Info..."); 74 | out_nl (2,"---------------------------------------------------------"); 75 | out_NL (2); 76 | 77 | out_nl (2,"Device: %s",opt->devFE); 78 | out_NL (2); 79 | 80 | print_FE_BasicCapabilities (3, fd_fe); 81 | print_FE_CurrentParameters (2, fd_fe); 82 | 83 | close(fd_fe); 84 | return 0; 85 | } 86 | 87 | 88 | 89 | 90 | 91 | #endif // DVB-API Check 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/datacarousel/iop_ior.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: iop_ior.c,v 1.5 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- dsmcc Interoperable Object Reference (IOR) 13 | -- TR 101 202 v1.2.1 4.7.5.2 14 | -- TS 102 812 15 | 16 | */ 17 | 18 | #include "dvbsnoop.h" 19 | #include "iop_ior.h" 20 | #include "biop_tag_tap.h" 21 | #include "dsmcc_misc.h" 22 | 23 | #include "misc/output.h" 24 | #include "strings/dsmcc_str.h" 25 | 26 | /* 27 | * dsmcc IOP::IOR () 28 | * TR 101 202 v 1.2.1 29 | * return: length used 30 | */ 31 | 32 | 33 | int IOP_IOR (int v, u_char *b) 34 | { 35 | u_char *b_start = b; 36 | int i,x; 37 | u_long n1; 38 | 39 | 40 | 41 | out_nl (v, "IOP::IOR:"); 42 | indent (+1); 43 | 44 | 45 | n1 = outBit_Sx_NL (v,"type_id_length: ", b, 0, 32); 46 | print_text_UTF8 (v, "type_id: ", b+4, n1); 47 | b += 4+n1; 48 | 49 | 50 | // alignment gap (CDR alignment rule), should be 0xFF 51 | x = n1 % 4; 52 | if (x) { 53 | print_databytes (v,"alignment_gap:", b, 4-x); 54 | b += 4-x; 55 | } 56 | 57 | 58 | n1 = outBit_Sx_NL (v,"taggedProfiles_count: ", b, 0, 32); 59 | b += 4; 60 | for (i=0; i < n1; i++) { 61 | u_long n2; 62 | 63 | // IOP_taggedProfile 64 | n2 = IOP_taggedProfile (v, b); 65 | b += n2; 66 | 67 | } 68 | 69 | 70 | indent (-1); 71 | 72 | return b - b_start; 73 | } 74 | 75 | 76 | 77 | 78 | /* 79 | * TR 101 202 v 1.2.1 80 | * return: len 81 | */ 82 | 83 | u_long IOP_taggedProfile (int v, u_char *b) 84 | 85 | { 86 | u_long len; 87 | 88 | 89 | // e.g. BIOPProfileBody 90 | // e.g. LiteOptionsProfileBody 91 | 92 | len = BIOP_TAG_dispatch (v,b); 93 | return len; 94 | } 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/sections/tot.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tot.c,v 1.12 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- TOT section 14 | -- Time Offset Table 15 | -- ETSI EN 300 468 5.2.6 16 | 17 | */ 18 | 19 | #include "dvbsnoop.h" 20 | #include "tot.h" 21 | #include "descriptors/descriptor.h" 22 | #include "strings/dvb_str.h" 23 | #include "misc/output.h" 24 | #include "misc/pkt_time.h" 25 | 26 | void section_TOT (u_char *b, int len) 27 | { 28 | 29 | u_int table_id; 30 | u_long UTC_time_MJD; 31 | u_long UTC_time_UTC; 32 | int len1; 33 | 34 | 35 | 36 | 37 | out_nl (3,"TOT-decoding...."); 38 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 39 | (char *(*)(u_long)) dvbstrTableID ); 40 | if (table_id != 0x73) { 41 | out_nl (3,"wrong Table ID"); 42 | return; 43 | } 44 | 45 | 46 | outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); 47 | outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); 48 | outBit_Sx_NL (6,"reserved_2: ", b, 10, 2); 49 | outBit_Sx_NL (3,"Section_length: ", b, 12, 12); 50 | 51 | 52 | out (3,"UTC_time: "); 53 | UTC_time_MJD = getBits (b, 0, 24, 16); 54 | UTC_time_UTC = getBits (b, 0, 40, 24); 55 | print_time40 (3, UTC_time_MJD,UTC_time_UTC); 56 | out_NL (3); 57 | 58 | outBit_Sx_NL (6,"reserved_3: ", b, 64, 4); 59 | 60 | 61 | len1 = outBit_Sx_NL (5,"Descriptor_loop_length: ", b, 68, 12); 62 | b += 10; 63 | 64 | indent (+1); 65 | while (len1 > 0) { 66 | int x; 67 | 68 | x = descriptor (b, DVB_SI); 69 | len1 -= x; 70 | b += x; 71 | } 72 | indent (-1); 73 | out_NL (3); 74 | 75 | 76 | outBit_Sx_NL (5,"CRC: ", b, 0, 32); 77 | } 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/misc/pid_mem.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pid_mem.c,v 1.3 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 12 | 13 | 14 | -- PID Memory for spidering PIDs 15 | 16 | */ 17 | 18 | 19 | #include "dvbsnoop.h" 20 | 21 | 22 | 23 | enum PIDMEM_STATUS { PIDMEM_UNUSED, PIDMEM_STORED, PIDMEM_ISUSED }; 24 | static int pidMEM[MAX_PID+1]; 25 | 26 | 27 | 28 | 29 | void init_PidMemory (void) 30 | 31 | { 32 | int i; 33 | 34 | for (i=0; i <= MAX_PID; i++) { 35 | pidMEM[i] = PIDMEM_UNUSED; 36 | } 37 | 38 | } 39 | 40 | 41 | 42 | /* 43 | -- store a pid in PID Memory 44 | -- return: 1: stored, 0 = already in mem or illegal 45 | */ 46 | 47 | int store_PidToMem (int pid) 48 | { 49 | 50 | if (pid >= 0 && pid <= MAX_PID) { 51 | if (pidMEM[pid] == PIDMEM_UNUSED) { 52 | pidMEM[pid] = PIDMEM_STORED; 53 | return 1; 54 | } 55 | } 56 | return 0; 57 | 58 | } 59 | 60 | 61 | 62 | /* 63 | -- get a Pid from PID Memory 64 | -- return: or INVALID_PID = no more PIDs 65 | */ 66 | 67 | int get_UnusedPidFromMem (void) 68 | { 69 | int i; 70 | 71 | for (i=0; i <= MAX_PID; i++) { 72 | if (pidMEM[i] == PIDMEM_STORED) { 73 | return i; 74 | } 75 | } 76 | return INVALID_PID; 77 | } 78 | 79 | 80 | 81 | /* 82 | -- mark Pid in PID Memory as retrieved... 83 | */ 84 | 85 | void mark_PidMem_as_used (int pid) 86 | { 87 | 88 | if (pid >= 0 && pid <= MAX_PID) { 89 | pidMEM[pid] = PIDMEM_ISUSED; 90 | } 91 | return; 92 | } 93 | 94 | 95 | 96 | 97 | // $$$TODO 98 | // 99 | // Future version may store stream type to distinguish between SECTION & PES 100 | // --> Spider may also spider to PES streams 101 | // 102 | 103 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_ddb.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_ddb.c,v 1.5 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- dsmcc download Data Block Message 13 | 14 | */ 15 | 16 | 17 | 18 | 19 | #include "dvbsnoop.h" 20 | #include "dsmcc_ddb.h" 21 | #include "dsmcc_misc.h" 22 | #include "misc/output.h" 23 | #include "misc/hexprint.h" 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | /* 32 | * ISO/IEC 13818-6 33 | * dsmcc_downloadDataMessage 34 | * Download Data Block 35 | */ 36 | 37 | 38 | int dsmcc_DownloadDataMessage (int v, u_char *b, u_int len) 39 | { 40 | int x; 41 | int len_org = len; 42 | DSMCC_MSG_HD dmh; 43 | 44 | 45 | 46 | 47 | x = dsmcc_MessageHeader (v, b, len, &dmh); 48 | b += x; 49 | len -= x; 50 | 51 | 52 | outBit_Sx_NL (v,"moduleId: ", b, 0, 16); 53 | outBit_Sx_NL (v,"moduleVersion: ", b, 16, 8); 54 | 55 | outBit_Sx_NL (v,"reserved: ", b, 24, 8); 56 | outBit_Sx_NL (v,"blockNumber: ", b, 32, 16); 57 | 58 | b += 6; 59 | len -= 6; 60 | 61 | print_databytes (v, "Block Data: ", b, len); 62 | 63 | // $$$ TODO: Save Blockdata if option set to file 64 | // a good Test transponder is ASTRA's MHP carousel 65 | // Beware of multiple BIOPs in a Module! (read below!) 66 | 67 | 68 | return len_org; 69 | } 70 | 71 | 72 | 73 | 74 | 75 | // $$$ TODO 76 | 77 | 78 | // 79 | // 11.2.4 Transport of BIOP Messages 80 | // 81 | // BIOP messages are transported in Modules of DSM-CC Data Carousels. 82 | // Multiple BIOP messages may be carried in one Module. The Modules of 83 | // the Data Carousel are fragmented into Blocks. These Blocks are 84 | // transported in DownloadDataBlock() messages (described in clause 7). 85 | // Figure 11-3 illustrates the applied encapsulation and fragmentation 86 | // methods. 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/sections/dit.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dit.c,v 1.8 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- DIT section 14 | -- Discontinuity Information Table 15 | -- ETSI EN 300 468 5.2.9 16 | 17 | */ 18 | 19 | #include "dvbsnoop.h" 20 | #include "dit.h" 21 | #include "strings/dvb_str.h" 22 | #include "misc/output.h" 23 | 24 | void section_DIT (u_char *b, int len) 25 | { 26 | 27 | typedef struct _DIT { 28 | u_int table_id; 29 | u_int section_syntax_indicator; 30 | u_int reserved_1; 31 | u_int reserved_2; 32 | u_int section_length; 33 | u_int transition_flag; 34 | u_int reserved_3; 35 | 36 | } DIT; 37 | 38 | 39 | 40 | DIT d; 41 | 42 | 43 | d.table_id = b[0]; 44 | d.section_syntax_indicator = getBits (b, 0, 8, 1); 45 | d.reserved_1 = getBits (b, 0, 9, 1); 46 | d.reserved_2 = getBits (b, 0, 10, 2); 47 | d.section_length = getBits (b, 0, 12, 12); 48 | d.transition_flag = getBits (b, 0, 24, 1); 49 | d.reserved_3 = getBits (b, 0, 25, 7); 50 | 51 | 52 | out_nl (3,"DIT-decoding...."); 53 | out_S2B_NL (3,"Table_ID: ",d.table_id, dvbstrTableID (d.table_id)); 54 | if (d.table_id != 0x7E) { 55 | out_nl (3,"wrong Table ID"); 56 | return; 57 | } 58 | 59 | out_SB_NL (3,"section_syntax_indicator: ",d.section_syntax_indicator); 60 | out_SB_NL (6,"reserved_1: ",d.reserved_1); 61 | out_SB_NL (6,"reserved_2: ",d.reserved_2); 62 | out_SW_NL (5,"Section_length: ",d.section_length); 63 | 64 | out_S2B_NL (3,"transition_flag: ",d.transition_flag, 65 | (d.transition_flag) ? "due to change of the originating source" 66 | : "due to change selection only"); 67 | out_SB_NL (6,"reserved_3: ",d.reserved_3); 68 | 69 | } 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/misc/pkt_time.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pkt_time.c,v 1.13 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 12 | 13 | */ 14 | 15 | 16 | #include "dvbsnoop.h" 17 | #include "cmdline.h" 18 | #include "pkt_time.h" 19 | 20 | #include 21 | #include 22 | 23 | 24 | static struct timeval last_tv = {0,0}; 25 | 26 | 27 | /* 28 | -- Print receive time of Packet 29 | 30 | */ 31 | 32 | static unsigned long timeval_to_ms(const struct timeval *tv) 33 | { 34 | return (tv->tv_sec * 1000) + ((tv->tv_usec + 500) / 1000); 35 | } 36 | 37 | long delta_time_ms (struct timeval *tv, struct timeval *last_tv) 38 | { 39 | return timeval_to_ms(tv) - timeval_to_ms(last_tv); 40 | } 41 | 42 | void out_receive_time (int verbose, OPTION *opt) 43 | 44 | { 45 | struct timeval tv; 46 | time_t t; 47 | long ms; 48 | char tstr[128]; 49 | 50 | 51 | 52 | switch (opt->time_mode) { 53 | 54 | case FULL_TIME: 55 | t = time (&t); 56 | strftime (tstr,sizeof(tstr)-1,"%a %Y-%m-%d %H:%M:%S", 57 | localtime(&t)); 58 | gettimeofday (&tv, NULL); 59 | out (verbose,"Time received: %s.%03ld\n", tstr, tv.tv_usec/1000 ); 60 | break; 61 | 62 | case DELTA_TIME: 63 | gettimeofday (&tv, NULL); 64 | ms = delta_time_ms(&tv, &last_tv); 65 | out (verbose,"Time (delta) received: %0ld.%03ld (sec)\n", ms / 1000, ms % 1000); 66 | last_tv.tv_sec = tv.tv_sec; 67 | last_tv.tv_usec = tv.tv_usec; 68 | break; 69 | 70 | case NO_TIME: 71 | default: 72 | break; 73 | 74 | } 75 | 76 | return; 77 | } 78 | 79 | 80 | 81 | 82 | void init_receive_time (void) 83 | 84 | { 85 | gettimeofday (&last_tv, NULL); 86 | } 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/sections/emm_ecm.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: emm_ecm.c,v 1.12 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | DVBSNOOP 14 | 15 | a dvb sniffer and mpeg2 stream analyzer tool 16 | http://dvbsnoop.sourceforge.net/ 17 | 18 | (c) 2001-2004 Rainer.Scherg@gmx.de 19 | 20 | 21 | 22 | -- EMM / ECM Data packet 23 | 24 | */ 25 | 26 | #include "dvbsnoop.h" 27 | #include "emm_ecm.h" 28 | #include "descriptors/descriptor.h" 29 | #include "strings/dvb_str.h" 30 | #include "misc/helper.h" 31 | #include "misc/output.h" 32 | 33 | void section_EMM_ECM (u_char *b, int len) 34 | { 35 | /* */ 36 | 37 | typedef struct _EMM_ECM { 38 | u_int table_id; 39 | u_int section_syntax_indicator; 40 | u_int reserved_1; 41 | u_int reserved_2; 42 | u_int section_length; 43 | 44 | 45 | } EMM_ECM; 46 | 47 | 48 | 49 | 50 | EMM_ECM e; 51 | //int n; 52 | 53 | 54 | 55 | e.table_id = b[0]; 56 | e.section_syntax_indicator = getBits (b, 0, 8, 1); 57 | e.reserved_1 = getBits (b, 0, 9, 1); 58 | e.reserved_2 = getBits (b, 0, 10, 2); 59 | e.section_length = getBits (b, 0, 12, 12); 60 | 61 | 62 | 63 | out_nl (3,"CAMT-decoding...."); 64 | out_S2B_NL (3,"Table_ID: ",e.table_id, dvbstrTableID (e.table_id)); 65 | 66 | out_SB_NL (3,"section_syntax_indicator: ",e.section_syntax_indicator); 67 | out_SB_NL (6,"reserved_1: ",e.reserved_1); 68 | out_SB_NL (6,"reserved_2: ",e.reserved_2); 69 | out_SW_NL (5,"Section_length: ",e.section_length); 70 | 71 | print_databytes(3,"CA_message_section_data:",b+3,e.section_length); 72 | 73 | // !!! decoding the complete ECM/EMM stream may be illegal 74 | // so we don't do this! 75 | // secrets are secrets even if they are openly transmitted! 76 | // you are not allowed to enhance this section! 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/dvb_api/fe_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: fe_misc.h,v 1.5 2006/01/02 18:23:59 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | #ifndef __FE_MISC_H 15 | #define __FE_MISC_H 16 | 17 | #include "dvb_api.h" 18 | 19 | 20 | 21 | typedef struct _fe_signal { 22 | int16_t strength; 23 | int16_t snr; 24 | uint32_t ber; 25 | uint32_t ublocks; 26 | fe_status_t status; 27 | } FE_SIGNAL; 28 | 29 | typedef struct _fe_signal_cap { 30 | int ber; 31 | int snr; 32 | int strength; 33 | int status; 34 | int ublocks; 35 | } FE_SIG_CAP; 36 | 37 | 38 | 39 | int capability_Check (int f, int cap); 40 | int read_Signal(int f, FE_SIGNAL *s, FE_SIG_CAP *cap); 41 | void out_status_detail (int v, fe_status_t s); 42 | 43 | 44 | 45 | #if DVB_API_VERSION != 1 46 | 47 | // -- only > API3 48 | 49 | int print_FE_BasicCapabilities (int v, int f); 50 | int print_FE_CurrentParameters (int v, int f); 51 | 52 | void print_FE_QPSK_param (int v, struct dvb_qpsk_parameters qp); 53 | void print_FE_QAM_param (int v, struct dvb_qam_parameters qp); 54 | void print_FE_OFDM_param (int v, struct dvb_ofdm_parameters op); 55 | #ifdef FE_ATSC // API 3.1 56 | void print_FE_VSB_param (int v, struct dvb_vsb_parameters vsb); 57 | #endif 58 | 59 | 60 | fe_type_t read_FEType(int f); 61 | int read_FEInfo(int f, struct dvb_frontend_info *fi); 62 | int read_FEParam(int f, struct dvb_frontend_parameters *p); 63 | 64 | 65 | const char *festr_FE_code_rate (fe_code_rate_t fec); 66 | const char *festr_FE_modulation (fe_modulation_t modulation); 67 | const char *festr_FE_bandwidth (fe_bandwidth_t bandwidth); 68 | const char *festr_FE_transmit_mode (fe_transmit_mode_t transmit_mode); 69 | const char *festr_FE_guard_interval (fe_guard_interval_t guard_interval); 70 | const char *festr_FE_hierarchy (fe_hierarchy_t hierarchy); 71 | 72 | 73 | 74 | #endif 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | #endif 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/tvanytime/cs.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: cs.c,v 1.3 2009/11/22 15:36:34 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Container section (CS) 14 | -- TS 102 323 15 | 16 | */ 17 | 18 | #include "dvbsnoop.h" 19 | #include "cs.h" 20 | 21 | #include "descriptors/descriptor.h" 22 | #include "strings/dvb_str.h" 23 | #include "misc/output.h" 24 | 25 | void section_TVA_CS (u_char *b, int len) 26 | { 27 | /* TS 102 323 */ 28 | 29 | u_int table_id; 30 | u_int section_length; 31 | int len1; 32 | 33 | 34 | 35 | out_nl (3,"CS-decoding...."); 36 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 37 | (char *(*)(u_long))dvbstrTableID ); 38 | if (table_id != 0x75) { 39 | out_nl (3,"wrong Table ID"); 40 | return; 41 | } 42 | 43 | 44 | outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); 45 | outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); 46 | outBit_Sx_NL (6,"reserved: ", b,10, 2); 47 | section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); 48 | 49 | outBit_Sx_NL (3,"container_id: ", b,24, 16); 50 | outBit_Sx_NL (6,"reserved: ", b,40, 2); 51 | outBit_Sx_NL (3,"version_number: ", b,42, 5); 52 | 53 | outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, 54 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 55 | outBit_Sx_NL (3,"Section_number: ", b,48, 8); 56 | outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); 57 | 58 | 59 | b += 8; 60 | len1 = section_length - 5; 61 | 62 | 63 | // common descriptor loop 64 | 65 | out_nl (3,"Container_data:"); 66 | indent (+1); 67 | // $$$TODO -- compression wrapper, container data 68 | print_private_data (3,b,len1); 69 | b += len1; 70 | 71 | indent (-1); 72 | 73 | outBit_Sx_NL (5,"CRC: ", b,0,32); 74 | } 75 | 76 | 77 | 78 | 79 | 80 | 81 | // Annotation: 82 | // 83 | // $$$ TODO: CS is untested so far !!! 84 | // need stream with CS data 85 | -------------------------------------------------------------------------------- /src/private/default/section_private_default.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: section_private_default.c,v 1.3 2009/11/22 15:36:18 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- User defined table // Private 14 | -- ISO 13818-1 // ITU H.222.0 private_section 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "section_private_default.h" 23 | #include "strings/dvb_str.h" 24 | #include "misc/output.h" 25 | #include "misc/hexprint.h" 26 | 27 | 28 | 29 | void section_PRIVATE_default (u_char *b, int len) 30 | { 31 | u_int table_id; 32 | u_int section_syntax_indicator; 33 | u_int section_length; 34 | 35 | 36 | 37 | out_nl (3,"User_Defined-decoding...."); 38 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 39 | (char *(*)(u_long))dvbstrTableID ); 40 | if (table_id < 0x80) { 41 | out_nl (3,"wrong Table ID"); 42 | return; 43 | } 44 | 45 | 46 | section_syntax_indicator = 47 | outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); 48 | outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); 49 | outBit_Sx_NL (6,"reserved: ", b,10, 2); 50 | section_length = 51 | outBit_Sx_NL (5,"private_section_length: ", b,12,12); 52 | 53 | 54 | if (section_syntax_indicator == 0) { 55 | b += 3; 56 | } else { 57 | 58 | outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); 59 | outBit_Sx_NL (6,"reserved: ", b, 40, 2); 60 | outBit_Sx_NL (3,"Version_number: ", b, 42, 5); 61 | outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, 62 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 63 | outBit_Sx_NL (3,"Section_number: ", b, 48, 8); 64 | outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); 65 | 66 | b += 8; 67 | section_length -= (5+4); // 4: CRC 68 | } 69 | 70 | print_private_data (3,b,section_length); 71 | b += section_length; 72 | 73 | if (section_syntax_indicator != 0) { 74 | outBit_Sx_NL (5,"CRC: ", b, 0, 32); 75 | } 76 | 77 | } 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/ebu/wss.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: wss.c,v 1.3 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | 6 | DVBSNOOP 7 | 8 | a dvb sniffer and mpeg2 stream analyzer tool 9 | http://dvbsnoop.sourceforge.net/ 10 | 11 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 12 | 13 | 14 | 15 | -- misc routines for EBU WSS (Wide Screen Signalling) 16 | -- ETSI EN 300 294 17 | 18 | */ 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "wss.h" 23 | #include "strings/dvb_str.h" 24 | #include "misc/helper.h" 25 | #include "misc/hexprint.h" 26 | #include "misc/output.h" 27 | 28 | 29 | 30 | 31 | 32 | 33 | // -- print WSS codes (Wide Screen Signalling) 34 | // -- length = 14 bit 35 | 36 | void print_wss_decode (int v, u_char *b) 37 | { 38 | 39 | 40 | outBit_Sx_NL (v,"WSS data: ", b, 0,14); 41 | 42 | 43 | // -- data is lsb ... msb !!! 44 | // -- we don't correct this here, but are working with reversed values 45 | 46 | indent (+1); 47 | 48 | // data group 1 49 | outBit_S2x_NL (v,"==> aspect ratio: ", b, 0, 4, 50 | (char *(*)(u_long)) dvbstrWSS_aspect_ratio ); 51 | 52 | // data group 2 53 | outBit_S2x_NL (v,"==> film bit: ", b, 4, 1, 54 | (char *(*)(u_long)) dvbstrWSS_film_bit); 55 | outBit_S2x_NL (v,"==> colour coding bit: ",b, 5, 1, 56 | (char *(*)(u_long)) dvbstrWSS_color_coding_bit); 57 | outBit_S2x_NL (v,"==> helper bit: ", b, 6, 1, 58 | (char *(*)(u_long)) dvbstrWSS_helper_bit); 59 | outBit_Sx_NL (v,"==> reserved bit: ", b, 7, 1); 60 | 61 | // data group 3 62 | outBit_S2x_NL (v,"==> subtitle/teletext: ", b, 8, 1, 63 | (char *(*)(u_long)) dvbstrWSS_subtitleTeletext_bit); 64 | outBit_S2x_NL (v,"==> subtitling mode: ", b, 9, 2, 65 | (char *(*)(u_long)) dvbstrWSS_subtitling_mode); 66 | 67 | // data group 4 68 | outBit_S2x_NL (v,"==> surround bit: ", b, 11, 1, 69 | (char *(*)(u_long)) dvbstrWSS_surround_bit); 70 | outBit_S2x_NL (v,"==> copyright bit: ", b, 12, 1, 71 | (char *(*)(u_long)) dvbstrWSS_copyright_bit); 72 | outBit_S2x_NL (v,"==> copy_generation bit: ", b, 13, 1, 73 | (char *(*)(u_long)) dvbstrWSS_copy_generation_bit); 74 | 75 | indent (-1); 76 | } 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/pes/mpeg_packheader.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpeg_packheader.c,v 1.3 2009/11/22 15:36:13 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | 16 | 17 | #include "dvbsnoop.h" 18 | #include "mpeg_packheader.h" 19 | #include "mpeg_sysheader.h" 20 | #include "pes_misc.h" 21 | #include "strings/dvb_str.h" 22 | #include "misc/hexprint.h" 23 | #include "misc/helper.h" 24 | #include "misc/output.h" 25 | 26 | 27 | 28 | 29 | /* 30 | * PES/PS Pack Header 31 | * if (len == -1) then 32 | * pack_header is in a PS 33 | * do not print packet_start_code (already printed by caller) 34 | * else 35 | * pack_header is within a pes packet 36 | * and check if a system_header is within len 37 | */ 38 | 39 | 40 | 41 | void mpeg_pack_header (int v, u_char *b, int len) 42 | { 43 | 44 | /* z.B. H.222 ISO 13818-1 Table 2-33 */ 45 | /* ISO 11172-1 pack header */ 46 | 47 | 48 | int v1 = v+1; 49 | int pack_stuffing_len; 50 | 51 | 52 | if (len == 0) return; 53 | 54 | out_nl (v,"Pack_header: "); 55 | indent (+1); 56 | 57 | if (len > 0) { 58 | // -- within PES packet, not PS! 59 | outBit_Sx_NL (v1,"pack_start_code: ", b, 0, 32); 60 | } 61 | 62 | outBit_Sx_NL (v1,"fixed '01': ", b, 32, 2); 63 | print_xTS_field (v1, "system_clock_reference_base", b, 34) ; // len 36b 64 | outBit_Sx_NL (v1,"system_clock_reference_extension: ",b, 70, 9); 65 | outBit_Sx_NL (v1,"marker_bit: ", b, 79, 1); 66 | 67 | outBit_Sx (v1,"program_mux_rate: ", b, 80,22); 68 | out_nl (v1," [= x 50 bytes/sec]"); 69 | 70 | outBit_Sx_NL (v1,"marker_bit: ", b, 102, 1); 71 | outBit_Sx_NL (v1,"marker_bit: ", b, 103, 1); 72 | outBit_Sx_NL (v1,"reserved: ", b, 104, 5); 73 | 74 | pack_stuffing_len = outBit_Sx_NL (v1,"pack_stuffing_len: ", b, 109, 3); 75 | print_databytes (6,"stuffing bytes 0xFF:", b+14, pack_stuffing_len); 76 | 77 | b += 14 + pack_stuffing_len; 78 | if (len >= 0) len -= 14 + pack_stuffing_len; 79 | 80 | if (len > 0) mpeg_system_header (v1, b, len); // only if len > 0 (PES packet) 81 | 82 | indent (-1); 83 | } 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/ts/ts_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ts_misc.c,v 1.3 2009/11/22 15:36:34 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | 14 | -- Transport Stream misc routines 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "ts_misc.h" 23 | #include "ts_cc_check.h" 24 | 25 | #include "strings/dvb_str.h" 26 | #include "misc/output.h" 27 | 28 | 29 | 30 | 31 | 32 | // 33 | // -- Decode TS packet header content (4 Bytes len) 34 | // -- Print CC errors 35 | // -- Return: Transport Stream Packet Header Data (ptr) 36 | // -- Return: len in bytes (== 4) 37 | // 38 | 39 | int decodeTS_PacketHeader (u_char *b, TSPHD *h) 40 | 41 | { 42 | /* IS13818-1 2.4.3.2 */ 43 | 44 | 45 | h->sync = outBit_Sx_NL (3,"Sync-Byte 0x47: ", b, 0, 8); 46 | h->tei = outBit_S2x_NL (3,"Transport_error_indicator: ", b, 8, 1, 47 | (char *(*)(u_long))dvbstrTS_TEI ); 48 | h->pusi = outBit_S2x_NL (3,"Payload_unit_start_indicator: ", b, 9, 1, 49 | (char *(*)(u_long))dvbstrTS_PUSI ); 50 | h->tprio = outBit_Sx_NL (3,"transport_priority: ", b, 10, 1); 51 | h->pid = outBit_S2x_NL (3,"PID: ", b, 11,13, 52 | // (char *(*)(u_long))dvbstrTSpid_ID ); 53 | (char *(*)(u_long))dvbstrPID_assignment ); 54 | ts_cc_SetPid (h->pid); // set this here for ts_cc_check... 55 | 56 | h->tsc = outBit_S2x_NL (3,"transport_scrambling_control: ", b, 24, 2, 57 | (char *(*)(u_long))dvbstrTS_ScramblingCtrl_TYPE ); 58 | h->afc = outBit_S2x_NL (3,"adaptation_field_control: ", b, 26, 2, 59 | (char *(*)(u_long))dvbstrTS_AdaptationField_TYPE ); 60 | h->cc = outBit_S2x_NL (3,"continuity_counter: ", b, 28, 4, 61 | (char *(*)(u_long))ts_cc_StatusStr ); 62 | 63 | 64 | return 4; 65 | } 66 | 67 | 68 | 69 | // 70 | // -- Check if PID is a special TS 71 | // -- Return: 0 = Standard TS containing PES or SECTION 72 | // -- 1 = Special TS handling needed (and no subdecoding) 73 | // 74 | 75 | int check_TS_PID_special (u_int pid) 76 | { 77 | // see also TS pid dispatch 78 | switch (pid) { 79 | case 0x15: return 1; // MIP 80 | case 0x1FFF: return 1; // NULL PACKET 81 | } 82 | 83 | return 0; 84 | } 85 | -------------------------------------------------------------------------------- /src/datacarousel/biop_servgatinf.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: biop_servgatinf.c,v 1.4 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- dsmcc BIOP::ServiceGatewayInfo() 13 | -- TR 101 202 v1.2.1 4.7.5.2 14 | 15 | */ 16 | 17 | #include "dvbsnoop.h" 18 | #include "biop_servgatinf.h" 19 | #include "biop_tag_tap.h" 20 | #include "iop_ior.h" 21 | #include "dsmcc_misc.h" 22 | #include "descriptors/descriptor.h" 23 | 24 | #include "misc/output.h" 25 | #include "misc/hexprint.h" 26 | 27 | #include "strings/dsmcc_str.h" 28 | #include "strings/dvb_str.h" 29 | 30 | /* 31 | * dsmcc BIOP::ServiceGatewayInfo() 32 | * TR 101 202 v 1.2.1 33 | * return: length used 34 | */ 35 | 36 | 37 | int BIOP_ServiceGatewayInfo (int v, u_char *b, u_int len) 38 | { 39 | int len_org = len; 40 | int i; 41 | int nx,n1,n2; 42 | 43 | 44 | 45 | out_nl (v, "BIOP::ServiceGatewayInfo:"); 46 | 47 | indent (+1); 48 | 49 | nx = IOP_IOR (v,b); 50 | b += nx; 51 | len -= nx; 52 | 53 | 54 | n1 = outBit_Sx_NL (v,"downloadTaps_count: ", b, 0, 8); 55 | b++; 56 | len--; 57 | for (i=0; i < n1; i++) { 58 | int n3; 59 | 60 | n3 = BIOP_TAP (v, "DSM", b); 61 | b += n3; 62 | len -= n3; 63 | } 64 | 65 | 66 | n1 = outBit_Sx_NL (v,"serviceContextList_count: ", b, 0, 8); 67 | b++; 68 | len--; 69 | for (i=0; i < n1; i++) { 70 | outBit_Sx_NL (v,"context_id: ", b, 0, 32); 71 | n2 = outBit_Sx_NL (v,"context_data_length: ", b, 32, 16); 72 | 73 | print_databytes (v,"context_data:", b+6, n2); // $$$ TODO 74 | 75 | b += 6 + n2; 76 | len -= 6 + n2; 77 | } 78 | 79 | 80 | n1 = outBit_Sx_NL (v,"userInfoLength: ", b, 0, 16); 81 | dsmcc_CarouselDescriptor_Loop ("userInfo", b+2, n1); 82 | b += 2+n1; 83 | len -= 2+n1; 84 | 85 | 86 | indent (-1); 87 | 88 | return len_org; 89 | } 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | // BIOP::ServiceGatewayInfo():: 98 | // The user info field shall be structured as a descriptor loop. 99 | // The descriptors in this loop shall be either descriptors as 100 | // defined in the DVB Data Broadcasting Specification or private descriptors. 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/datacarousel/ints.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ints.c,v 1.16 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- INT Section 14 | -- IP/MAC Notification Section 15 | -- DSM-CC Data Carousel EN 301 192 16 | 17 | */ 18 | 19 | #include "dvbsnoop.h" 20 | #include "ints.h" 21 | #include "dsmcc_misc.h" 22 | 23 | #include "strings/dvb_str.h" 24 | #include "strings/dsmcc_str.h" 25 | #include "misc/output.h" 26 | 27 | void section_DSMCC_INT (u_char *b, int len) 28 | { 29 | /* EN 301 192 7.x */ 30 | 31 | int len1,i; 32 | u_int table_id; 33 | u_int section_length; 34 | 35 | 36 | 37 | out_nl (3,"INT-decoding...."); 38 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 39 | (char *(*)(u_long))dvbstrTableID ); 40 | if (table_id != 0x4c) { 41 | out_nl (3,"wrong Table ID"); 42 | return; 43 | } 44 | 45 | 46 | outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); 47 | outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); 48 | outBit_Sx_NL (6,"reserved_2: ", b,10, 2); 49 | section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); 50 | outBit_S2x_NL(3,"Action_type: ", b,24, 8, 51 | (char *(*)(u_long))dsmccStrAction_Type ); 52 | outBit_Sx_NL (3,"Platform_id_hash: ", b,32, 8); 53 | outBit_Sx_NL (6,"reserved_3: ", b,40, 2); 54 | 55 | outBit_Sx_NL (3,"Version_number: ", b,42, 5); 56 | outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, 57 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 58 | outBit_Sx_NL (3,"Section_number: ", b,48, 8); 59 | outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); 60 | 61 | outBit_S2x_NL(3,"Platform_id: ", b,64,24, 62 | (char *(*)(u_long))dsmccStrPlatform_ID ); 63 | outBit_S2x_NL(3,"Processing_order: ", b,88, 8, 64 | (char *(*)(u_long))dsmccStrProcessing_order); 65 | 66 | b += 12; 67 | len1 = section_length - 9; 68 | 69 | 70 | 71 | i = dsmcc_pto_descriptor_loop ("platform",b); 72 | b += i; 73 | len1 -= i; 74 | 75 | while (len1 > 4) { 76 | i = dsmcc_pto_descriptor_loop ("target",b); 77 | b += i; 78 | len1 -= i; 79 | 80 | i = dsmcc_pto_descriptor_loop ("operational",b); 81 | b += i; 82 | len1 -= i; 83 | } 84 | out_NL (4); 85 | 86 | 87 | outBit_Sx_NL (5,"CRC: ", b,0,32); 88 | } 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /src/ts/ts_cc_check.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ts_cc_check.c,v 1.3 2009/11/22 15:36:34 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | 14 | -- Transport Stream continuity counter check 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "ts_cc_check.h" 23 | #include "misc/output.h" 24 | 25 | 26 | 27 | 28 | typedef struct _TS_CC { 29 | char last_continuity_counter; // 0..15 + special values 30 | } TS_CC; 31 | 32 | enum { CC_DISCONTINUED=127 }; 33 | 34 | static TS_CC tscc[MAX_PID+2]; 35 | static int current_pid; // reminder for current pid 36 | 37 | 38 | 39 | 40 | //------------------------------------------------------------ 41 | 42 | // 43 | // -- init TS sub decoding buffer 44 | // -- return: < 0: fail 45 | // 46 | void ts_cc_init (void) 47 | { 48 | int i; 49 | int n = (sizeof(tscc) / sizeof(tscc[0])); 50 | 51 | for (i=0; i < n; i++) { 52 | tscc[i].last_continuity_counter = CC_DISCONTINUED; 53 | } 54 | } 55 | 56 | void ts_cc_free (void) 57 | { 58 | return; 59 | } 60 | 61 | 62 | 63 | // 64 | // -- set current PID for checking CC 65 | // -- (this is workaround, because we can only deliver 1 param to 66 | // -- string routine using out_S2x...) 67 | // 68 | 69 | void ts_cc_SetPid (int pid) 70 | { 71 | current_pid = pid; 72 | } 73 | 74 | 75 | // 76 | // -- TS Continuity status check 77 | // -- (has to be compatible to dvbStr... routines!) 78 | // -- Return status string for display 79 | // 80 | char * ts_cc_StatusStr (int cc) 81 | { 82 | char *s = "(sequence ok)"; 83 | int pid = current_pid; 84 | 85 | 86 | // -- first time or discontinuity signalled 87 | 88 | if (tscc[pid].last_continuity_counter == CC_DISCONTINUED) { 89 | tscc[pid].last_continuity_counter = cc; 90 | return s; 91 | } 92 | 93 | // -- duplicate packet (same cc for pid) 94 | // -- check continuity counter 95 | 96 | if (tscc[pid].last_continuity_counter == cc) { 97 | s = "(duplicate packet)"; 98 | } else if (cc != ((tscc[pid].last_continuity_counter+1) % 16) ) { 99 | s = "(continuity error!)"; 100 | } 101 | 102 | tscc[pid].last_continuity_counter = cc; 103 | return s; 104 | } 105 | 106 | 107 | -------------------------------------------------------------------------------- /src/datacarousel/llc_snap.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: llc_snap.c,v 1.7 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | #include "dvbsnoop.h" 16 | #include "llc_snap.h" 17 | #include "strings/dsmcc_str.h" 18 | #include "misc/hexprint.h" 19 | #include "misc/output.h" 20 | 21 | /* 22 | -- decode LLC/SNAP 23 | -- ISO 8802, RFC 1042 24 | -- return: len 25 | */ 26 | 27 | 28 | int llc_snap (int v, u_char *b) 29 | 30 | { 31 | int dsap, ssap, ctrl; 32 | int oui, prot; 33 | 34 | out_nl (v,"LLC/SNAP:"); 35 | indent (+1); 36 | 37 | out_nl (v,"LLC:"); 38 | dsap = outBit_Sx_NL (v," DSAP: ", b, 0, 8); 39 | ssap = outBit_Sx_NL (v," SSAP: ", b, 8, 8); 40 | ctrl = outBit_Sx_NL (v," Control: ", b,16, 8); 41 | 42 | out_nl (v,"SNAP:"); 43 | oui = outBit_S2x_NL (v," Org. Unique ID: ", b,24,24, 44 | (char *(*)(u_long))dsmccStrOUI ); 45 | prot = outBit_S2x_NL (v," Protocol Identifier: ", b,48,16, 46 | (char *(*)(u_long))dsmccStr_LLC_SNAP_prot ); 47 | 48 | indent (-1); 49 | return 8; 50 | 51 | } 52 | 53 | /* 54 | * 55 | * $$$ TODO LLC-Snap 56 | * 57 | LLCSNAP() -- This structure shall contain the datagram according to the ISO/IEC 8802-2 Logical Link Control 58 | (LLC) and ISO/IEC 8802-1a SubNetwork Attachment Point (SNAP) specifications. In LLC Type 1 operation, 59 | unacknowledged connectionless mode, the LLC header is three bytes long and consists of a one byte 60 | Destination Service Access Point (DSAP) field, a one byte Source Service Access Point (SSAP) field, a one 61 | byte Control field. The values 0xAA in the LLC header's DSAP and SSAP fields indicate that an IEEE 802.2 62 | SNAP header follows. The Control value of 0x03 specifies an Unnumbered Information Command PDU. The 63 | SNAP header is five bytes long and consists of a three byte Organizationally Unique Identifier (OUI) field and a 64 | two byte Protocol Identifier. The SNAP OUI value 0x00-00-00 specifies the Protocol Identifier as an EtherType 65 | or routed non-OSI protocol. The SNAP OUI of 0x00-80-C2 indicates a Bridged Protocol. When the OUI is set 66 | to 0x00-00-00 then the SNAP Protocol Identifier for IP is 0x08-00. For Internet Protocol datagrams, the 67 | complete LLC/SNAP header is 0xAA-AA-03-00-00-00-08-00. 68 | 69 | 70 | */ 71 | 72 | -------------------------------------------------------------------------------- /src/descriptors/descriptor.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: descriptor.c,v 1.33 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Descriptors 14 | 15 | */ 16 | 17 | 18 | #include "dvbsnoop.h" 19 | #include "descriptor.h" 20 | #include "mpeg_descriptor.h" 21 | #include "dvb_descriptor.h" 22 | #include "dsmcc_carousel_descriptor.h" 23 | #include "dsmcc_int_unt_descriptor.h" 24 | #include "mhp_ait_descriptor.h" 25 | #include "tva_rnt_descriptor.h" 26 | #include "misc/hexprint.h" 27 | #include "misc/output.h" 28 | 29 | /* 30 | determine descriptor type and print it... 31 | return byte length 32 | */ 33 | 34 | int descriptor (u_char *b, DTAG_SCOPE scope) 35 | { 36 | int len; 37 | int id; 38 | 39 | 40 | id = (int)b[0]; 41 | len = ((int)b[1]) + 2; // total length 42 | 43 | // nothing to print here? 44 | // well, I guess all descriptors need a verbosity >=4... 45 | if (getMaxVerboseLevel() < 4) return len; 46 | 47 | indent (+1); 48 | 49 | 50 | switch (scope) { 51 | 52 | case DSMCC_STREAM: 53 | descriptorMPEG (b); 54 | break; 55 | 56 | case DSMCC_CAROUSEL: 57 | descriptorDSMCC_CAROUSEL (b); 58 | break; 59 | 60 | case DSMCC_INT_UNT: // EN 301 192, TS 102 006 61 | if (id < 0x40) descriptorDSMCC_INT_UNT (b); 62 | else descriptorDVB (b); 63 | break; 64 | 65 | case MHP_AIT: 66 | descriptorMHP_AIT (b); 67 | break; 68 | 69 | case TVA_RNT: // TS 102 323 70 | if (id < 0x40) descriptorMPEG (b); 71 | else descriptorTVA (b); 72 | break; 73 | 74 | case MPEG: 75 | case DVB_SI: 76 | default: 77 | if (id < 0x40) descriptorMPEG (b); 78 | else descriptorDVB (b); 79 | break; 80 | 81 | } 82 | 83 | 84 | indent (-1); 85 | 86 | return len; // (descriptor total length) 87 | } 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | /* 97 | Any descriptor (Basic Descriptor output) 98 | ETSI 300 468 // ISO 13818-1 99 | */ 100 | 101 | void descriptor_any (u_char *b) 102 | { 103 | int len; 104 | 105 | 106 | // tag = b[0]; 107 | len = b[1]; 108 | 109 | print_databytes (4,"Descriptor-data:", b+2, len); 110 | } 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /src/dvb_api/dvb_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dvb_api.h,v 1.11 2009/11/22 15:36:07 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | 16 | #ifndef __DVB_API_H 17 | #define __DVB_API_H 18 | 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | 25 | 26 | 27 | // 28 | // -- Cygwin(??) environment 29 | // -- uncomment the following lines... 30 | // --- no IOCTLs or __types 31 | // --- Only offline analyze mode available 32 | // 33 | 34 | //#ifndef ioctl 35 | // 36 | //#warning "----" 37 | //#warning "IOCTL not defined (needed for dvb-api), using dummy!" 38 | //#warning "dvbsnoop only will support offline mode..." 39 | //#warning "----" 40 | // 41 | //#define ioctl(...) dummyFunc() 42 | //#define _IOR(...) dummyFunc() 43 | //static int dummyFunc (void) {return 0;} 44 | //#endif 45 | // 46 | //#ifndef __u64 47 | //#define __s64 long long 48 | //#define __u64 unsigned long long 49 | // 50 | //#endif 51 | 52 | 53 | 54 | 55 | 56 | 57 | #if defined(HAVE_LINUX_DVB_DMX_H) 58 | 59 | 60 | // API 3 61 | #define DVB_API_VERSION 3 62 | 63 | #include 64 | #define DEMUX_DEVICE_MASK "/dev/dvb/adapter%d/demux%d" 65 | #define DVR_DEVICE_MASK "/dev/dvb/adapter%d/dvr%d" 66 | #include 67 | #define FRONTEND_DEVICE_MASK "/dev/dvb/adapter%d/frontend%d" 68 | 69 | // adapter[0-4]/device[0-4] 70 | #define DVB_STD_ADAPTER_NR 0 71 | #define DVB_STD_DEVICE_NR 0 72 | #define DVB_MAX_DEV_PATH_LEN 64 73 | 74 | 75 | #elif defined(HAVE_OST_DMX_H) 76 | 77 | 78 | // API 1 79 | #define DVB_API_VERSION 1 80 | 81 | #include 82 | #define DEMUX_DEVICE_MASK "/dev/dvb/card0/demux0" 83 | #define DVR_DEVICE_MASK "/dev/dvb/card0/dvr0" 84 | #define dmx_pes_filter_params dmxPesFilterParams 85 | #define dmx_sct_filter_params dmxSctFilterParams 86 | #define pes_type pesType 87 | #include 88 | #define FRONTEND_DEVICE_MASK "/dev/dvb/card0/frontend0" 89 | #define fe_status_t FrontendStatus 90 | 91 | // card[0-4]/device[0-4] card = adapter 92 | #define DVB_STD_ADAPTER_NR 0 93 | #define DVB_STD_DEVICE_NR 0 94 | #define DVB_MAX_DEV_PATH_LEN 64 95 | 96 | 97 | #endif 98 | 99 | 100 | 101 | #endif 102 | 103 | -------------------------------------------------------------------------------- /src/private/nordig.org/dvb_descriptor_nordig.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dvb_descriptor_nordig.c,v 1.3 2008/09/01 08:06:07 mws Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- Private DVB Descriptors nordig.org 13 | 14 | */ 15 | 16 | #include "dvbsnoop.h" 17 | #include "dvb_descriptor_nordig.h" 18 | #include "strings/dvb_str.h" 19 | #include "misc/hexprint.h" 20 | #include "misc/output.h" 21 | 22 | /* 23 | * 24 | * Private DVB descriptors 25 | * User Space: nordig.org 26 | * 27 | */ 28 | 29 | /* 30 | 0x83 Logic Channel Descriptor 31 | NorDig-Basic ver 1.0.1, 01.07.2003 32 | */ 33 | void descriptor_PRIVATE_NordigORG_LogicChannelDescriptor (u_char *b) 34 | { 35 | unsigned int tag = b[0]; 36 | unsigned int len = b[1]; 37 | unsigned int i; 38 | 39 | out_nl(4, "--> NorDig Logic Channel Descriptor "); 40 | 41 | b += 2; 42 | 43 | indent(+1); 44 | 45 | for (i = 0; i < len; i += 4) { 46 | unsigned int service_id = (b[i] << 8) | b[i + 1]; 47 | unsigned int visible_service_flag = (b[i + 2] >> 7) & 1; 48 | unsigned int reserved = (b[i + 2] >> 6) & 1; 49 | unsigned int logic_channel_number = ((b[i + 2] << 8) | b[i + 3]) & 0x3fff; 50 | 51 | out_NL(4); 52 | out_SW_NL(4, "service_id: ", service_id); 53 | out_SB_NL(4, "visible_service_flag: ", visible_service_flag); 54 | out_SB_NL(4, "reserved: ", reserved); 55 | out_SW_NL(4, "logic_channel_number: ", logic_channel_number); 56 | } 57 | 58 | indent(-1); 59 | out_NL(4); 60 | } 61 | 62 | /* 63 | 0xA0 Logic Channel Descriptor 64 | NorDig-Unified ver 2.0, 01.07.2008 65 | */ 66 | void descriptor_PRIVATE_NordigORG_ContentProtectionDescriptor (u_char *b) 67 | { 68 | unsigned int tag = b[0]; 69 | unsigned int len = b[1]; 70 | unsigned int protectionLevel = b[2]; 71 | 72 | out_nl(4, "--> NorDig Content Protection Descriptor "); 73 | 74 | b += 2; 75 | 76 | indent(+1); 77 | out_NL(4); 78 | out_SB_NL(2, "value: ", protectionLevel); 79 | 80 | switch(protectionLevel) 81 | { 82 | default: 83 | case 0x00: 84 | out_nl(4, "Outputs shall not be protected."); 85 | break; 86 | case 0x01: 87 | out_nl(4, "Content protection not required."); 88 | break; 89 | case 0x02: 90 | out_nl(4, "Content protection mandatory for video resolution > 576 lines."); 91 | break; 92 | case 0x03: 93 | out_nl(4, "Content protection mandatory regardless of video format and resolution."); 94 | break; 95 | } 96 | indent(-1); 97 | out_NL(4); 98 | } 99 | -------------------------------------------------------------------------------- /src/datacarousel/dsmcc_grpinfind.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_grpinfind.c,v 1.5 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- dsmcc GroupInfoIndication() 13 | -- (e.g. part of DSI private data) 14 | 15 | */ 16 | 17 | #include "dvbsnoop.h" 18 | #include "dsmcc_grpinfind.h" 19 | #include "dsmcc_misc.h" 20 | #include "misc/output.h" 21 | #include "misc/hexprint.h" 22 | 23 | /* 24 | * ISO/IEC 13818-6 25 | * EN 301 192 26 | * dsmcc GroupInfoIndication() 27 | */ 28 | 29 | 30 | int dsmcc_GroupInfoIndication (int v, u_char *b, u_int len_org) 31 | { 32 | int len = len_org; 33 | int n_groups; 34 | int i; 35 | int len2; 36 | 37 | 38 | 39 | // -- due to some misbehavior of some service providers 40 | // -- we do a simple plausi check for group_counts_min_bytes > len 41 | i = getBits (b, 0, 0, 16); // group_counts 42 | i = i * 8 + 2; 43 | 44 | if (i > len_org) { // this is no GroupInfo 45 | print_databytes (v,"Data Bytes (non-standard):", b, len_org); 46 | return len_org; 47 | } 48 | 49 | 50 | 51 | out_nl (v,"GroupInfoIndication:"); 52 | indent (+1); 53 | n_groups = outBit_Sx_NL (v,"NumberOfGroups: ", b, 0, 16); 54 | b += 2; 55 | len -= 2; 56 | 57 | for (i=0; i < n_groups; i++) { 58 | out_NL (v); 59 | if (len <= 0) { 60 | out_nl (v, "... => strange len <= 0 and still group count > 0 (abort)"); 61 | break; 62 | } 63 | 64 | out_nl (v, "Group (%d):",i); 65 | indent (+1); 66 | 67 | outBit_Sx_NL (v,"GroupId: ", b, 0, 32); 68 | outBit_Sx_NL (v,"GroupSize: ", b, 32, 32); 69 | b += 8; 70 | len -= 8; 71 | 72 | // GroupCompatibility() 73 | len2 = dsmcc_CompatibilityDescriptor (b); 74 | b += len2; 75 | len -= len2; 76 | 77 | len2 = outBit_Sx_NL (v,"GroupInfoLength: ", b, 0, 16); 78 | // print_databytes (v, "GroupInfoBytes: ", b+2, len2); // $$$ TODO 79 | dsmcc_CarouselDescriptor_Loop ("GroupInfo", b+2, len2); 80 | b += 2+len2; 81 | len -= 2+len2; 82 | 83 | len2 = outBit_Sx_NL (v,"PrivateDataLength: ", b, 0, 16); 84 | print_private_data (v, b+2, len2); // $$$ What to do here? 85 | b += 2+len2; 86 | len -= 2+len2; 87 | 88 | indent (-1); 89 | } 90 | 91 | indent (-1); 92 | out_NL (v); 93 | 94 | return len_org; 95 | } 96 | 97 | 98 | 99 | // EN 301 192: 100 | // 8.1.2 DownloadServerInitiate message 101 | // Supergroups in DSI 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /src/pes/pes_psm.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_psm.c,v 1.6 2009/11/22 15:36:13 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- PES PSM (Program Stream Map) ISO/IEC 13818-1 ITU H.222.0, 2.5.4 14 | 15 | */ 16 | 17 | 18 | 19 | 20 | #include "dvbsnoop.h" 21 | #include "descriptors/descriptor.h" 22 | #include "strings/dvb_str.h" 23 | #include "misc/output.h" 24 | 25 | #include "pes_psm.h" 26 | 27 | 28 | 29 | 30 | 31 | /* 32 | -- Program Stream Map 33 | -- buffer starts after packet_length 34 | 35 | */ 36 | 37 | 38 | void PES_decodePSM (u_char *b, int len) 39 | 40 | { 41 | int psi_len; 42 | int esm_len; 43 | 44 | 45 | // -- already processed: 46 | // --- packet_start_code_prefix 24 bslbf 47 | // --- stream_id 8 uimsbf 48 | // --- packet_length 16 uimsbf 49 | 50 | 51 | outBit_S2x_NL (4,"current_next_indicator: ", b, 0, 1, 52 | (char *(*)(u_long)) dvbstrCurrentNextIndicator ); 53 | outBit_Sx_NL (6,"reserved_1: ", b, 1, 2); 54 | outBit_Sx_NL (4,"program_stream_map_version: ", b, 3, 5); 55 | outBit_Sx_NL (6,"reserved_2: ", b, 8, 7); 56 | outBit_Sx_NL (4,"marker_bit: ", b,15, 1); 57 | psi_len = outBit_Sx_NL (5,"program_stream_info_length: ", b,16,16); 58 | b += 4; 59 | // len -= 4; 60 | 61 | out_nl (4,"Program stream info:"); 62 | indent (+1); 63 | while (psi_len > 0) { 64 | int x; 65 | 66 | x = descriptor (b, MPEG); 67 | b += x; 68 | psi_len -= x; 69 | // len -= x; 70 | } 71 | indent (-1); 72 | 73 | 74 | esm_len = outBit_Sx_NL (5,"elementary_stream_map_length: ", b, 0,16); 75 | b += 2; 76 | out_nl (4,"Elementary stream Map:"); 77 | indent (+1); 78 | while (esm_len > 0) { 79 | int esi_len; 80 | 81 | outBit_S2x_NL (4,"stream_type: ", b, 0, 8, 82 | (char *(*)(u_long)) dvbstrStream_TYPE); 83 | outBit_Sx_NL (5,"elementary_stream_id: ", b, 8, 8); 84 | esi_len = outBit_Sx_NL (5,"elementary_stream_info_length: ", b,16,16); 85 | b += 4; 86 | esm_len -= 4; 87 | // len -= 4; 88 | 89 | out_nl (4,"Elementary stream info:"); 90 | indent (+1); 91 | while (esi_len > 0) { 92 | int x; 93 | 94 | x = descriptor (b, MPEG); 95 | b += x; 96 | esi_len -= x; 97 | esm_len -= x; 98 | // len -= x; 99 | } 100 | indent (-1); 101 | 102 | } 103 | indent (-1); 104 | 105 | 106 | outBit_Sx_NL (5,"CRC: ", b, 0, 32); 107 | } 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /src/private/premiere.de/section_premiere_cit.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: section_premiere_cit.c,v 1.4 2009/11/22 15:36:20 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- User defined table // Private 14 | -- Premiere Content Information Table CIT 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "section_premiere_cit.h" 23 | #include "descriptors/descriptor.h" 24 | #include "strings/dvb_str.h" 25 | #include "misc/output.h" 26 | #include "misc/hexprint.h" 27 | 28 | 29 | 30 | void section_PRIVATE_PremiereDE_CIT (u_char *b, int len) 31 | { 32 | u_int table_id; 33 | u_int section_syntax_indicator; 34 | u_int section_length; 35 | 36 | 37 | out_nl (3,"User_Defined-decoding...."); 38 | table_id = outBit_S2Tx_NL (3,"Table_ID: ", b, 0, 8, 39 | "Premiere Content Information Table"); 40 | if (table_id != 0xa0) { 41 | out_nl (3,"wrong Table ID"); 42 | return; 43 | } 44 | 45 | 46 | section_syntax_indicator = 47 | outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); // ==1 48 | outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); 49 | outBit_Sx_NL (6,"reserved: ", b,10, 2); 50 | section_length = 51 | outBit_Sx_NL (5,"private_section_length: ", b,12,12); 52 | 53 | 54 | 55 | outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); 56 | outBit_Sx_NL (6,"reserved: ", b, 40, 2); 57 | outBit_Sx_NL (3,"Version_number: ", b, 42, 5); 58 | outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, 59 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 60 | outBit_Sx_NL (3,"Section_number: ", b, 48, 8); 61 | outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); 62 | 63 | b += 8; 64 | section_length -= 5; 65 | 66 | 67 | 68 | 69 | // 70 | // -- Premiere Content Information Table CIT 71 | // -- provided by Peter.Pavlov (Premiere.de) 72 | // 73 | 74 | 75 | out_NL (3); 76 | outBit_Sx_NL (3,"Content id: ", b, 0, 32); 77 | outBit_Sx_NL (3,"Duration: ", b, 32,24); 78 | outBit_Sx_NL (3,"Reserved: ", b, 56, 4); 79 | outBit_Sx_NL (5,"descriptor_section_length: ", b, 60,12); 80 | 81 | b += 9; 82 | section_length -=9; 83 | 84 | while (section_length > 4 ) { 85 | int x; 86 | 87 | x = descriptor (b, DVB_SI); 88 | if (section_length < x) break; 89 | b += x; 90 | section_length -= x; 91 | } 92 | 93 | 94 | 95 | 96 | outBit_Sx_NL (5,"CRC: ", b, 0, 32); 97 | 98 | } 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/misc/helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 4 | DVBSNOOP 5 | 6 | a dvb sniffer and mpeg2 stream analyzer tool 7 | http://dvbsnoop.sourceforge.net/ 8 | 9 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 10 | 11 | 12 | 13 | */ 14 | 15 | 16 | #ifndef __HELPER_H 17 | #define __HELPER_H 18 | 19 | 20 | u_long outBit_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); 21 | u_long outBit_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); 22 | u_long outBit_S2x_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen, char *(*f)(u_long) ); 23 | u_long outBit_S2Tx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen, const char *text2 ); 24 | 25 | unsigned long long outBit64_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); 26 | unsigned long long outBit64_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); 27 | 28 | 29 | u_long getBits (u_char *buf, int byte_offset, int startbit, int bitlen); 30 | long long getBits48 (u_char *buf, int byte_offset, int startbit, int bitlen); 31 | unsigned long long getBits64 (u_char *buf, int byte_offset, int startbit, int bitlen); 32 | 33 | u_char *getISO639_3 (u_char *str, u_char *buf); 34 | 35 | void print_text_468A (int v, const char *s, u_char *b, u_int len); 36 | void print_text_UTF8 (int v, const char *s, u_char *b, u_int len); 37 | void print_std_ascii (int v, const char *s, u_char *b, u_int len); 38 | 39 | void print_time_utc (int v, u_long utc); 40 | void print_time_mjd (int v, u_long mjd); 41 | void print_time40 (int verbose, u_long mjd, u_long utc); 42 | void print_timebase90kHz (int v, long long time90kHz); 43 | void print_pcr_time (int v, long long time90kHz, int ext_27MHz); 44 | 45 | void print_databytes (int verbose, const char *str, u_char *b, u_int len); 46 | void print_databytes_line (int v, const char *str, u_char *b, u_int len); 47 | void print_private_data (int verbose, u_char *b, u_int len); 48 | 49 | void print_BitMatrix (int v, char *str, u_char *b, int bitoffset, int matrix_x, int matrix_y); 50 | 51 | long str2i (char *s); 52 | int str2barray (char *s, u_char *barray, int max_len); 53 | 54 | char *str_cell_latitude (long latitude); 55 | char *str_cell_longitude (long longitude); 56 | 57 | 58 | 59 | struct IPv6ADDR { 60 | u_long ip[4]; // 32 bit: ip[0] ip[1] ip[2] ip[3] 61 | }; 62 | 63 | void displ_mac_addr (int v, long mac_H24, long mac_L24); 64 | void displ_IPv4_addr (int v, u_long ip); 65 | struct IPv6ADDR *getIPv6Addr (u_char *b, struct IPv6ADDR *x); 66 | void displ_IPv6_addr (int v, struct IPv6ADDR *ip); 67 | 68 | 69 | 70 | char *str_bit32 (u_long value, int bits); 71 | 72 | 73 | int lenCheckErrOut (int v, int len); 74 | 75 | 76 | #endif 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/strings/dsmcc_str.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: dsmcc_str.h,v 1.32 2009/11/22 15:36:31 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de 11 | 12 | 13 | -- dsmcc strings 14 | 15 | */ 16 | 17 | 18 | #ifndef __DSMCC_STR_H 19 | #define __DSMCC_STR_H 20 | 21 | 22 | char *dsmccStrDSMCC_CAROUSEL_DescriptorTAG (u_int i); 23 | char *dsmccStrDSMCC_INT_UNT_DescriptorTAG (u_int i); 24 | char *dsmccStrMHP_AIT_DescriptorTAG (u_int i); 25 | 26 | 27 | char *dsmccStrMHPOrg (u_int id); 28 | char *dsmccStrAction_Type (u_int id); 29 | char *dsmccStrProcessing_order (u_int id); 30 | char *dsmccStrPayload_scrambling_control (u_int id); 31 | char *dsmccStrAddress_scrambling_control (u_int id); 32 | char *dsmccStrLinkage0CTable_TYPE (u_int i); 33 | char *dsmccStrMultiProtEncapsMACAddrRangeField (u_int i); 34 | char *dsmccStrPlatform_ID (u_int id); 35 | char *dsmccStrCarouselType_ID (u_int id); 36 | char *dsmccStrHigherProtocol_ID (u_int id); 37 | char *dsmccStrUpdateType_ID (u_int id); 38 | 39 | char *dsmccStr_Command_ID (u_int id); 40 | char *dsmccStr_SelectMode_ID (u_int id); 41 | char *dsmccStr_DirectionIndicator (u_int id); 42 | 43 | char *dsmccStr_DescriptorType (u_int id); 44 | char *dsmccStr_SpecifierType (u_int id); 45 | char *dsmccStr_AccessMode (u_int id); 46 | 47 | char *dsmccStr_UpdateFlag (u_int id); 48 | char *dsmccStr_UpdateMethod (u_int id); 49 | char *dsmccStr_TimeUnits (u_int id); 50 | 51 | char *dsmccStr_GroupModuleLinkPosition (u_int id); 52 | char *dsmccStr_compression_method (u_int id); 53 | 54 | char *dsmccStr_streamMode (u_int id); 55 | char *dsmccStr_postDiscontinuityIndicator (u_int id); 56 | 57 | char *dsmccStrOUI (u_int id); 58 | char *dsmccStr_LLC_SNAP_prot (u_int id); 59 | 60 | 61 | 62 | char *dsmccStrMHP_application_type (u_int id); 63 | char *dsmccStrMHP_application_id (u_int id); 64 | char *dsmccStrMHP_application_control_code (u_int id); 65 | char *dsmccStrMHP_visibility_state (u_int id); 66 | char *dsmccStrMHP_protocol_id (u_int id); 67 | char *dsmccStrMHP_storage_property (u_int id); 68 | char *dsmccStrMHP_caching_transparency_level (u_int id); 69 | 70 | 71 | char *dsmccStr_adaptationType (u_int id); 72 | char *dsmccStr_dsmccType (u_int id); 73 | char *dsmccStr_messageID (u_int id); 74 | char *dsmccStr_transactionID_originator (u_int id); 75 | 76 | 77 | char *dsmccStrIOP_ProfileID (u_int id); 78 | char *dsmccStrBIOP_TAP_Use (u_int id); 79 | char *dsmccStrBIOP_TAP_SelectorType (u_int id); 80 | char *dsmccStrBIOP_EndianType (u_int id); 81 | char *dsmccStrBIOP_TypeID_Alias (u_int id); 82 | char *dsmccStrBIOP_BindingType (u_int id); 83 | char *dsmccStrBIOP_MAGIC (u_int id); 84 | 85 | 86 | #endif 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/strings/identifiers/dataBroadcastID.h: -------------------------------------------------------------------------------- 1 | { 0x0000, 0x0000, "Reserved for future use" }, 2 | { 0x0001, 0x0001, "Data pipe" }, 3 | { 0x0002, 0x0002, "Asynchronous data stream" }, 4 | { 0x0003, 0x0003, "Synchronous data stream" }, 5 | { 0x0004, 0x0004, "Synchronised data stream" }, 6 | { 0x0005, 0x0005, "Multi protocol encapsulation" }, 7 | { 0x0006, 0x0006, "Data Carousel" }, 8 | { 0x0007, 0x0007, "Object Carousel" }, 9 | { 0x0008, 0x0008, "DVB ATM streams" }, 10 | { 0x0009, 0x0009, "Higher Protocols based on asynchronous data streams" }, 11 | { 0x000A, 0x000A, "System Software Update service [TS 102 006]" }, 12 | { 0x000B, 0x000B, "IP/MAC Notification service [EN 301 192]" }, 13 | { 0x000C, 0x00EF, "Reserved for future use by DVB" }, 14 | { 0x00F0, 0x00F0, "MHP Object Carousel" }, 15 | { 0x00F1, 0x00F1, "reserved for MHP Multi Protocol Encapsulation" }, 16 | { 0x00F2, 0x00FE, "Reserved for MHP use" }, 17 | { 0x00FF, 0x00FF, "Reserved for future use by DVB" }, 18 | { 0x0100, 0x0100, "Eutelsat Data Piping" }, 19 | { 0x0101, 0x0101, "Eutelsat Data Streaming" }, 20 | { 0x0102, 0x0102, "SAGEM IP encapsulation in MPEG-2 PES packets" }, 21 | { 0x0103, 0x0103, "BARCO Data Broadcasting" }, 22 | { 0x0104, 0x0104, "CyberCity Multiprotocol Encapsulation (New Media Communications Ltd.)" }, 23 | { 0x0105, 0x0105, "CyberSat Multiprotocol Encapsulation (New Media Communications Ltd.)" }, 24 | { 0x0106, 0x0106, "The Digital Network" }, 25 | { 0x0107, 0x0107, "OpenTV Data Carousel" }, 26 | { 0x0108, 0x0108, "Panasonic" }, 27 | { 0x0109, 0x0109, "Kabel Deutschland" }, 28 | { 0x010A, 0x010A, "TechnoTrend Görler GmbH" }, 29 | { 0x010B, 0x010B, "Canal + Technologies system software download" }, 30 | { 0x010C, 0x010C, "Gemstar-TV Guide Europe" }, 31 | { 0x010D, 0x010D, "ACAP Object Carousel" }, 32 | { 0x010E, 0x010E, "Micronas Download Stream" }, 33 | { 0x0110, 0x0110, "Televizja Polsat" }, 34 | { 0x0111, 0x0111, "UK DTG" }, 35 | { 0x0112, 0x0112, "SkyMedia" }, 36 | { 0x0113, 0x0113, "Intellibyte DataBroadcasting" }, 37 | { 0x0114, 0x0114, "TeleWeb Data Carousel" }, 38 | { 0x0115, 0x0115, "TeleWeb Object Carousel" }, 39 | { 0x0116, 0x0116, "TeleWeb" }, 40 | { 0x0117, 0x0117, "BBC" }, 41 | { 0x0118, 0x0118, "Electra Entertainment Ltd" }, 42 | { 0x0119, 0x011A, "BBC 2 - 3" }, 43 | { 0x011B, 0x011B, "Teletext" }, 44 | { 0x011C, 0x0120, "Sky Download Streams 1-5" }, 45 | { 0x0121, 0x0121, "ICO mim" }, 46 | { 0x0122, 0x0122, "CI+ Data Carousel" }, 47 | { 0x0123, 0x0123, "H4TV carousel" }, 48 | { 0x4444, 0x4444, "4TV Data Broadcast" }, 49 | { 0x4E4F, 0x4E4F, "Nokia IP based software delivery" }, 50 | { 0xBBB1, 0xBBB1, "BBG Data Caroussel" }, 51 | { 0xBBB2, 0xBBB2, "BBG Object Caroussel" }, 52 | { 0xBBBB, 0xBBBB, "Bertelsmann Broadband Group" }, 53 | { 0xFFFF, 0xFFFF, "Reserved for future use" }, 54 | { 0, 0, NULL } 55 | -------------------------------------------------------------------------------- /src/datacarousel/unts.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: unts.c,v 1.8 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- UNT Section (Update Notification Table) 14 | -- DSM-CC Data Carousel ETSI TS 102 006 15 | 16 | */ 17 | 18 | #include "dvbsnoop.h" 19 | #include "unts.h" 20 | #include "dsmcc_misc.h" 21 | #include "strings/dvb_str.h" 22 | #include "strings/dsmcc_str.h" 23 | #include "misc/output.h" 24 | 25 | void section_DSMCC_UNT (u_char *b, int len) 26 | { 27 | 28 | int len1,i; 29 | u_int table_id; 30 | u_int section_length; 31 | 32 | 33 | 34 | out_nl (3,"UNT-decoding...."); 35 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 36 | (char *(*)(u_long))dvbstrTableID ); 37 | if (table_id != 0x4b) { 38 | out_nl (3,"wrong Table ID"); 39 | return; 40 | } 41 | 42 | 43 | outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); 44 | outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); 45 | outBit_Sx_NL (6,"reserved_2: ", b,10, 2); 46 | section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); 47 | outBit_S2x_NL(3,"Action_type: ", b,24, 8, 48 | (char *(*)(u_long))dsmccStrAction_Type ); 49 | outBit_Sx_NL (3,"OUI_hash: ", b,32, 8); 50 | outBit_Sx_NL (6,"reserved_3: ", b,40, 2); 51 | 52 | outBit_Sx_NL (3,"Version_number: ", b,42, 5); 53 | outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, 54 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 55 | outBit_Sx_NL (3,"Section_number: ", b,48, 8); 56 | outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); 57 | 58 | outBit_S2x_NL(3,"OUI: ", b,64,24, 59 | (char *(*)(u_long))dsmccStrOUI ); 60 | outBit_S2x_NL(3,"Processing_order: ", b,88, 8, 61 | (char *(*)(u_long))dsmccStrProcessing_order); 62 | 63 | b += 12; 64 | len1 = section_length - 9; 65 | 66 | 67 | 68 | /* common descriptor loop */ 69 | 70 | i = dsmcc_pto_descriptor_loop ("common",b); 71 | b += i; 72 | len1 -= i; 73 | 74 | 75 | indent (+1); 76 | while (len1 > 4) { 77 | int len2; 78 | 79 | i= dsmcc_CompatibilityDescriptor(b); 80 | b += i; 81 | len1 -= i; 82 | 83 | len2 = outBit_Sx_NL (3,"platform_loop_length: ", b, 0,16); 84 | b += 2; 85 | len1 -= 2; 86 | 87 | while (len2 > 0) { 88 | 89 | i = dsmcc_pto_descriptor_loop ("target",b); 90 | b += i; 91 | len1 -= i; 92 | len2 -= i; 93 | 94 | i = dsmcc_pto_descriptor_loop ("operational",b); 95 | b += i; 96 | len1 -= i; 97 | len2 -= i; 98 | } 99 | out_NL (4); 100 | } 101 | indent (-1); 102 | 103 | 104 | outBit_Sx_NL (5,"CRC: ", b,0,32); 105 | } 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/descriptors/mpeg_descriptor.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpeg_descriptor.h,v 1.14 2009/11/22 15:36:06 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | -- MPEG Descriptors ISO/IEC 13818-2 13 | 14 | */ 15 | 16 | #ifndef _MPEG_DESCRIPTOR_H 17 | #define _MPEG_DESCRIPTOR_H 18 | 19 | 20 | int descriptorMPEG (u_char *b); 21 | 22 | void descriptorMPEG_VideoStream (u_char *b); 23 | void descriptorMPEG_AudioStream (u_char *b); 24 | void descriptorMPEG_Hierarchy (u_char *b); 25 | void descriptorMPEG_Registration (u_char *b); 26 | void descriptorMPEG_DataStreamAlignment (u_char *b); 27 | void descriptorMPEG_TargetBackgroundGrid (u_char *b); 28 | void descriptorMPEG_VideoWindow (u_char *b); 29 | void descriptorMPEG_CA (u_char *b); 30 | void descriptorMPEG_ISO639_Lang (u_char *b); 31 | void descriptorMPEG_SystemClock (u_char *b); 32 | void descriptorMPEG_MultiplexBufUtil (u_char *b); 33 | void descriptorMPEG_Copyright (u_char *b); 34 | void descriptorMPEG_MaxBitrate (u_char *b); 35 | void descriptorMPEG_PrivateDataIndicator (u_char *b); 36 | void descriptorMPEG_SmoothingBuf (u_char *b); 37 | void descriptorMPEG_STD (u_char *b); 38 | void descriptorMPEG_IBP (u_char *b); 39 | /* 13818-6 , TR 102 006 */ 40 | void descriptorMPEG_Carousel_Identifier (u_char *b); 41 | void descriptorMPEG_Association_tag (u_char *b); 42 | void descriptorMPEG_Deferred_Association_tags (u_char *b); 43 | 44 | /* 13818-6 Stream descriptors */ 45 | void descriptorMPEG_NPT_reference (u_char *b); 46 | void descriptorMPEG_NPT_endpoint (u_char *b); 47 | void descriptorMPEG_stream_mode (u_char *b); 48 | void descriptorMPEG_stream_event (u_char *b); 49 | 50 | /* MPEG4 */ 51 | void descriptorMPEG_MPEG4_video (u_char *b); 52 | void descriptorMPEG_MPEG4_audio (u_char *b); 53 | void descriptorMPEG_IOD (u_char *b); 54 | void descriptorMPEG_SL (u_char *b); 55 | void descriptorMPEG_FMC (u_char *b); 56 | void descriptorMPEG_External_ES_ID (u_char *b); 57 | void descriptorMPEG_MuxCode (u_char *b); 58 | void descriptorMPEG_FMXBufferSize (u_char *b); 59 | void descriptorMPEG_MultiplexBuffer (u_char *b); 60 | void descriptorMPEG_ContentLabeling (u_char *b); 61 | 62 | 63 | /* TV ANYTIME, TS 102 323 */ 64 | void descriptorMPEG_TVA_metadata_pointer (u_char *b); 65 | void descriptorMPEG_TVA_metadata (u_char *b); 66 | void descriptorMPEG_TVA_metadata_STD (u_char *b); 67 | 68 | /* H.222.0 AMD3 */ 69 | void descriptorMPEG_AVC_video (u_char *b); 70 | void descriptorMPEG_IPMP (u_char *b); 71 | void descriptorMPEG_AVC_timing_and_HRD (u_char *b); 72 | 73 | /* H.222.0 AMD4 */ 74 | void descriptorMPEG_MPEG2_AAC_audio (u_char *b); 75 | void descriptorMPEG_FlexMuxTiming (u_char *b); 76 | 77 | 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /src/misc/cmdline.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: cmdline.h,v 1.33 2006/03/06 00:04:54 rasc Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | */ 15 | 16 | 17 | 18 | #ifndef __CMDLINE_H 19 | #define __CMDLINE_H 20 | 21 | #include "dvb_api/dvb_api.h" 22 | 23 | 24 | /* 25 | -- defs... 26 | */ 27 | 28 | enum PACKET_MODE {SECT, TS, PES, PS, 29 | PIDSCAN, PIDBANDWIDTH, 30 | SCAN_FE_SIGNAL, SCAN_FE_INFO}; 31 | enum TIME_MODE {NO_TIME, FULL_TIME, DELTA_TIME}; 32 | 33 | typedef struct _OPTIONS { 34 | int packet_mode; 35 | int packet_header_sync; // Try to do a softsync of packet sync bytes -- $$$ OBSOLETE!!! 36 | int buffer_hexdump; // 0/1: print hexdump prior to decoding 37 | int printhex; // hexdump mode 38 | int printdecode; // decode verbose mode 39 | int binary_out; // binary output? 40 | char *outPidFile; // write to file (implies binary_out) 41 | char *inpPidFile; // read from file instead of dmux if not NULL 42 | char *devDemux; // input device DMX 43 | char *devDvr; // input device DVR 44 | char *devFE; // input device Frontend 45 | int dvbAdapterNr; // /dev/dvb/adapterN/... (Api3) 46 | int dvbDeviceNr; // z.B. /dev/dvb/.../demuxN 47 | long rd_buffer_size; // read buffer size in (0L = default) 48 | u_int pid; // decode PID 49 | int filterLen; // bytelength of section filter 50 | u_char filter[DMX_FILTER_SIZE]; // section byte filter 51 | u_char mask[DMX_FILTER_SIZE]; // section byte mask 52 | int crc; // section CRC check? 53 | int soft_crc; // section CRC soft check? 54 | int max_dmx_filter; // max dmx filter use? (pidscan) 55 | long timeout_ms; // read timeout in ms 56 | long rd_packet_count; // read max. n packets 57 | long dec_packet_count; // decode max. n packets 58 | int rd_all_sections; // read all sections no. for a pid 59 | int spider_pid; // Section PID spider mode 60 | int ts_subdecode; // sub decode PES or SEC in TS stream 61 | int ts_raw_mode; // Read full TS in TS stream mode (if hardware supported) 62 | int time_mode; // time print mode 63 | char *privateProviderStr; // Private Provider ID str (usedef tables, descr) 64 | int dsmcc_save; // save modules from DSM-CC to file 65 | int hide_copyright; // suppress message at prog start 66 | int help; 67 | } OPTION; 68 | 69 | 70 | /* 71 | -- prototypes 72 | */ 73 | 74 | int cmdline_options (int argc, char **argv, OPTION *opt); 75 | OPTION *getOptionPtr (void); 76 | 77 | #endif 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/pes/mpeg_sysheader.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpeg_sysheader.c,v 1.3 2009/11/22 15:36:13 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | 16 | 17 | #include "dvbsnoop.h" 18 | #include "mpeg_sysheader.h" 19 | #include "strings/dvb_str.h" 20 | #include "misc/hexprint.h" 21 | #include "misc/helper.h" 22 | #include "misc/output.h" 23 | 24 | 25 | 26 | 27 | 28 | 29 | /* 30 | * PS System header 31 | * if (len == -1) then 32 | * system_header is in a PS 33 | * do not print packet_start_code & ID (already printed by caller) 34 | * else 35 | * pack_header is within a pes packet (pack_header) 36 | * print packet_start_code 37 | */ 38 | 39 | 40 | void mpeg_system_header (int v, u_char *b, int len) 41 | { 42 | 43 | /* z.B. H.222 ISO 13818-1 Table 2-34 */ 44 | /* ISO 11172-1 system header */ 45 | 46 | 47 | if (len == 0) return; 48 | 49 | out_nl (v,"System_header: "); 50 | indent (+1); 51 | 52 | if (len > 0) { 53 | // -- within PES packet, not PS! 54 | outBit_Sx_NL (v,"system_header_start_code: ", b, 0, 32); 55 | } 56 | 57 | 58 | 59 | // -- get real length from system_header data 60 | len = outBit_Sx_NL (v,"header_length: ", b, 32, 16); 61 | 62 | outBit_Sx_NL (v,"marker_bit: ", b, 48, 1); 63 | outBit_Sx_NL (v,"rate_bound: ", b, 49, 22); 64 | outBit_Sx_NL (v,"marker_bit: ", b, 71, 1); 65 | outBit_Sx_NL (v,"audio_bound: ", b, 72, 6); 66 | outBit_Sx_NL (v,"fixed_flag: ", b, 78, 1); 67 | outBit_Sx_NL (v,"CSPS_flag: ", b, 79, 1); 68 | outBit_Sx_NL (v,"system_audio_lock_flag: ", b, 80, 1); 69 | outBit_Sx_NL (v,"system_video_lock_flag: ", b, 81, 1); 70 | outBit_Sx_NL (v,"marker_bit: ", b, 82, 1); 71 | outBit_Sx_NL (v,"video_bound: ", b, 83, 5); 72 | outBit_Sx_NL (v,"packet_rate_restriction_flag: ", b, 88, 1); 73 | outBit_Sx_NL (v,"reserved_byte: ", b, 89, 7); 74 | 75 | b += 12; 76 | len -= 12; 77 | 78 | 79 | // while (nextbits () == '1') { 80 | // while ((bit = getBits (b, 0,0,1)) == 0x01) { 81 | while ( (*b & 0x80) ) { 82 | if (len <= 0) break; 83 | 84 | out_NL (v); 85 | outBit_S2x_NL(v,"Stream_id: ", b, 0, 8, 86 | (char *(*)(u_long))dvbstrPESstream_ID ); 87 | outBit_Sx_NL (v,"fixed (0x02): ", b, 8, 2); 88 | outBit_Sx_NL (v,"P-STD_buffer_bound_scale: ", b, 10, 1); 89 | outBit_Sx_NL (v,"P-STD_buffer_size_bound: ", b, 11, 13); 90 | 91 | b += 3; 92 | len -= 3; 93 | if (len < 0) out_nl (1, "$$$ something wrong here (length<0)"); 94 | } 95 | 96 | 97 | indent (-1); 98 | } 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/datacarousel/mpe_fec.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: mpe_fec.c,v 1.4 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- MPE_FEC Section 14 | -- EN 301 192 v1.4.1 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "mpe_fec.h" 23 | 24 | #include "strings/dvb_str.h" 25 | #include "strings/dsmcc_str.h" 26 | #include "misc/output.h" 27 | 28 | 29 | 30 | 31 | 32 | void section_MPE_FEC (u_char *b, int len) 33 | { 34 | /* EN 301 192 7.x */ 35 | 36 | u_int i; 37 | u_int table_id; 38 | u_int section_length; 39 | 40 | 41 | 42 | out_nl (3,"MPE_FEC-decoding...."); 43 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 44 | (char *(*)(u_long))dvbstrTableID ); 45 | if (table_id != 0x78) { 46 | out_nl (3,"wrong Table ID"); 47 | return; 48 | } 49 | 50 | 51 | outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); 52 | outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); 53 | outBit_Sx_NL (6,"reserved_1: ", b,10, 2); 54 | section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); 55 | outBit_Sx_NL (3,"padding_columns: ", b,24, 8); 56 | 57 | outBit_Sx_NL (6,"reserved_for_future_use: ", b,32, 8); 58 | outBit_Sx_NL (6,"reserved_3: ", b,40, 2); 59 | 60 | outBit_Sx_NL (6,"reserved_for_future_use: ", b,42, 5); 61 | outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, 62 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 63 | outBit_Sx_NL (3,"Section_number: ", b,48, 8); 64 | outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); 65 | 66 | b += 8; 67 | section_length -= 5; 68 | 69 | i = real_time_parameters(b); 70 | b += i; 71 | section_length -= i; 72 | 73 | 74 | print_databytes (4,"rs_data_bytes:", b,section_length-4); 75 | b += section_length-4; 76 | 77 | 78 | outBit_Sx_NL (5,"CRC: ", b,0,32); 79 | } 80 | 81 | 82 | 83 | 84 | 85 | 86 | // 87 | // -- real time parameter block 88 | // -- EN 301 192 v 1.4.1 89 | // 90 | 91 | int real_time_parameters (u_char *b) 92 | { 93 | int delta_t; 94 | 95 | out_nl (3,"Real time parameters:"); 96 | indent (1); 97 | 98 | delta_t = outBit_Sx (3,"delta_t: ", b, 0, 12); 99 | if (delta_t) out_nl (3," [= %d.%02d sec]", delta_t/100, delta_t%100); 100 | else out_nl (3," [= no more bursts]"); 101 | 102 | 103 | outBit_S2x_NL (3,"table_boundary: ", b, 12, 1, 104 | (char *(*)(u_long))dvbstrMPE_FEC_table_frame_boundary ); 105 | outBit_S2x_NL (3,"frame_boundary: ", b, 13, 1, 106 | (char *(*)(u_long))dvbstrMPE_FEC_table_frame_boundary ); 107 | 108 | outBit_Sx_NL (3,"address: ", b, 14, 18); 109 | 110 | indent (-1); 111 | return 4; 112 | } 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /src/sections/cat.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: cat.c,v 1.12 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- CAT Section 14 | 15 | */ 16 | 17 | 18 | #include "dvbsnoop.h" 19 | #include "cat.h" 20 | #include "descriptors/descriptor.h" 21 | #include "strings/dvb_str.h" 22 | #include "misc/output.h" 23 | 24 | 25 | void section_CAT (u_char *b, int len) 26 | { 27 | /* IS13818-1 S. 63 */ 28 | /* see also: ETS 468, ETR 289 */ 29 | 30 | typedef struct _CAT { 31 | u_int table_id; 32 | u_int section_syntax_indicator; 33 | u_int reserved_1; 34 | u_int section_length; 35 | u_int reserved_2; 36 | u_int version_number; 37 | u_int current_next_indicator; 38 | u_int section_number; 39 | u_int last_section_number; 40 | 41 | // private section 42 | 43 | unsigned long CRC; 44 | } CAT; 45 | 46 | CAT c; 47 | int len1; 48 | 49 | 50 | c.table_id = b[0]; 51 | c.section_syntax_indicator = getBits (b, 0, 8, 1); 52 | c.reserved_1 = getBits (b, 0, 10, 2); 53 | c.section_length = getBits (b, 0, 12, 12); 54 | c.reserved_2 = getBits (b, 0, 24, 18); 55 | c.version_number = getBits (b, 0, 42, 5); 56 | c.current_next_indicator = getBits (b, 0, 47, 1); 57 | c.section_number = getBits (b, 0, 48, 8); 58 | c.last_section_number = getBits (b, 0, 56, 8); 59 | 60 | 61 | 62 | out_nl (3,"CAT-decoding...."); 63 | out_S2B_NL (3,"Table_ID: ",c.table_id, dvbstrTableID (c.table_id)); 64 | if (c.table_id != 0x01) { 65 | out_nl (3,"wrong Table ID"); 66 | return; 67 | } 68 | 69 | 70 | out_SB_NL (3,"section_syntax_indicator: ",c.section_syntax_indicator); 71 | out_SB_NL (6,"(fixed): ",0); 72 | out_SB_NL (6,"reserved_1: ",c.reserved_1); 73 | out_SW_NL (5,"Section_length: ",c.section_length); 74 | out_SB_NL (6,"reserved_2: ",c.reserved_2); 75 | out_SB_NL (3,"Version_number: ",c.version_number); 76 | out_S2B_NL(3,"current_next_indicator: ",c.current_next_indicator, dvbstrCurrentNextIndicator(c.current_next_indicator)); 77 | out_SB_NL (3,"Section_number: ",c.section_number); 78 | out_SB_NL (3,"Last_Section_number: ",c.last_section_number); 79 | 80 | // buffer + header, len = len - header - CRC 81 | // Descriptor ISO 13818 - 2.6.1 82 | 83 | 84 | // - header - CRC 85 | len1 = c.section_length - 5; 86 | b += 8; 87 | 88 | 89 | indent (1); 90 | while (len1 > 4) { 91 | int i; 92 | 93 | i = descriptor (b, MPEG); 94 | len1 -= i; 95 | b += i; 96 | 97 | } 98 | indent (-1); 99 | out_NL (3); 100 | 101 | 102 | c.CRC = getBits (b, 0, 0, 32); 103 | out_SL_NL (5,"CRC: ",c.CRC); 104 | 105 | } 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/sections/tsdt.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: tsdt.c,v 1.14 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- TSDT section 14 | -- Transport Stream Description Section 15 | -- ISO 13818 16 | 17 | */ 18 | 19 | #include "dvbsnoop.h" 20 | #include "tsdt.h" 21 | #include "descriptors/descriptor.h" 22 | #include "strings/dvb_str.h" 23 | #include "misc/output.h" 24 | 25 | 26 | 27 | void section_TSDT (u_char *b, int len) 28 | { 29 | 30 | typedef struct _TDST { 31 | u_int table_id; 32 | u_int section_syntax_indicator; 33 | u_int reserved_1; 34 | u_int reserved_2; 35 | u_int section_length; 36 | u_int reserved_3; 37 | u_int version_number; 38 | u_int current_next_indicator; 39 | u_int section_number; 40 | u_int last_section_number; 41 | 42 | // N descriptor 43 | 44 | u_long crc; 45 | } TDST; 46 | 47 | 48 | TDST t; 49 | int len1; 50 | 51 | 52 | 53 | t.table_id = b[0]; 54 | t.section_syntax_indicator = getBits (b, 0, 8, 1); 55 | t.reserved_1 = getBits (b, 0, 9, 1); 56 | t.reserved_2 = getBits (b, 0, 10, 2); 57 | t.section_length = getBits (b, 0, 12, 12); 58 | t.reserved_3 = getBits (b, 0, 24, 18); 59 | t.version_number = getBits (b, 0, 42, 5); 60 | t.current_next_indicator = getBits (b, 0, 47, 1); 61 | t.section_number = getBits (b, 0, 48, 8); 62 | t.last_section_number = getBits (b, 0, 56, 8); 63 | 64 | b += 8; 65 | len1 = t.section_length - 5; 66 | 67 | 68 | 69 | out_nl (3,"TDST-decoding...."); 70 | out_S2B_NL (3,"Table_ID: ",t.table_id, dvbstrTableID (t.table_id)); 71 | if (t.table_id != 0x03) { 72 | out_nl (3,"wrong Table ID"); 73 | return; 74 | } 75 | 76 | out_SB_NL (3,"section_syntax_indicator: ",t.section_syntax_indicator); 77 | out_SB_NL (6,"Fixed '0': ",t.reserved_1); 78 | out_SB_NL (6,"reserved_2: ",t.reserved_2); 79 | out_SW_NL (5,"Section_length: ",t.section_length); 80 | out_SL_NL (6,"reserved_3: ",t.reserved_3); 81 | out_SB_NL (3,"Version_number: ",t.version_number); 82 | out_S2B_NL(3,"current_next_indicator: ",t.current_next_indicator, dvbstrCurrentNextIndicator(t.current_next_indicator)); 83 | out_SB_NL (3,"Current_next_indicator: ",t.current_next_indicator); 84 | out_SB_NL (3,"Section_number: ",t.section_number); 85 | out_SB_NL (3,"Last_Section_number: ",t.last_section_number); 86 | 87 | 88 | indent (+1); 89 | while (len1 > 4) { 90 | int x; 91 | 92 | x = descriptor (b, MPEG); 93 | b += x; 94 | len1 -= x; 95 | } 96 | indent (-1); 97 | out_NL (3); 98 | 99 | 100 | t.crc = getBits (b, 0, 0, 32); 101 | out_SL_NL (5,"CRC: ",t.crc); 102 | 103 | } 104 | 105 | 106 | -------------------------------------------------------------------------------- /src/misc/sig_abort.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: sig_abort.c,v 1.3 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Handle Kill/Interrupt Signals from User/OS 14 | -- (e.g. Kill -1) 15 | 16 | */ 17 | 18 | 19 | #include 20 | #include 21 | 22 | 23 | #include "sig_abort.h" 24 | 25 | 26 | // 27 | // -- Module Global Vars 28 | // 29 | 30 | 31 | static void SmoothHandler (int sig_nr); 32 | static void AbortHandler (int sig_nr); 33 | static void NullHandler (int sig_nr); 34 | 35 | 36 | 37 | // catch these signals 38 | static struct { 39 | int sig; 40 | void (*new_handler)(); 41 | void (*org_handler)(); 42 | } signalList[] = { 43 | { SIGHUP, SmoothHandler, NullHandler }, // -1 terminate smoothly 44 | { SIGQUIT, SmoothHandler, NullHandler }, // -3 terminate smoothly 45 | { SIGABRT, AbortHandler, NullHandler }, // -6 terminate at once 46 | { SIGTERM, SmoothHandler, NullHandler } // -15 terminate smoothly 47 | }; 48 | 49 | 50 | #define SignalListSize (sizeof(signalList) / sizeof(signalList[0])) 51 | 52 | 53 | static int hasSignal = 0; // no Signal by default received 54 | 55 | 56 | // 57 | // -- init OS Signal Handler 58 | // -- Set Signals to catch and handler functions 59 | // 60 | 61 | void initOSSigHandler (void) 62 | { 63 | int i; 64 | 65 | for (i=0; i < SignalListSize; i++) { 66 | 67 | signalList[i].org_handler = signal(signalList[i].sig, signalList[i].new_handler); 68 | 69 | } 70 | 71 | hasSignal = 0; 72 | 73 | } 74 | 75 | 76 | 77 | // 78 | // -- restore OS Signal Handler 79 | // -- Set Signals and handler functions prior to dvbsnoop execution 80 | // 81 | 82 | void restoreOSSigHandler (void) 83 | { 84 | int i; 85 | 86 | for (i=0; i < SignalListSize; i++) { 87 | 88 | if (signalList[i].org_handler != SIG_ERR) { 89 | signal(signalList[i].sig, signalList[i].org_handler); 90 | } 91 | 92 | } 93 | 94 | } 95 | 96 | 97 | 98 | // 99 | // -- check if Abort is Signaled to Program 100 | // 101 | int isSigAbort (void) 102 | { 103 | return hasSignal; 104 | } 105 | 106 | 107 | 108 | // 109 | // -- The Signal Handler Routines 110 | // 111 | 112 | 113 | // 114 | // -- to be checked via isSigAbort() 115 | // 116 | static void SmoothHandler (int sig_nr) 117 | { 118 | hasSignal = sig_nr; 119 | } 120 | 121 | 122 | // 123 | // -- Abort NOW by program... 124 | // -- exit () should flush buffers 125 | // 126 | static void AbortHandler (int sig_nr) 127 | { 128 | 129 | hasSignal = sig_nr; 130 | restoreOSSigHandler(); 131 | 132 | exit (sig_nr); 133 | } 134 | 135 | 136 | // 137 | // -- dummy 138 | // 139 | static void NullHandler (int sig_nr) 140 | { 141 | return; 142 | } 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /src/misc/output.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: output.h,v 1.15 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | */ 13 | 14 | 15 | #ifndef __OUTPUT_H 16 | #define __OUTPUT_H 17 | 18 | 19 | void indent (int v); 20 | void setMaxVerboseLevel (int v); 21 | int getMaxVerboseLevel (); 22 | void out(int verbose, const char *msgfmt,...); 23 | void out_nl(int verbose, const char *msgfmt,...); 24 | void out_nl2(int verbose); 25 | void print_indent(void); 26 | 27 | 28 | /* 29 | * Warning: following macros are violating C conventions: 30 | * macro params are used more than once in a macro!! 31 | * avoid stuff like out_L (4,"xxx",i++); 32 | * $$$ ^^^^ 33 | * (but i use this for convenience...) 34 | */ 35 | 36 | 37 | #define out_NL(v) out_nl2(v) 38 | 39 | 40 | // L = long (32 bit) output 41 | // T = TriByte (24 bit) 42 | // W = Word (16 bit) 43 | // B = Byte ( 8 bit) 44 | 45 | /* out "128 (0x80)" */ 46 | #define out_LL(v,hex) out((v),"%lld (0x%llx)",(long long)(hex),(long long)(hex)) 47 | #define out_L(v,hex) out((v),"%lu (0x%08lx)",(hex),(hex)) 48 | #define out_T(v,hex) out((v),"%lu (0x%06x)",(hex),(hex)) 49 | #define out_W(v,hex) out((v),"%u (0x%04x)",(hex),(hex)) 50 | #define out_B(v,hex) out((v),"%u (0x%02x)",(hex),(hex)) 51 | 52 | 53 | /* out "String 128 (=0x80)" */ 54 | #define out_SLL(v,str,hex) out((v),"%s%lld (0x%llx)",(str),(long long)(hex),(long long)(hex)) 55 | #define out_SL(v,str,hex) out((v),"%s%lu (0x%08lx)",(str),(hex),(hex)) 56 | #define out_ST(v,str,hex) out((v),"%s%lu (0x%06x)",(str),(hex),(hex)) 57 | #define out_SW(v,str,hex) out((v),"%s%u (0x%04x)",(str),(hex),(hex)) 58 | #define out_SB(v,str,hex) out((v),"%s%u (0x%02x)",(str),(hex),(hex)) 59 | 60 | 61 | /* out "String 128 (=0x80)\n" */ 62 | #define out_SLL_NL(v,str,hex) out_nl((v),"%s%lld (0x%llx)",(str),(long long)(hex),(long long)(hex)) 63 | #define out_SL_NL(v,str,hex) out_nl((v),"%s%lu (0x%08lx)",(str),(hex),(hex)) 64 | #define out_ST_NL(v,str,hex) out_nl((v),"%s%lu (0x%06x)",(str),(hex),(hex)) 65 | #define out_SW_NL(v,str,hex) out_nl((v),"%s%u (0x%04x)",(str),(hex),(hex)) 66 | #define out_SB_NL(v,str,hex) out_nl((v),"%s%u (0x%02x)",(str),(hex),(hex)) 67 | 68 | 69 | /* out "String 128 (=0x80) [=string]\n" */ 70 | #define out_S2LL_NL(v,str,hex,str2) out_nl((v),"%s%lld (0x%llx) [= %s]",(str),(long long)(hex),(long long)(hex),(str2)) 71 | #define out_S2L_NL(v,str,hex,str2) out_nl((v),"%s%lu (0x%08lx) [= %s]",(str),(hex),(hex),(str2)) 72 | #define out_S2T_NL(v,str,hex,str2) out_nl((v),"%s%lu (0x%06x) [= %s]",(str),(hex),(hex),(str2)) 73 | #define out_S2W_NL(v,str,hex,str2) out_nl((v),"%s%u (0x%04x) [= %s]",(str),(hex),(hex),(str2)) 74 | #define out_S2B_NL(v,str,hex,str2) out_nl((v),"%s%u (0x%02x) [= %s]",(str),(hex),(hex),(str2)) 75 | 76 | 77 | 78 | 79 | #endif 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/sections/rst.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: rst.c,v 1.10 2009/11/22 15:36:27 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | -- RST section 15 | -- Running Status Table 16 | -- ETSI EN 300 468 5.2.7 17 | 18 | */ 19 | 20 | #include "dvbsnoop.h" 21 | #include "rst.h" 22 | #include "strings/dvb_str.h" 23 | #include "misc/output.h" 24 | 25 | void section_RST (u_char *b, int len) 26 | { 27 | 28 | typedef struct _RST { 29 | u_int table_id; 30 | u_int section_syntax_indicator; 31 | u_int reserved_1; 32 | u_int reserved_2; 33 | u_int section_length; 34 | 35 | // N1 RST_LIST2 36 | 37 | } RST; 38 | 39 | 40 | typedef struct _RST_LIST2 { 41 | u_int transport_stream_id; 42 | u_int original_network_id; 43 | u_int service_id; 44 | u_int event_id; 45 | u_int reserved_1; 46 | u_int running_status; 47 | } RST_LIST2; 48 | 49 | 50 | 51 | RST r; 52 | RST_LIST2 r2; 53 | int len1; 54 | 55 | 56 | 57 | r.table_id = b[0]; 58 | r.section_syntax_indicator = getBits (b, 0, 8, 1); 59 | r.reserved_1 = getBits (b, 0, 9, 1); 60 | r.reserved_2 = getBits (b, 0, 10, 2); 61 | r.section_length = getBits (b, 0, 12, 12); 62 | 63 | 64 | out_nl (3,"RST-decoding...."); 65 | out_S2B_NL (3,"Table_ID: ",r.table_id, dvbstrTableID (r.table_id)); 66 | if (r.table_id != 0x71) { 67 | out_nl (3,"wrong Table ID"); 68 | return; 69 | } 70 | 71 | 72 | out_SB_NL (3,"section_syntax_indicator: ",r.section_syntax_indicator); 73 | out_SB_NL (6,"reserved_1: ",r.reserved_1); 74 | out_SB_NL (6,"reserved_2: ",r.reserved_2); 75 | out_SW_NL (5,"Section_length: ",r.section_length); 76 | 77 | 78 | len1 = r.section_length - 3; 79 | b += 3; 80 | 81 | indent (+1); 82 | while (len1 > 0) { 83 | 84 | r2.transport_stream_id = getBits (b, 0, 0, 16); 85 | r2.original_network_id = getBits (b, 0, 16, 16); 86 | r2.service_id = getBits (b, 0, 32, 16); 87 | r2.event_id = getBits (b, 0, 48, 16); 88 | r2.reserved_1 = getBits (b, 0, 64, 5); 89 | r2.running_status = getBits (b, 0, 69, 3); 90 | 91 | b += 9; 92 | len1 -= 9; 93 | 94 | out_NL (3); 95 | out_SW_NL (3,"Transport_stream_ID: ",r2.transport_stream_id); 96 | out_S2W_NL (3,"Original_network_ID: ",r2.original_network_id, 97 | dvbstrOriginalNetwork_ID(r2.original_network_id)); 98 | out_S2W_NL (3,"Service_ID: ",r2.service_id, 99 | " --> refers to PMT program_number"); 100 | out_SW_NL (3,"Event_ID: ",r2.event_id); 101 | out_SB_NL (6,"reserved_1: ",r2.reserved_1); 102 | out_S2B_NL (3,"Running_status: ",r2.running_status, 103 | dvbstrRunningStatus_FLAG (r2.running_status)); 104 | 105 | } // while len1 106 | indent (-1); 107 | 108 | 109 | } 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /src/misc/output.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: output.c,v 1.13 2009/11/22 15:36:10 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- Output Module 14 | 15 | */ 16 | 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | 25 | #include "dvbsnoop.h" 26 | #include "output.h" 27 | 28 | 29 | /* 30 | -- Module Global Vars 31 | */ 32 | 33 | static int max_verbose_level = 0; 34 | static int col0 = 0; //2 35 | 36 | static int indent_level = 0; 37 | int table_indent [] = {0,4,8,12,15,18,21,24,27,30}; 38 | 39 | #define MAX_INDENT_LEVEL ( (sizeof(table_indent)/sizeof(int)) - 1) 40 | 41 | 42 | 43 | 44 | 45 | 46 | /* 47 | -- set indent-level 48 | -- and sends a '\r' to reset indent prints 49 | - +1 = indent plus one level 50 | - -1 = unindent one level 51 | - 0 = reset to Level 0 52 | */ 53 | 54 | void indent (int v) 55 | 56 | { 57 | if (v == 0) indent_level = 0; 58 | else indent_level += v; 59 | 60 | if (indent_level < 0) 61 | indent_level = 0; 62 | if (indent_level >= MAX_INDENT_LEVEL) 63 | indent_level = MAX_INDENT_LEVEL; 64 | 65 | //2 fputc ('\r',stdout); 66 | //2 print_indent(); 67 | // out_nl2 (0); 68 | } 69 | 70 | 71 | 72 | /* 73 | -- set max verbosity level 74 | -- 0 = highest, 9 = lowest level 75 | -- print message upto (including) this verbosity level 76 | */ 77 | 78 | void setMaxVerboseLevel (int v) 79 | { 80 | max_verbose_level = v; 81 | } 82 | 83 | int getMaxVerboseLevel () 84 | { 85 | return max_verbose_level; 86 | } 87 | 88 | 89 | 90 | 91 | /* 92 | -- output special printf 93 | -- out_nl will append \n at the end of the output 94 | */ 95 | 96 | void out(int verbose, const char *msgfmt,...) 97 | { 98 | va_list args; 99 | 100 | if (verbose <= max_verbose_level) { 101 | print_indent(); //2 102 | va_start (args,msgfmt); 103 | vfprintf (stdout, msgfmt, args); 104 | va_end (args); 105 | } 106 | } 107 | 108 | 109 | void out_nl(int verbose, const char *msgfmt,...) 110 | { 111 | va_list args; 112 | 113 | if (verbose <= max_verbose_level) { 114 | print_indent(); //2 115 | va_start (args,msgfmt); 116 | vfprintf (stdout, msgfmt, args); 117 | va_end (args); 118 | 119 | out_nl2(verbose); 120 | } 121 | } 122 | 123 | 124 | /* 125 | -- just print a NL 126 | */ 127 | 128 | void out_nl2 (int verbose) 129 | { 130 | if (verbose <= max_verbose_level) { 131 | fputc ('\n',stdout); 132 | col0 = 1; //2 133 | //2 print_indent(); 134 | } 135 | 136 | } 137 | 138 | 139 | void print_indent (void) 140 | 141 | { 142 | int i; 143 | 144 | if (! col0) return; //2 145 | 146 | for (i=0; i len 47 | i = getBits (b, 0, 96, 8); // tap_counts 48 | i = i * 7; 49 | 50 | if (i > len_org) { // this is no ModuleInfo 51 | print_databytes (v,"Data Bytes (non-standard):", b, len_org); 52 | return len_org; 53 | } 54 | 55 | 56 | 57 | 58 | out_nl (v, "BIOP::ModuleInfo:"); 59 | 60 | indent (+1); 61 | outBit_S2Tx_NL (v,"ModuleTimeOut: ", b, 0, 32, "(ms)"); 62 | outBit_S2Tx_NL (v,"BlockTimeOut: ", b, 32, 32, "(ms)"); 63 | outBit_S2Tx_NL (v,"MinBlockTime: ", b, 64, 32, "(ms)"); 64 | n1 = outBit_Sx_NL (v,"taps_count: ", b, 96, 8); 65 | 66 | b += 13, 67 | len -= 13; 68 | 69 | 70 | indent (+1); 71 | while (n1-- > 0) { 72 | int n2; 73 | 74 | // BIOP_OBJECT_USE 75 | n2 = BIOP_TAP (v, "DSM", b); 76 | b += n2; 77 | len -= n2; 78 | 79 | } 80 | indent (-1); 81 | out_NL (v); 82 | 83 | 84 | n1 = outBit_Sx_NL (v,"userInfoLength: ", b, 0, 8); 85 | // print_databytes (v,"UserInfoData:", b, n1); 86 | 87 | dsmcc_CarouselDescriptor_Loop ("userInfo", b+1, n1); 88 | b += 1+n1; 89 | len -= 1+n1; 90 | 91 | 92 | indent (-1); 93 | 94 | return len_org; 95 | } 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | // BIOP::ModuleInfo:: 104 | // UserInfo 105 | // The userInfo field contains a loop of descriptors. These are speci .ed in the 106 | // DVB Data Broadcasting standard and/or this speci .cation.The MHP 107 | // terminal shall support the compressed_module_descriptor (tag 0x09)used 108 | // to signal that the module is transmitted in compressed form.The userInfo 109 | // .eld may also contain a caching_priority_descriptor and one or more label_ 110 | // descriptors. // DVB /This // spec. 111 | 112 | 113 | // atsc a47 114 | // The moduleInfoBytes field shall contain the BIOP::ModuleInfo 115 | // structure. The BIOP::ModuleInfo structure provides additional 116 | // delivery parameters and the Taps that are used to broadcast the 117 | // Modules in the network. The syntax and semantics of the 118 | // BIOP::ModuleInfo structure are shown below. 119 | 120 | -------------------------------------------------------------------------------- /src/datacarousel/ait.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: ait.c,v 1.7 2009/11/22 15:36:05 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | -- AIT Section 14 | -- MHP Application Information Section 15 | -- TS 102 812 16 | 17 | */ 18 | 19 | 20 | 21 | 22 | #include "dvbsnoop.h" 23 | #include "ait.h" 24 | #include "mhp_misc.h" 25 | 26 | #include "descriptors/descriptor.h" 27 | #include "strings/dvb_str.h" 28 | #include "strings/dsmcc_str.h" 29 | #include "misc/helper.h" 30 | #include "misc/output.h" 31 | 32 | 33 | 34 | 35 | 36 | void section_MHP_AIT (u_char *b, int len) 37 | { 38 | /* TS 102 812 */ 39 | 40 | int len2; 41 | u_int table_id; 42 | 43 | 44 | 45 | out_nl (3,"AIT-decoding...."); 46 | table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, 47 | (char *(*)(u_long))dvbstrTableID ); 48 | if (table_id != 0x74) { 49 | out_nl (3,"wrong Table ID"); 50 | return; 51 | } 52 | 53 | 54 | outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); 55 | outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); 56 | outBit_Sx_NL (6,"reserved_2: ", b,10, 2); 57 | outBit_Sx_NL (5,"section_length: ", b,12,12); 58 | outBit_Sx_NL (3,"test_application_flag: ", b,24, 1); 59 | outBit_S2x_NL(3,"application_type: ", b,25, 15, 60 | (char *(*)(u_long))dsmccStrMHP_application_type ); 61 | outBit_Sx_NL (6,"reserved_3: ", b,40, 2); 62 | outBit_Sx_NL (3,"Version_number: ", b,42, 5); 63 | outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, 64 | (char *(*)(u_long))dvbstrCurrentNextIndicator ); 65 | outBit_Sx_NL (3,"Section_number: ", b,48, 8); 66 | outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); 67 | 68 | 69 | outBit_Sx_NL (6,"reserved_4: ", b,64, 4); 70 | len2 = outBit_Sx_NL (3,"common_descriptors_length: ", b,68,12); 71 | b += 10; 72 | 73 | indent (+1); 74 | while (len2 > 0) { 75 | int x; 76 | 77 | x = descriptor (b, MHP_AIT); 78 | b += x; 79 | len2 -= x; 80 | } 81 | indent (-1); 82 | out_NL (4); 83 | 84 | 85 | outBit_Sx_NL (6,"reserved_5: ", b, 0, 4); 86 | len2 = outBit_Sx_NL (3,"application_loop_length: ", b, 4,12); 87 | b += 2; 88 | 89 | indent (+1); 90 | while (len2 > 0) { 91 | int x; 92 | int len3; 93 | 94 | 95 | x = mhp_application_identifier (3, b); 96 | b += x; 97 | len2 -= x; 98 | 99 | outBit_S2x_NL (3,"application_control_code: ", b, 0, 8, 100 | (char *(*)(u_long))dsmccStrMHP_application_control_code); 101 | outBit_Sx_NL (6,"reserved: ", b, 8, 4); 102 | len3 = outBit_Sx_NL (3,"application_descriptor_loop_length: ", b, 12,12); 103 | b += 3; 104 | len2 -= 3; 105 | 106 | while (len3 > 0) { 107 | int x; 108 | 109 | x = descriptor (b, MHP_AIT); 110 | b += x; 111 | len2 -= x; 112 | len3 -= x; 113 | } 114 | indent (-1); 115 | out_NL (4); 116 | 117 | 118 | } 119 | indent (-1); 120 | 121 | 122 | outBit_Sx_NL (5,"CRC: ", b,0,32); 123 | } 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /src/pes/pes_data_sync.c: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: pes_data_sync.c,v 1.5 2009/11/22 15:36:13 rhabarber1848 Exp $ 3 | 4 | 5 | DVBSNOOP 6 | 7 | a dvb sniffer and mpeg2 stream analyzer tool 8 | http://dvbsnoop.sourceforge.net/ 9 | 10 | (c) 2001-2007 Rainer.Scherg@gmx.de (rasc) 11 | 12 | 13 | 14 | -- PES Data: Synchronous and synchronized data streaming 15 | 16 | */ 17 | 18 | 19 | 20 | 21 | #include "dvbsnoop.h" 22 | #include "pes_data_sync.h" 23 | #include "strings/dvb_str.h" 24 | #include "misc/helper.h" 25 | #include "misc/hexprint.h" 26 | #include "misc/output.h" 27 | 28 | 29 | 30 | 31 | 32 | /* 33 | -- Data Packet Synchronous and synchronized data streaming 34 | -- EN 301 192 v1.3.1 S. 11 35 | */ 36 | 37 | void PES_decodeDATA_SYNC (u_char *b, int len) 38 | { 39 | 40 | typedef struct _PES_DATA { 41 | u_int data_identifier; 42 | u_int sub_stream_id; 43 | u_int PTS_extension_flag; 44 | u_int output_data_rate_flag; 45 | u_int reserved; 46 | u_int PES_data_packet_header_length; 47 | 48 | // N ... optional data 49 | 50 | } PES_DATA; 51 | 52 | PES_DATA p; 53 | int len2; 54 | 55 | 56 | out_nl (4,"Data (synchronous/synchronized):"); 57 | indent (+1); 58 | 59 | 60 | p.data_identifier = getBits (b, 0, 0, 8); 61 | p.sub_stream_id = getBits (b, 0, 8, 8); 62 | p.PTS_extension_flag = getBits (b, 0, 16, 1); 63 | p.output_data_rate_flag = getBits (b, 0, 17, 1); 64 | p.reserved = getBits (b, 0, 18, 2); 65 | p.PES_data_packet_header_length = getBits (b, 0, 20, 4); 66 | b += 3; 67 | len -= 3; 68 | len2 = p.PES_data_packet_header_length; 69 | 70 | 71 | out_S2B_NL (4,"data_identifier: ", p.data_identifier, 72 | dvbstrPESDataIdentifier (p.data_identifier) ); 73 | out_SB_NL (4,"sub_stream_id: ", p.sub_stream_id); 74 | out_SB_NL (4,"PTS_extension_flag: ", p.PTS_extension_flag); 75 | out_SB_NL (4,"output_data_rate_flag: ", p.output_data_rate_flag); 76 | out_SB_NL (6,"reserved_1: ", p.reserved); 77 | out_SB_NL (4,"PES_data_packet_header_length: ", p.PES_data_packet_header_length); 78 | 79 | if (p.PTS_extension_flag == 0x01) { 80 | out_nl (4,"PTS_extension:"); 81 | indent (+1); 82 | out_SB_NL (6,"reserved: ", getBits (b, 0, 0, 7) ); 83 | out_SW_NL (4,"PTS_extension: ", getBits (b, 0, 7, 9) ); 84 | /* $$$ TODO PCR extension output in clear text, see ISO 13818-1*/ 85 | b += 2; 86 | len -= 2; 87 | len2 -= 2; 88 | indent (-1); 89 | } 90 | 91 | if (p.output_data_rate_flag == 0x01) { 92 | out_nl (4,"output_data_rate:"); 93 | indent (+1); 94 | out_SB_NL (6,"reserved: ", getBits (b, 0, 0, 4) ); 95 | out_SL_NL (4,"output_data_rate: ", getBits (b, 0, 4, 28) ); 96 | b += 4; 97 | len -= 4; 98 | len2 -= 4; 99 | indent (-1); 100 | } 101 | 102 | 103 | print_databytes (4,"PES_data_private_byte:", b, len2); 104 | b += len2; 105 | len -= len2; 106 | 107 | print_databytes (4,"PES_data_byte:", b, len); 108 | b += len; 109 | len -= len; 110 | 111 | 112 | indent (-1); 113 | } 114 | 115 | 116 | 117 | 118 | 119 | 120 | --------------------------------------------------------------------------------