dvbsnoop-1.4.50/0000777000076400001440000000000010630324341007174 5dvbsnoop-1.4.50/README0000644000076400001440000002273610630324275010010 dvbsnoop - an open source DVB/MPEG stream analyzer ==================================================== http://dvbsnoop.sourceforge.net/ http://cvs.tuxbox.org/ dvbsnoop is a DVB/MPEG stream analyzer program. The program can be used to sniff, monitor, debug, dump or view DVB/MPEG/DSM-CC/MHP stream information (digital television or data broadcasts) sent via satellite, cable or terrestrial. The program was mainly written to learn and understand the DVB protocol structures and streams. dvbsnoop is currently part of the tuxbox project, bringing Linux based TV software to some set top boxes (digital satellite/cable receivers). Documentation and example outputs can be found at: http://dvbsnoop.sourceforge.net Disclaimer: =========== You are using this program at your own risk! This program may not be used to hack pay tv or encrypted dvb services in any way. License: ======== This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA Basic requirements: =================== - a DVB card (not needed for offline decoding of recorded files) - Linux DVB API version 1 or 3 installed (see www.linuxtv.org) or - a Linux based set top box (using DVB API version 1 or 3) (e.g. 'dbox2' or 'dreambox') Installation: ============= - install the DVB API driver from http://www.linuxtv.org (linux kernel 2.6.x and above are already providing the DVB API) - Prerequistes of other software: To compile dvbsnoop you may need: - autoconf >= 2.57a - automake >= 1.8 - libtool >= 1.4.2 - make >= 3.79 - tar - bunzip2 (bzip2) - gunzip (gzip) - gcc 2.95 or >= 3.0 - download the latest source from http://dvbsnoop.sourceforge.net (download a tarball or checkout from cvs) - unzip and untar the archive (if needed) gzip -d dvbsnoop-.tar.gz or bzip2 -d dvbsnoop-.tar.bz2 tar xvf dvbsnoop-.tar cd dvbsnoop- - configure the source ./autogen.sh # e.g. on "dbox2" cdk, use if needed ./configure or you may specify a path to DVB API include files ./configure CPPFLAGS=-I/path/to/dvb-kernel/linux/include - compile make make install - test dvbsnoop -help - PROBLEMS compiling dvbsnoop? dvbsnoop should compile smoothly on any ANSI-C-Compiler. But it was tested on GCC (gcc-3.x) only. If you see any problems during 'autoconf.sh' or 'configure' execution, please check if you have the latest versions of 'autoconf' and 'configure' installed. In cases, please update your system (check packages automake, autoconf and libtool). Please see also mini FAQ at the end of this file. - Special Platforms Cygwin: dvbsnoop may be used on Microsoft Windows Platforms using cygwin (http://www.cygwin.com). Due to a missing dvb hardware layer you may use dvbsnoop in offline mode only. To compile dvbsnoop for cygwin, please read annex "cygwin". Posting dvbsnoop output: ======================== If you are posting dvbsnoop output to mailing lists, newsgroups, public boards or whatever, please always include the dvbsnoop header: e.g.: " dvbsnoop V1.2.49 -- http://dvbsnoop.sourceforge.net/" The version information is helpful if there are discussions about the decoding output. Using source code snippets or dvbsnoop knowledge for your own purpose: ====================================================================== Feel free to use dvbsnoop source for your own programs as knowledge or code base. In any cases, please include a link or reference to dvbsnoop in your program or documentation... Thanks. Bugs, requests: =============== Well, if you find some bugs, please let me know. (check first, if the data stream is not broken). Reoport bugs to: http://sourceforge.net/tracker/?group_id=85040 Please do not send binary data stream files or large decoding output via email! (If needed, I will ask for it!) But it is a good advise to save the data stream using the option "dvbsnoop -s ... -b ... > file" on your harddrive. It might be helpful for further investigations. To prevent spam-filtering please preceed your mail subject with "dvbsnoop: " (e.g. mail topic: "dvbsnoop: bugreport xyz") Keywords: ========= DVB stream analyzer mpeg stream analyzer, TS stream analyzer, MPEG, MPG, descriptor, digital television, satellite TV, cable TV, DVB-C, DVB-S, DVB-T, MHP, DSM-CC, SI, PES, TOT, PAT, PMT, SDT, EIT, NIT, TDST, RST, SIT, DIT, BAT, EMM, ECM, PSI, SI tables, SSU, INT, UNT, datagram, sections, transport stream analyzer, packetized elementary stream, demux, ISO/IEC 13818-1, ISO/IEC 13818-6, ETSI EN 300468, ETSI EN 301162, ETSI TS 102006, ETSI EN 301192, ETSI TR 101202, ITU H.222.0, data carousel, object carousel, dvb snoop, TV ANYTIME (c) 2001-2007 Rainer Scherg (Rainer.Scherg@gmx.de) http://dvbsnoop.sourceforge.net Annex ===== Install on Cygwin ================= dvbsnoop <= version 1.4.0: ========================== To make dvbsnoop run on cygwin platforms, you have to: 1.) copy dvb-api include files to your cygwin installation. 2.) tweak some cygwin header files. Tnx to Kamal for this description: -----Original Message----- From: Kamalanand [mailto:kamal_dasu@xxxxxxxxxx] Subject: RE: dvbsnoop as analyzer on Windows - worked Rainer, I had to apply a few fixes in my environment to make dvbsnoop build with cygwin. This might be very specific to my environment, however wanted to share this with you if others face a similar problem. I am using the following cygwin version downloaded using setup.exe on http://wwww.cygwin.com : CYGWIN_NT-5.1 my-pc 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin I have the following installed in the cygwin environment 1) Dvbsnoop http://dvbsnoop.sourceforge.net/ under ~/dvbsnoop-1.4.00/ 2) Downloaded the linux kernel 2.6.12 sources from http://www.kernel.org/ , extracted to /linux-2.6 These are the things I did to have a successful build, 1) Copied the dvb includes from the /linux-2.6/include/linux/dvb under /usr/include/linux/dvb (Actaully I made a symbolic link but its upto you.) 2) The cygwin installation had the __u64 type missing in the /usr/include/asm/types.h , So added that to /usr/include/asm/types.h. This is needed by the struct dmx_stc in /usr/include/lnux/dvb/dmx.h .. typedef __signed__ int __s64; typedef unsigned int __u64; .. 3) Then noticed the dmx_pes.c includes file_io.h which includes the sys/ioctl.h. I figured that the IOCTL macros are needed to compile ~/dvbsnoop-1.4.0.0/src/dvb_api/dmx_pes.c file. The IOCTL macros are used in the /usr/include/linux/dvb/dmx.h which get called in the dmx_pes.c. Now cygwin /usr/include/sys/ioctl.h does not have the macros in it and /usr/include/asm/ioctl.h is missing in the cygwin environment for some reason. Anyway I copied the /include/linux/asm-i386/ioctl.h from linux kernel sources to the /usr/include/asm/ioctl.h . Then added the following to the /usr/include/sys/ioctl.h #include 4) However the ~/dvbsnoop-1.4.0.0/src/misc/packet_mem.c refused to compile due to various type incopatabilities with strings.h and stdlib.h under cygwin. Basically it needed the definitions for u_char and u_long. So I tried the following to fix the problem : /* #include */ /* #include */ #include Maybe there is a better way to do this, for now this seemed to work for me 5) Ran the following ~/dvbsnoop-1.4.0.0/configure script ~/dvbsnoop-1.4.0.0/make clean ~/dvbsnoop-1.4.0.0/make ~/dvbsnoop-1.4.0.0/make install Now I am able to do offline analysis and decode the MPEG streams. Thanks & Regards Kamal dvbsnoop > version 1.4.0: ========================== To make dvbsnoop run on cygwin platforms, you have to: 1.) copy dvb-api include files to your cygwin installation. 2.) maybe: you have tweak some cygwin header files. 3.) see src/dvb_api/dvb_api.h: uncomment the IOCTL, etc. #defines (please read remark in header file) 4.) Next: go on with standard procedure...: ./configure make etc. if you encounter some problems, try "make distclean" prior to autogen.sh Problems compiling dvbsnoop? ============================ Mini-FAQ from the tuxbox project (linux@dbox2): Q: Why is there no configure script? A: "autoconf" creates configure from "configure.ac". You can call "./autogen.sh", which will call "autoconf" for you. Q: Why is there no "Makefile", neither in the root directory nor in any subdirectory? A: "configure" creates "Makefile" from "Makefile.in". "./configure --help" usually shows the available options. Q: Why is there no "Makefile.in"? A: "automake" creates "Makefile.in" from "Makefile.am". You can call "./autogen.sh", which will call "automake" for you. If you call "automake" manually, then make sure your working directory contains "configure.ac". dvbsnoop-1.4.50/configure.ac0000644000076400001440000000144410630301672011403 AC_INIT([dvbsnoop],[1.4.50],[rasc@users.sourceforge.net]) AM_INIT_AUTOMAKE([dist-bzip2 no-define]) AC_PROG_CC AC_PROG_RANLIB AC_CHECK_HEADER([linux/dvb/dmx.h]) AC_CHECK_HEADER([ost/dmx.h]) if test "$ac_cv_header_ost_dmx_h" = yes; then AC_DEFINE([HAVE_OST_DMX_H]) elif test "$ac_cv_header_linux_dvb_dmx_h" = yes; then AC_DEFINE([HAVE_LINUX_DVB_DMX_H]) else AC_MSG_ERROR([linux dvb api headers are required to build dvbsnoop]) fi AC_OUTPUT([ Makefile src/Makefile src/datacarousel/Makefile src/descriptors/Makefile src/dvb_api/Makefile src/ebu/Makefile src/misc/Makefile src/pes/Makefile src/sections/Makefile src/strings/Makefile src/testdata/Makefile src/ts/Makefile src/tvanytime/Makefile src/private/Makefile src/private/default/Makefile src/private/premiere.de/Makefile src/net_ip/Makefile ]) dvbsnoop-1.4.50/aclocal.m40000644000076400001440000010237610630302126010756 # generated automatically by aclocal 1.8.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.8.3])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) dvbsnoop-1.4.50/Makefile.am0000744000076400001440000000004707533206640011157 AUTOMAKE_OPTIONS = gnu SUBDIRS = src dvbsnoop-1.4.50/Makefile.in0000644000076400001440000004140510630302134011155 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = gnu SUBDIRS = src all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/configure0000755000076400001440000044304210630302154011024 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for dvbsnoop 1.4.50. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='dvbsnoop' PACKAGE_TARNAME='dvbsnoop' PACKAGE_VERSION='1.4.50' PACKAGE_STRING='dvbsnoop 1.4.50' PACKAGE_BUGREPORT='rasc@users.sourceforge.net' # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB CPP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dvbsnoop 1.4.50 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dvbsnoop 1.4.50:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF dvbsnoop configure 1.4.50 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dvbsnoop $as_me 1.4.50, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.8" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dvbsnoop' VERSION='1.4.50' # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_linux_dvb_dmx_h+set}" = set; then echo "$as_me:$LINENO: checking for linux/dvb/dmx.h" >&5 echo $ECHO_N "checking for linux/dvb/dmx.h... $ECHO_C" >&6 if test "${ac_cv_header_linux_dvb_dmx_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_linux_dvb_dmx_h" >&5 echo "${ECHO_T}$ac_cv_header_linux_dvb_dmx_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking linux/dvb/dmx.h usability" >&5 echo $ECHO_N "checking linux/dvb/dmx.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking linux/dvb/dmx.h presence" >&5 echo $ECHO_N "checking linux/dvb/dmx.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: linux/dvb/dmx.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: linux/dvb/dmx.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to rasc@users.sourceforge.net ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for linux/dvb/dmx.h" >&5 echo $ECHO_N "checking for linux/dvb/dmx.h... $ECHO_C" >&6 if test "${ac_cv_header_linux_dvb_dmx_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_linux_dvb_dmx_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_linux_dvb_dmx_h" >&5 echo "${ECHO_T}$ac_cv_header_linux_dvb_dmx_h" >&6 fi if test "${ac_cv_header_ost_dmx_h+set}" = set; then echo "$as_me:$LINENO: checking for ost/dmx.h" >&5 echo $ECHO_N "checking for ost/dmx.h... $ECHO_C" >&6 if test "${ac_cv_header_ost_dmx_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_ost_dmx_h" >&5 echo "${ECHO_T}$ac_cv_header_ost_dmx_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking ost/dmx.h usability" >&5 echo $ECHO_N "checking ost/dmx.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking ost/dmx.h presence" >&5 echo $ECHO_N "checking ost/dmx.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: ost/dmx.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: ost/dmx.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: ost/dmx.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: ost/dmx.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: ost/dmx.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: ost/dmx.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: ost/dmx.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: ost/dmx.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: ost/dmx.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: ost/dmx.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: ost/dmx.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: ost/dmx.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: ost/dmx.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: ost/dmx.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: ost/dmx.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: ost/dmx.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to rasc@users.sourceforge.net ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for ost/dmx.h" >&5 echo $ECHO_N "checking for ost/dmx.h... $ECHO_C" >&6 if test "${ac_cv_header_ost_dmx_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_ost_dmx_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_ost_dmx_h" >&5 echo "${ECHO_T}$ac_cv_header_ost_dmx_h" >&6 fi if test "$ac_cv_header_ost_dmx_h" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OST_DMX_H 1 _ACEOF elif test "$ac_cv_header_linux_dvb_dmx_h" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LINUX_DVB_DMX_H 1 _ACEOF else { { echo "$as_me:$LINENO: error: linux dvb api headers are required to build dvbsnoop" >&5 echo "$as_me: error: linux dvb api headers are required to build dvbsnoop" >&2;} { (exit 1); exit 1; }; } fi ac_config_files="$ac_config_files Makefile src/Makefile src/datacarousel/Makefile src/descriptors/Makefile src/dvb_api/Makefile src/ebu/Makefile src/misc/Makefile src/pes/Makefile src/sections/Makefile src/strings/Makefile src/testdata/Makefile src/ts/Makefile src/tvanytime/Makefile src/private/Makefile src/private/default/Makefile src/private/premiere.de/Makefile src/net_ip/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by dvbsnoop $as_me 1.4.50, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ dvbsnoop config.status 1.4.50 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/datacarousel/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/datacarousel/Makefile" ;; "src/descriptors/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/descriptors/Makefile" ;; "src/dvb_api/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/dvb_api/Makefile" ;; "src/ebu/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/ebu/Makefile" ;; "src/misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/misc/Makefile" ;; "src/pes/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/pes/Makefile" ;; "src/sections/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/sections/Makefile" ;; "src/strings/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/strings/Makefile" ;; "src/testdata/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/testdata/Makefile" ;; "src/ts/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/ts/Makefile" ;; "src/tvanytime/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tvanytime/Makefile" ;; "src/private/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/private/Makefile" ;; "src/private/default/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/private/default/Makefile" ;; "src/private/premiere.de/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/private/premiere.de/Makefile" ;; "src/net_ip/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/net_ip/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi dvbsnoop-1.4.50/AUTHORS0000744000076400001440000000077410354653070010200 Authors: Rainer Scherg (rasc) Andreas Oberritter (obi) Change, bugfixes and adaptions also by members of the tuxbox (linux@dbox2) development team (for more info please read the modification history in the files). Tnx for all the help to the team. Special thanks to all helping to improve dvbsnoop by sending code snippsets, ideas, bug reports, etc. Please see changelog for more information. (c) 2001-2006 Rainer Scherg (rasc) dvbsnoop-1.4.50/COPYING0000744000076400001440000004311007705373276010167 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. dvbsnoop-1.4.50/ChangeLog0000644000076400001440000001302210630324275010666 release 1.4.50 - Fix: PSM bugfix - (tnx to "jack" for reporting) - New: IP datagramm decoding (RFC791, RFC2460) (Stéphane Esté-Gracias) - Fix: Special handling for TS null packets - Fix: Premiere.de private descriptor name fix - Fix: DSM-CC Stuff, BIOP::Messages not yet decodeable - New: DSM-CC BIOPs (File-, Dir-, StreamMessage) and DSM-Taps - New: Mega-Frame Initialization Packet (MIP, TS 101 191) (tnx to Cedric Delfosse) - Changed: News TS handling, DVB strings enhanced, code changes. - Fix: fix GCC warnings, man page changes - New: PS MPEG-2 Extension data packets, MPEG-2 decoding - New: Updates, new descriptors due to EN 300 468 v1.7.1 - New: Updates, new descriptors due to EN 300 468 v1.7.1 - New: PS MPEG-2 sequence header - New: H.222.1 AMD 4+5 + Corr. stuff - New: PS MPEG-2 UserData + GOP, DVB-S2 fix - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign - New: started ISO 13818-2 StreamIDs (PS/PES) - New: decode multiple PS/PES packets within TS packets (-tssubdecode) - New: decode multiple SI packets within TS packets (-tssubdecode) - Bugfix: tssubdecode check for PUSI and SI pointer offset (tnx to Souloumiac Olivier) - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync - Bugfix: make dvbsnoop compile on Cygwin/Windows - New: TS continuity sequence check - New: catch signals, (kill -1, kill -6, kill -15) - Changed: TS cleanup, PCR/DTS time printout - New: frontend info: ATSC included (extension to dvb api 3) - Changed: -s pidscan improved release 1.4.0 - New: option -adapter and -devnr as device shortcuts (idea: Steve Malenfant) - New: option '-s ps' - New: Program Stream (PS) pack_header, system_header, ... - Changed: Soft filters for TS and Section rewritten - New: Option -N (decode n packets) - New: Soft CRC for sections (-softcrc / -nosoftcrc) - New: TV-Anytime (TS 102 323) Content Section - Changed: Multibyte section filtering redesign e.g. -f 0x4e.2f.1c.3f.50 -m 0xFF.FF.FF (basic code idea by Stéphane Esté-Gracias) - New: Man page (first version) - Changed: Minor changes... - New: Multibyte section filtering e.g. -f 0x4e2f1c -m 0xFFFFFF (ghostrider, tuxbox-team) - Bugfix: dvr device open set to read only - Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) - New: bad ts packet counter on -s bandwidth (tnx to W.J. Beksi, setabox for basic patch) - New: large file support (>2 GB), applies to -if option (tnx to K. Zheng, Philips) - New: full/raw transport stream read (option -tsraw) - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: option -privateprovider - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections - Changed: section decoding functions renamed due to preparation of private structures - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - New: new cmdline option -buffersize x (in Kbytes) to tweak DMX Buffer - Update: changes due to EN 300 468 v1.6.1 - Bugfix: multilingual component descriptor (tnx to Karsten Siebert, dpi AG) - Update: EN 300 468 v1.6.1 Terrestrial delivery system descriptor - Change: FE adaptions (due to change defines on API) - Bugfix: multilang service descriptor fix (tnx to Karsten Siebert, dpi AG) - New: MetaData Section (Basic) (H.222.0 AMD1) - New: MPEG Metadata STD descriptor (H.222.0 AMD1) - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 - Bugfix: cell list descriptors (tnx to Karsten Siebert, dpi AG) - Bugfix: cable descriptors frequency (tnx to Karsten Siebert, dpi AG) - New: TV-Anytime (TS 102 323) RNT descriptors - Bugfix: UNT/INT table mixup, misc. descriptor stuff (tnx to Karsten Siebert, dpi AG) - Update: misc. tables - New: resolution_authority/provider_notification_section (RNT) (TS 102 323) - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4.1 - Bugfixes - Bugfixes - Bugfix: AIT transport protocol label fix (tnx to Stéphane Esté-Gracias) - New: TS filter single pids from multi-pid ts-input-file (e.g.: -if file 0x10) - Changed: PMT: some brainded section check - NEW: TS subdecoding (ts2PES, ts2SEC) [-tssubdecode] release: 1.3.0 - Changed: Cmd options -TIMEOUT and -HCP to -timeout and -hideproginfo - NEW: spider PIDs (currently sections only) - NEW: FrontEnd current parameter - NEW: FrontEnd info - New: WSS detail decoding (EBU data) - New: VPS detail decoding (EBU data) - New: DSM-CC: more info on DII and DSI protocol - Bugfixes... - New: DSM-CC: DSI, DII, DDB, ... - New: AIT descriptors - New: MHP AIT section - Changed: Option -nph behavior changed - New: EBU teletext, VPS, WSS - Bugfix: PTS decode - Changed: Output data (get rid of \r) - New: Pidscan packet content hint - BugFix: PES private_stream_1 - Changed: -sync now default option (was: -nosync) - New: SECTION timeout - New: PES pack_header - New: DSM-CC stream descriptors - New: PES stream directory - Restructured: PES decoding - New: show packet content hint on TS sniffing - BugFix: getbits overflow (in some cases) - ... dvbsnoop-1.4.50/INSTALL0000644000076400001440000002203010034373274010145 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. dvbsnoop-1.4.50/NEWS0000744000076400001440000000000007533211136007603 dvbsnoop-1.4.50/depcomp0000755000076400001440000003477110034373274010510 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2003-11-08.23 # Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: dvbsnoop-1.4.50/install-sh0000755000076400001440000002177010034373274011132 #!/bin/sh # install - install a program, script, or datafile scriptversion=2004-02-15.20 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 -d DIRECTORIES... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. test -n "$dir_arg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" || lasterr=$? # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now remove or move aside any old file at destination location. We # try this two ways since rm can't unlink itself on some systems and # the destination file might be busy for other reasons. In this case, # the final cleanup might fail but the new file should still install # successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: dvbsnoop-1.4.50/missing0000755000076400001440000002466610034373274010534 #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: dvbsnoop-1.4.50/src/0000777000076400001440000000000010630324347007771 5dvbsnoop-1.4.50/src/dvbsnoop.h0000744000076400001440000000654410310315056011712 /* $Id: dvbsnoop.h,v 1.24 2005/09/09 14:20:29 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2005 Rainer.Scherg@gmx.de $Log: dvbsnoop.h,v $ Revision 1.24 2005/09/09 14:20:29 rasc TS continuity sequence check (cc verbose output) Revision 1.23 2005/01/17 19:41:21 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.22 2004/11/16 23:02:50 rasc cmd option "-tsraw" for full/raw TS read (if supported by hard-/firmware) Revision 1.21 2004/11/16 09:12:41 obi increased MAX_PID from 0x1fff to 0x2000 (which means "full transport stream" in linux dvb api terms) Revision 1.20 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.19 2004/03/31 21:14:22 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.18 2004/01/01 20:09:15 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.17 2003/12/15 20:09:48 rasc no message Revision 1.16 2003/12/03 20:06:33 obi - reduced auto* to minimal required checks, obsoletes acinclude.m4 - added version number to configure.ac, removed it from version.h (needed for "make dist" anyway) - removed autoheader dependency Revision 1.15 2003/11/26 19:55:31 rasc no message Revision 1.14 2003/11/07 16:33:31 rasc no message Revision 1.13 2003/11/01 17:05:46 rasc no message Revision 1.12 2003/10/24 22:17:13 rasc code reorg... Revision 1.11 2003/10/17 19:14:40 rasc no message Revision 1.10 2003/10/16 19:02:29 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.9 2003/10/13 23:35:35 rasc Bugfix, verbose < 4 segfaulted, tnx to 'mws' for reporting. Revision 1.8 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? Revision 1.7 2003/07/06 05:28:52 obi compatibility stuff.. now there is only one version for old and new drivers which selects the api at configure time Revision 1.6 2003/06/24 23:51:03 rasc bugfixes and enhancements Revision 1.5 2002/11/01 20:38:40 Jolt Changes for the new API Revision 1.4 2002/09/13 23:57:04 obi define NEWSTRUCT to work with current linuxtv cvs Revision 1.3 2002/08/27 19:00:45 obi use devfs device names Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #ifndef __DVBSNOOP_H #define __DVBSNOOP_H #include #include #include #include #include #include "version.h" #include "misc/helper.h" #include "misc/output.h" // // -- some DVB definitions // #define MAX_PID 0x1FFF #define PID_FULL_TS 0x2000 /* special PID for reading full/raw TS */ /* THIS is defined by Linux DVB-API !! */ #define DUMMY_PID 0xFFFF /* special if no pid is needed */ #define INVALID_PID 0xFEFE /* a invalid PID*/ // // -- BSD style type shortcuts... // -- may be already defined by system (typedef in linux/types.h) // -- so we overwrite this via #define to avoid compiler warnings // #define u_char unsigned char #define u_int unsigned int #define u_long unsigned long #endif dvbsnoop-1.4.50/src/version.h0000644000076400001440000000101710630301672011536 /* $Id: version.h,v 1.20 2007/06/02 12:26:09 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2007 Rainer.Scherg@gmx.de */ #ifndef __VERSION_H #define __VERSION_H /* * Version set in configure.ac */ #define DVBSNOOP_VERSION PACKAGE_VERSION #define DVBSNOOP_PROG_VERSION "dvbsnoop V"PACKAGE_VERSION #define DVBSNOOP_URL "http://dvbsnoop.sourceforge.net/" #define DVBSNOOP_COPYRIGHT "(c) 2001-2007 Rainer Scherg (rasc)" #endif dvbsnoop-1.4.50/src/Makefile.am0000744000076400001440000000202710477053236011750 bin_PROGRAMS = dvbsnoop INCLUDES = \ -I$(top_srcdir) EXTRA_DIST = \ $(man_MANS) SUBDIRS = \ dvb_api \ pes \ ts \ datacarousel \ tvanytime \ testdata \ descriptors \ sections \ private \ ebu \ net_ip \ strings \ misc noinst_HEADERS = \ dvbsnoop.h \ version.h dvbsnoop_SOURCES = \ dvbsnoop.c dvbsnoop_LDADD = \ $(top_builddir)/src/dvb_api/libdvbapi.a \ $(top_builddir)/src/pes/libpes.a \ $(top_builddir)/src/sections/libsections.a \ $(top_builddir)/src/ts/libts.a \ $(top_builddir)/src/datacarousel/libdatacarousel.a \ $(top_builddir)/src/tvanytime/libtvanytime.a \ $(top_builddir)/src/testdata/libtestdata.a \ $(top_builddir)/src/descriptors/libdescriptors.a \ $(top_builddir)/src/private/libprivate.a \ $(top_builddir)/src/private/default/libprivatedefault.a \ $(top_builddir)/src/private/premiere.de/libprivatePremiereDE.a \ $(top_builddir)/src/ebu/libebu.a \ $(top_builddir)/src/net_ip/libnetip.a \ $(top_builddir)/src/strings/libstrings.a \ $(top_builddir)/src/misc/libmisc.a man_MANS = dvbsnoop.1 dvbsnoop-1.4.50/src/Makefile.in0000644000076400001440000004551710630302135011755 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(dvbsnoop_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = dvbsnoop$(EXEEXT) subdir = src DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_dvbsnoop_OBJECTS = dvbsnoop.$(OBJEXT) dvbsnoop_OBJECTS = $(am_dvbsnoop_OBJECTS) dvbsnoop_DEPENDENCIES = $(top_builddir)/src/dvb_api/libdvbapi.a \ $(top_builddir)/src/pes/libpes.a \ $(top_builddir)/src/sections/libsections.a \ $(top_builddir)/src/ts/libts.a \ $(top_builddir)/src/datacarousel/libdatacarousel.a \ $(top_builddir)/src/tvanytime/libtvanytime.a \ $(top_builddir)/src/testdata/libtestdata.a \ $(top_builddir)/src/descriptors/libdescriptors.a \ $(top_builddir)/src/private/libprivate.a \ $(top_builddir)/src/private/default/libprivatedefault.a \ $(top_builddir)/src/private/premiere.de/libprivatePremiereDE.a \ $(top_builddir)/src/ebu/libebu.a \ $(top_builddir)/src/net_ip/libnetip.a \ $(top_builddir)/src/strings/libstrings.a \ $(top_builddir)/src/misc/libmisc.a DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dvbsnoop.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(dvbsnoop_SOURCES) DIST_SOURCES = $(dvbsnoop_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = \ -I$(top_srcdir) EXTRA_DIST = \ $(man_MANS) SUBDIRS = \ dvb_api \ pes \ ts \ datacarousel \ tvanytime \ testdata \ descriptors \ sections \ private \ ebu \ net_ip \ strings \ misc noinst_HEADERS = \ dvbsnoop.h \ version.h dvbsnoop_SOURCES = \ dvbsnoop.c dvbsnoop_LDADD = \ $(top_builddir)/src/dvb_api/libdvbapi.a \ $(top_builddir)/src/pes/libpes.a \ $(top_builddir)/src/sections/libsections.a \ $(top_builddir)/src/ts/libts.a \ $(top_builddir)/src/datacarousel/libdatacarousel.a \ $(top_builddir)/src/tvanytime/libtvanytime.a \ $(top_builddir)/src/testdata/libtestdata.a \ $(top_builddir)/src/descriptors/libdescriptors.a \ $(top_builddir)/src/private/libprivate.a \ $(top_builddir)/src/private/default/libprivatedefault.a \ $(top_builddir)/src/private/premiere.de/libprivatePremiereDE.a \ $(top_builddir)/src/ebu/libebu.a \ $(top_builddir)/src/net_ip/libnetip.a \ $(top_builddir)/src/strings/libstrings.a \ $(top_builddir)/src/misc/libmisc.a man_MANS = dvbsnoop.1 all: all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dvbsnoop$(EXEEXT): $(dvbsnoop_OBJECTS) $(dvbsnoop_DEPENDENCIES) @rm -f dvbsnoop$(EXEEXT) $(LINK) $(dvbsnoop_LDFLAGS) $(dvbsnoop_OBJECTS) $(dvbsnoop_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dvbsnoop.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-man install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-binPROGRAMS clean-generic clean-recursive ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-man1 \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am uninstall-man \ uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/dvbsnoop.c0000744000076400001440000001220510307421256011702 /* $Id: dvbsnoop.c,v 1.32 2005/09/06 23:13:50 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2005 Rainer.Scherg@gmx.de $Log: dvbsnoop.c,v $ Revision 1.32 2005/09/06 23:13:50 rasc catch OS signals (kill ...) for smooth program termination Revision 1.31 2005/08/13 00:06:56 rasc no message Revision 1.30 2005/08/10 21:28:17 rasc New: Program Stream handling (-s ps) Revision 1.29 2005/07/11 23:06:47 rasc Multibyte section filter redesign: -f 0x4F.22.33.44.55.66 -m 0x.FF.FF.FF etc. Manpage update Revision 1.28 2005/01/17 19:41:21 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.27 2004/04/03 12:05:22 rasc release 1.3.0 Revision 1.26 2004/03/31 21:14:22 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.25 2004/03/21 00:37:46 rasc Query FrontEnd Info (option: -s feinfo) Revision 1.24 2004/01/06 03:13:24 rasc TS prints PES/Section ID on payload_start Revision 1.23 2004/01/03 16:40:11 rasc no message Revision 1.22 2004/01/03 15:40:45 rasc simple frontend signal status query added "-s signal" Revision 1.21 2004/01/02 02:18:33 rasc more DSM-CC INT/UNT descriptors Revision 1.20 2004/01/01 20:09:15 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.19 2003/12/28 14:00:25 rasc bugfix: section read from input file some changes on packet header output Revision 1.18 2003/12/15 20:09:48 rasc no message Revision 1.17 2003/12/14 23:38:46 rasc - bandwidth reporting for a PID Revision 1.16 2003/12/10 20:07:14 rasc minor stuff Revision 1.15 2003/12/07 23:36:12 rasc pidscan on transponder - experimental(!) Revision 1.14 2003/12/03 20:06:33 obi - reduced auto* to minimal required checks, obsoletes acinclude.m4 - added version number to configure.ac, removed it from version.h (needed for "make dist" anyway) - removed autoheader dependency Revision 1.13 2003/11/07 16:33:31 rasc no message Revision 1.12 2003/11/01 21:40:26 rasc some broadcast/linkage descriptor stuff Revision 1.11 2003/11/01 17:05:46 rasc no message Revision 1.10 2003/10/24 23:01:40 rasc code reorg... Revision 1.8 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.7 2003/07/06 05:28:52 obi compatibility stuff.. now there is only one version for old and new drivers which selects the api at configure time Revision 1.5 2003/02/26 16:45:16 obi - make dvbsnoop work on little endian machines again - fixed mask in getBits for bitlen >= 32 Revision 1.4 2003/02/09 22:59:33 rasc -- endian check (bug fix) Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/02 21:52:44 rasc - init der time_delta - PES erweitert, PES arbeitet im read() noch nicht richtig!! - muss tmbinc fragem, ob ich Mist baue, oder der Treiber (??) Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "misc/cmdline.h" #include "misc/hexprint.h" #include "misc/pkt_time.h" #include "misc/pid_mem.h" #include "misc/sig_abort.h" #include "dvb_api/dmx_sect.h" #include "dvb_api/dmx_pes.h" #include "dvb_api/dmx_ts.h" #include "dvb_api/dmx_tspidscan.h" #include "dvb_api/dmx_tspidbandwidth.h" #include "dvb_api/fe_signal.h" #include "dvb_api/fe_info.h" int main(int argc, char **argv) { OPTION opt; int err = 0; /* -- init options and cmdline parsing */ init_PidMemory (); if (! cmdline_options (argc,argv, &opt) ) return (-1); setVerboseLevel (opt.printdecode); setHexPrintMode (opt.printhex); indent (0); if (! opt.binary_out) { if (! opt.hide_copyright) { out_nl (1, "%s -- %s ", DVBSNOOP_PROG_VERSION, DVBSNOOP_URL); } if (! opt.inpPidFile) { if (opt.pid != DUMMY_PID) { out_nl (9, " PID : %d (0x%04x)",opt.pid,opt.pid); } if ((opt.packet_mode == SECT) && (opt.filterLen > 0)) { // filter are only for sections int i; out (9, " Filter: 0x"); for (i=0; i < opt.filterLen; i++) { out (9,"%02x ",opt.filter[i]); } out_NL (9); out (9, " Mask : 0x"); for (i=0; i < opt.filterLen; i++) { out (9,"%02x ",opt.mask[i]); } out_NL (9); out_nl (9, " Max. Filtersize: %d",DMX_FILTER_SIZE); } out_nl (9, " DEMUX : %s",opt.devDemux); out_nl (9, " DVR : %s",opt.devDvr); out_nl (9, " FRONTEND: %s",opt.devFE); } } initOSSigHandler (); init_receive_time (); switch (opt.packet_mode) { case SECT: err = doReadSECT (&opt); break; case PS: case PES: err = doReadPES (&opt); break; case TS: err = doReadTS (&opt); break; case PIDSCAN: err = ts_pidscan (&opt); break; case PIDBANDWIDTH: err = ts_pidbandwidth (&opt); break; case SCAN_FE_SIGNAL: err = do_SignalStrength (&opt); break; case SCAN_FE_INFO: err = do_FE_Info (&opt); break; default: fprintf (stderr,"unknown snoop type (this should never happen).\n"); break; } if ( isSigAbort() ) { out_nl (1,"... aborted (Signal: %d)",isSigAbort()); } restoreOSSigHandler(); return err; } dvbsnoop-1.4.50/src/dvbsnoop.10000744000076400001440000003661710374713133011637 .TH "dvbsnoop" "1" "" "Rainer Scherg (rasc)" "DVB Analyzer, MPEG Analyzer" .SH "Name" .br dvbsnoop \- DVB and MPEG stream analyzer .SH "SYNOPSIS" .B dvbsnoop [\-s mode] [options] pid .B dvbsnoop [\-s mode] [options] \-if filename [pid] .B dvbsnoop [\-s mode] [options] \-b [pid] > binary.file .B dvbsnoop [\-s mode] [options] .SH "Description" .br DVBSNOOP is a text based DVB and MPEG stream analyzer for viewing/debugging stream information, e.g. send via digital TV. You may also use dvbsnoop to analyze mpeg compliant streams stored on DVD or other media. Dvbsnoop analyzes and displays MPEG, DVB, DSM\-CC, MHP, etc. data and structures in human readable form. Possible stream types are TS (tranport streams), PS (program streams), PES (packetized elementary streams) or SECTIONS (service information streams). DVBSNOOP also has some additional functionallity to analyze receiver (set top box, dvb card) data, bandwidth of a transport stream, pid scan, etc. Using special network programs like netcat (nc), dvbsnoop may also be used to do remote sniffing and decoding. For post-processing dvbsnoop output, you may use the full range of unix tools and scripting languages (grep, perl, python, mrtg, gnuplot, etc.). .SH "Usage " .br Dvbsnoop provides an online and offline input and different snoop/decoding modes (see below). Using dvbsnoop 'online' requires dvb\-api compliant devices (http://www.linuxtv.org) to grab live stream information from e.g. satellite or cable tv or data streams. You will also need DVB compliant hardware (e.g. DVB\-S pci card or a linux based setop box like dbox2 or Dreambox) to receive DVB data streams. To tune into a transponder or frequency, please use a program like 'szap', 'dvbtune' or a DVB-GUI like 'Enigma', 'Neutrino', 'MythTV', 'VDR', etc.. The 'offline' mode enables you to analyze binary stream files (e.g. transport stream files or PES files). Some options are specific for the selected modes. You may try different combinations of command line options to get best results. A short FAQ for common questions and example decoding output can be found at .I http://dvbsnoop.sourceforge.net. .br .SH "Basic Decoding Selection Mode Command Line Options" .br .TP .B \-s [ts|ps|pes|sec|pidscan|bandwidth|signal|feinfo] .br Basic snoop mode selection. sec \= SI mode (SECTIONS) ts \= transport stream mode ps \= program stream mode (same as PES mode) pes \= packetized elementary stream mode, e.g. teletext, audio, video, data pidscan \= scan and display PIDs on tuned transponder/frequency. bandwith \= bandwidth messurement mode for selected pid. signal \= display tuner signal reception info. feinfo \= display tuner data (frontend info). The modes 'sec', "ps" or "pes" require the selection of a PID. The mode 'ts' requires either a PID specified or the option \-tsraw. A PID can be specified using octal, decimal or hexadecimal values. Examples: octal: 021, decimal: 17, hexadecimal: 0x11 If \-s option is omitted, default mode is "\-s sec" (Section mode). .SH "General Command Line Options" .br .TP .B \-help .br Print help text with command line options. .TP .B \-hideproginfo Do not print dvbsnoop header (version, etc.). .SH "General Decoding Output Command Line Options" .br .TP .B \-pd \ .br Specify print decoding verbose mode. Specify 0 for no output. 9 will be very verbose. Default is 6. .TP .B \-npd .br Same as \-pd 0. .TP .B \-ph \ .br Specify print hex putput verbose mode: 0\=no hexdump output, 1\=hex output, 2\=hex line, 3\=ascii line, 4\=alternate hex output. (default is 4) .TP .B \-hexdumpbuffer .TP .B \-nohexdumpbuffer .br Switch on/off hexdump of stream input buffer. May be used to enhance \-ph option. (e.g. \-ph 4 \-nohexdumpbuffer) .TP .B \-nph .br Obsolete, same as \-nohexdumpbuffer. .TP .B \-t\ .br Timestamp output mode: \-tf \= full timestamp \-td \= delta timestamp mode, \-tn \= no time stamp. .TP .B \-b .br Binary output of packets (disables other output). Use this option to store raw data in file or chain data to another program. E.g.: dvbsnoop \-s ts 0x00 \-b > file dvbsnoop \-s pes 0x3FF \-b | ./myprogram There might be a file limit on your system (mostly 2 GB) when writing files using '>'. .SH "Device Selection Command Line Options" .br Dvbsnoop uses default devices, defined by the DVB API. On some platforms or if using multiple dvb cards, you may want to override default settings, e.g. to select a different tuner. .TP .B \-demux \ .br Specify \ for demux. If not specified, dvbsnoop uses the device specified by the linux dvb\-api. .TP .B \-dvr \ .br Specify \ for dvr. If not specified, dvbsnoop uses the device specified by the linux dvb\-api. .TP .B \-frontend \ .br Specify \ for frontend. If not specified, dvbsnoop uses the device specified by the linux dvb\-api. .TP .B \-adapter \ .br Specify DVB adapter/card by number (0-9) using default path pattern (e.g. /dev/dvb/adapter1/...). If not specified, dvbsnoop uses the default adapter/card - usually 0. .TP .B \-devnr \ .br Specify DVB device number (0-9) on a DVB adapter/card using default path pattern (e.g. /dev/dvb/adapt.../demux1). If not specified, dvbsnoop uses the default device number - usually 0. .TP .B \-buffersize \ .br Set demux read buffersize in KBytes. Default is 0 (use internal default value). .TP .B \-n \ .br Stop after reading \ packets. Use this to limit the read process. Default is 0 (no limit). .TP .B \-if \ .br Read binary stream data from file instead of the demux device. \= '-' reads from standard input. Depending on the decoding mode this might be transport stream, packetized elemtary stream or sections. Please aware, that you cannot e.g. use \-s pes or \-s sec on a saved transport stream. The decoding/snooping mode has to match the saved stream format! .SH "SECTION Mode (SEC) Specific Command Line Options" .br The following command line options are special to the 'SECTION' decoding mode: .TP .B \-s sec .br Section mode. .TP .B \-timeout \ .br Section read timeout in ms. Default is 0 (no timeout). .TP .B \-f \ .br Filter value for filtering section data e.g. table id's. Value may be decimal (49), octal (037) or hexadecimal (0x4F). You may use multibyte filters like: 0x4E.01.20.FF The filter comprises e.g. 16 bytes covering byte 0 and byte 3..17 in a section, thus excluding bytes 1 and 2 (the length field of a section). To check the filtervalues use \-pd 9. .TP .B \-m \ .br Mask value to use for filters. Value may be decimal (49), octal (037) or hexadecimal (0x4F). You may use multibyte filters like: 0xFF.F0.FE.FF The filter comprises e.g. 16 bytes covering byte 0 and byte 3..17 in a section, thus excluding bytes 1 and 2 (the length field of a section). To check the filtervalues use \-pd 9. .TP .B \-N \ .br Stop after decoding \ packets. Use this to limit the packet decoding process. Useful, when reading stream data from file. \-n limits the read packet process, \-N limits the decoding process. Using dvb hardware filters \-n would be the same as \-N. Default is 0 (no limit). .TP .B \-crc .br Do CRC checking, when reading section data. Default is off. This is only supported, if your DVB hardware/firmware supports CRC checking. Remark: Some section types may use Checksum instead of CRC. .TP .B \-nocrc .br Don't do hardware/firmware CRC, when reading section data (default). Some DVB sections do not have proper CRC set! .TP .B \-softcrc .br Do soft CRC checking, when reading section data. Hardware/firmware CRC should be preferred. Default is \-nosoftcrc. Remark: Some section types may use Checksum instead of CRC. .TP .B \-nosoftcrc .br Don't do soft CRC, when reading sections. (default) .TP .B \-spiderpid .br Snoop referenced section PIDs. This option recursivly reads all PIDs referenced by a section. This option also sets number of packets to be read to 1 (sets \-n 1). To read more packets for a pid, use \-n \ after specifying \-spiderpid. .TP .B \-privateprovider \ .br Set provider \ string for decoding of special private tables and descriptors. Use \-help to display provider currently supported. If omitted, private data will be displayed as hexdump depending on \-ph option. (If you have information on private data structures, currently not supported by dvbsnoop, please let us know!) .SH "Transport Stream (TS) Mode Specific Command Line Options" .br The following command line options are special to the 'Transport Stream' decoding mode: .TP .B \-s ts .br Transport Stream mode. .TP .B \-sync .br (obsolete as of 1.4.10, \-sync is default. This option enforces software packet sync for TS and PS/PES). .TP .B \-nosync .br (obsolete as of 1.4.10). .TP .B \-tssubdecode .br Sub\-decode SI data (sections) or PS/PES data from transport stream decoding. This reads transport stream packets and tries to decode its content. Useful to decode PES or SI data from a transport stream file. .TP .B \-tsraw .br Read full transport stream (all pids). Your hardware/firmware has to support this mode. .TP .B \-N \ .br Stop after decoding \ packets. Use this to limit the packet decoding process. Useful, when reading stream data from file. \-n limits the read packet process, \-N limits the decoding process. Using dvb hardware filters \-n would be the same as \-N. Default is 0 (no limit). .SH "PES or PS Mode Specific Command Line Options" .br The following command line options are special to the 'PES' (packetized elementary stream) or 'PS' (program stream) decoding mode: .TP .B \-s ps Program Stream mode. .TP .B \-s pes .br Packetized Elementary Stream mode. .TP .B \-sync .br (obsolete as of 1.4.10, \-sync is default. This option enforces software packet sync for TS and PS/PES). .TP .B \-nosync .br (obsolete as of 1.4.10). .TP .SH "PID Scan Mode Specific Command Line Options" .br The following command line options are special to the 'PID Scan' discovery mode: .TP .B \-s pidscan .br Scan PIDs on transponder/frequency. .TP .B \-maxdmx \ .br Set maximum use of DMX filters. Default is 0 (use all possible filters). .SH "Bandwidth Mode Specific Command Line Options" .br There are no special command line options for the 'Bandwidth' display mode. .TP .B \-s bandwidth .br Determine bandwidth for a dvb stream. This will be done by calculating received ts packets in a timeslot. .SH "Signal Mode Specific Command Line Options" .br There are no special command line options for the 'Signal Strength' display mode. .TP .B \-s signal .br Poll frontend signal status. .TP .B \-timeout \ .br Poll timing in msec. .SH "Frontend Info Mode Specific Command Line Options" .br There are no special command line options for the 'Frontend Info' display mode. .TP .B \-s feinfo .br Display frontend information. .br .SH "Examples" .br Examples how to use dvbsnoop: .br Display EPG, 10 sections: dvbsnoop \-s sec \-nph \-n 10 0x12 dvbsnoop \-s sec \-ph 3 \-n 10 -crc 0x12 Display sections tree (1 packet each) using private provider data: dvbsnoop \-s sec \-spiderpid \-privateprovider premiere.de 0x00 Display sections tree (1 packet each) skipping "empty" pids: dvbsnoop \-s sec \-spiderpid \-timeout 15000 0x00 Display PAT transport stream (ts) and do subdecoding of sections and descriptors: dvbsnoop \-s ts \-pd 4 \-tssubdecode \-nph 0x00 Read PES (e.g. Videotext, Video, Audio) stream: dvbsnoop \-s pes 0x28F dvbsnoop \-s pes 0x28F -b > pes.bin.file Read PS from file and do not show hex dump: dvbsnoop -if hdtv_ps_file.mpg -s ps -ph 0 -nohexdumpbuffer -n 30 Show current signal strength: dvbsnoop \-s signal dvbsnoop \-s signal \-pd 9 \-n 100 -timeout 100 Show bandwidth usage of a PID 0x1FF: dvbsnoop \-s bandwidth \-n 1000 \-pd 2 0x1FF dvbsnoop \-s bandwidth \-buffersize 256 \-n 1000 0x1FF Do PID scan of a tuned transponder (different display levels): dvbsnoop \-s pidscan \-pd 1 dvbsnoop \-s pidscan \-pd 6 dvbsnoop \-s pidscan \-pd 9 \-maxdmx 12 Show frontend info: dvbsnoop \-s feinfo \-pd 9 Try to scan all sections, read 2 packets per PID: dvbsnoop \-nohexdumpbuffer \-spiderpid \-n 2 0x0000 Save 1000 packets of a transport stream to a file: dvbsnoop \-b \-n 1000 \-s ts 0x200 > ts_file.pid0x200.bin dvbsnoop \-b \-n 1000 \-s ts -tsraw > ts_file.bin Read transport stream (ts) from file and decode: dvbsnoop \-s ts \-if ts_stream.bin dvbsnoop \-s ts \-if ts_file.pid0x200.bin 0x200 Simple filter for some PID values, some examples: dvbsnoop \-n 5 \-nph 0x00 | grep \-i "PID: " dvbsnoop \-spiderpid \-nph \-n 10 0x00 | grep \-i "PID: " | sort | uniq dvbsnoop \-s signal \-pd 9 | ./perl-statistics-prog.pl Other simple filter examples: dvbsnoop \-s sec \-f 0x4E \-m 0xFF 0x12 dvbsnoop \-s sec \-f 0x4E.34.00 \-m 0xFF.FF.0F 0x12 dvbsnoop \-s sec \-f 16.00 \-m 255.255 0x12 dvbsnoop \-s sec \-nph \-n 5 0x10 | grep \-i "frequency" dvbsnoop \-s ts \-nph 0x100 | grep \-i 'Transport_error\\|^PID' Selecting devices: dvbsnoop \-s feinfo \-pd 9 \-frontend /dev/dvb/adapter0/frontend1 dvbsnoop \-s feinfo \-pd 9 \-adapter 0 -devnr 1 dvbsnoop \-s feinfo \-pd 9 \-adapter 2 Sending dvbsnoop data over network, using netcat: dvbsnoop \-s pes 0x28F -b \| nc \-q ServerName 31337 Do remote decoding of dvb data over network using dvbsnoop and netcat: streaming site: dvbsnoop \-s ts 0x0065 \-b \| nc \-q ServerName 31000 reveiving site: nc \-l \-p 31000 \| dvbsnoop \-nph \-s ts \-tssubdecode \-if \- You may also use e.g. dvbtools for sending dvb data over a network: dvbstream .... \-\-> dumprtp \| dvbsnoop \-s ts \-if \- ... for more examples and example output of dvbsnoop, please visit http://dvbsnoop.sourceforge.net. .SH NOTES .br dvbsnoop tries to decode all of the data it receives, e.g. if you try to decode a video or audio stream in section mode, dvbsnoop may assume a section table and will decode the data wrong. In this case the decoding will be garbage. Using the '-crc' option should prevent this (if supported at the hardware/driver level). .br .br dvbsnoop does not do DVB stream validation. dvbsnoop assumes correct DVB streams. Corrupted streams or streams with wrong semantics (e.g. incorrect length information) will result in wrong decoding output. For this reason, the use of '-crc' options is strongly recommended. .br .br Depending on the firmware of your dvb card, dvbsnoop may not be able to sniff on pids, which are occupied by other processes. This is no bug, this is a driver/firmware issue. .SH "SIGNALS" dvbsnoop catches signals to provide smooth program termination. SIGHUP, SIGQUIT and SIGTERM will terminate dvbsnoop smoothly. SIGABORT will abort at once after flushing buffers. SIGKILL will just kill down dvbsnoop (OS specific). .SH "BUGS" Please check http://dvbsnoop.sourceforge.net for bug reports. .br Bug reports: http://sourceforge.net/tracker/?group_id=85040 .br .SH SEE ALSO .BR dvbtune (1), .BR dvbstream (1). .br .SH "Acknowledgments" DVBSNOOP was written by Rainer Scherg (rasc). .br Copyright (c) 2001-2006 Rainer Scherg .br Additional patches and bugfixes/\-reports were provided by members of the tuxbox project \- bringing digital TV to linux based set top boxes (e.g. "dbox2" digital tv receiver) and also by users of dvbsnoop (see the ChangeLog file for credits). .br .br For more information about DVBSNOOP please visit 'http://dvbsnoop.sourceforge.net'. dvbsnoop-1.4.50/src/dvb_api/0000777000076400001440000000000010630324342011370 5dvbsnoop-1.4.50/src/dvb_api/dvb_api.h0000744000076400001440000000461210356276720013100 /* $Id: dvb_api.h,v 1.10 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: dvb_api.h,v $ Revision 1.10 2006/01/02 18:23:59 rasc just update copyright and prepare for a new public tar ball Revision 1.9 2005/10/23 20:58:14 rasc subdecode multiple SI packets with TS packet using -tssubdecode Revision 1.8 2005/09/13 18:41:15 rasc ... revert cygwin stuff Revision 1.7 2005/09/12 20:56:16 rasc Make dvbsnoop compile on Cygwin / Windows Revision 1.6 2005/08/12 23:02:33 rasc New shortcut options: -adapter and -devnr to select dvb cards/adapters or device numbers on a card. This is a shortcut for -demux -dvr and -frontend... */ #ifndef __DVB_API_H #define __DVB_API_H #include #include #include // // -- Cygwin(??) environment // -- uncomment the following lines... // --- no IOCTLs or __types // --- Only offline analyze mode available // //#ifndef ioctl // //#warning "----" //#warning "IOCTL not defined (needed for dvb-api), using dummy!" //#warning "dvbsnoop only will support offline mode..." //#warning "----" // //#define ioctl(...) dummyFunc() //#define _IOR(...) dummyFunc() //static int dummyFunc (void) {return 0;} //#endif // //#ifndef __u64 //#define __s64 long long //#define __u64 unsigned long long // //#endif #if defined(HAVE_LINUX_DVB_DMX_H) // API 3 #define DVB_API_VERSION 3 #include #define DEMUX_DEVICE_MASK "/dev/dvb/adapter%d/demux%d" #define DVR_DEVICE_MASK "/dev/dvb/adapter%d/dvr%d" #include #define FRONTEND_DEVICE_MASK "/dev/dvb/adapter%d/frontend%d" // adapter[0-4]/device[0-4] #define DVB_STD_ADAPTER_NR 0 #define DVB_STD_DEVICE_NR 0 #define DVB_MAX_DEV_PATH_LEN 64 #elif defined(HAVE_OST_DMX_H) // API 1 #define DVB_API_VERSION 1 #include #define DEMUX_DEVICE_MASK "/dev/dvb/card0/demux0" #define DVR_DEVICE_MASK "/dev/dvb/card0/dvr0" #define dmx_pes_filter_params dmxPesFilterParams #define dmx_sct_filter_params dmxSctFilterParams #define pes_type pesType #include #define FRONTEND_DEVICE_MASK "/dev/dvb/card0/frontend0" #define fe_status_t FrontendStatus // card[0-4]/device[0-4] card = adapter #define DVB_STD_ADAPTER_NR 0 #define DVB_STD_DEVICE_NR 0 #define DVB_MAX_DEV_PATH_LEN 64 #endif #endif dvbsnoop-1.4.50/src/dvb_api/file_io.h0000744000076400001440000000122610356276720013100 /* $Id: file_io.h,v 1.3 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __FILE_IO_H #define __FILE_IO_H #include #include #include #include #include #include #include #include #ifndef O_LARGEFILE /* dummy Flag, if not supported */ #warning "No large file support..." #define O_LARGEFILE 0x00 #endif #ifndef O_BINARY /* dummy Flag, if not supported - needed for CYGWIN support */ #define O_BINARY 0x00 #endif #endif dvbsnoop-1.4.50/src/dvb_api/dmx_pes.h0000744000076400001440000000043610356276716013140 /* $Id: dmx_pes.h,v 1.6 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DMX_PES_H #define __DMX_PES_H int doReadPES (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/dmx_sect.h0000744000076400001440000000044310356276716013305 /* $Id: dmx_sect.h,v 1.6 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DMX_SECT_H #define __DMX_SECT_H int doReadSECT (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/dmx_ts.h0000744000076400001440000000042710356276720012772 /* $Id: dmx_ts.h,v 1.7 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DMX_TS_H #define __DMX_TS_H int doReadTS (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/dmx_tspidscan.h0000744000076400001440000000045610356276720014336 /* $Id: dmx_tspidscan.h,v 1.4 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DMX_TSPIDSCAN_H #define __DMX_TSPIDSCAN_H int ts_pidscan (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/dmx_tspidbandwidth.h0000744000076400001440000000050110356276720015345 /* $Id: dmx_tspidbandwidth.h,v 1.4 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DMX_TSPIDBANDWIDTH_H #define __DMX_TSPIDBANDWIDTH_H int ts_pidbandwidth (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/dmx_error.h0000744000076400001440000000043610354356244013473 /* $Id: dmx_error.h,v 1.4 2005/12/27 23:30:27 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DMX_ERROR_H #define __DMX_ERROR_H int IO_error (char *str); #endif dvbsnoop-1.4.50/src/dvb_api/fe_signal.h0000744000076400001440000000050510356276720013420 /* $Id: fe_signal.h,v 1.3 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __FE_SIGNAL_H #define __FE_SIGNAL_H #include "misc/cmdline.h" int do_SignalStrength (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/fe_info.h0000744000076400001440000000046710356276720013105 /* $Id: fe_info.h,v 1.2 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __FE_INFO_H #define __FE_INFO_H #include "misc/cmdline.h" int do_FE_Info (OPTION *opt); #endif dvbsnoop-1.4.50/src/dvb_api/fe_misc.h0000744000076400001440000000316310356276720013101 /* $Id: fe_misc.h,v 1.5 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __FE_MISC_H #define __FE_MISC_H #include "dvb_api.h" typedef struct _fe_signal { int16_t strength; int16_t snr; uint32_t ber; uint32_t ublocks; fe_status_t status; } FE_SIGNAL; typedef struct _fe_signal_cap { int ber; int snr; int strength; int status; int ublocks; } FE_SIG_CAP; int capability_Check (int f, int cap); int read_Signal(int f, FE_SIGNAL *s, FE_SIG_CAP *cap); void out_status_detail (int v, fe_status_t s); #if DVB_API_VERSION != 1 // -- only > API3 int print_FE_BasicCapabilities (int v, int f); int print_FE_CurrentParameters (int v, int f); void print_FE_QPSK_param (int v, struct dvb_qpsk_parameters qp); void print_FE_QAM_param (int v, struct dvb_qam_parameters qp); void print_FE_OFDM_param (int v, struct dvb_ofdm_parameters op); #ifdef FE_ATSC // API 3.1 void print_FE_VSB_param (int v, struct dvb_vsb_parameters vsb); #endif fe_type_t read_FEType(int f); int read_FEInfo(int f, struct dvb_frontend_info *fi); int read_FEParam(int f, struct dvb_frontend_parameters *p); const char *festr_FE_code_rate (fe_code_rate_t fec); const char *festr_FE_modulation (fe_modulation_t modulation); const char *festr_FE_bandwidth (fe_bandwidth_t bandwidth); const char *festr_FE_transmit_mode (fe_transmit_mode_t transmit_mode); const char *festr_FE_guard_interval (fe_guard_interval_t guard_interval); const char *festr_FE_hierarchy (fe_hierarchy_t hierarchy); #endif #endif dvbsnoop-1.4.50/src/dvb_api/Makefile.am0000744000076400001440000000075710155176414013361 AM_CPPFLAGS = -I$(top_srcdir)/src \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE noinst_LIBRARIES = libdvbapi.a noinst_HEADERS = \ dvb_api.h \ file_io.h \ dmx_pes.h \ dmx_sect.h \ dmx_ts.h \ dmx_tspidscan.h \ dmx_tspidbandwidth.h \ dmx_error.h \ fe_signal.h \ fe_info.h \ fe_misc.h libdvbapi_a_SOURCES = \ dmx_pes.c \ dmx_sect.c \ dmx_ts.c \ dmx_tspidscan.c \ dmx_tspidbandwidth.c \ dmx_error.c \ fe_signal.c \ fe_info.c \ fe_misc.c dvbsnoop-1.4.50/src/dvb_api/Makefile.in0000644000076400001440000003120610630302137013351 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libdvbapi_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/dvb_api DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libdvbapi_a_AR = $(AR) $(ARFLAGS) libdvbapi_a_LIBADD = am_libdvbapi_a_OBJECTS = dmx_pes.$(OBJEXT) dmx_sect.$(OBJEXT) \ dmx_ts.$(OBJEXT) dmx_tspidscan.$(OBJEXT) \ dmx_tspidbandwidth.$(OBJEXT) dmx_error.$(OBJEXT) \ fe_signal.$(OBJEXT) fe_info.$(OBJEXT) fe_misc.$(OBJEXT) libdvbapi_a_OBJECTS = $(am_libdvbapi_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dmx_error.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dmx_pes.Po ./$(DEPDIR)/dmx_sect.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dmx_ts.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dmx_tspidbandwidth.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dmx_tspidscan.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/fe_info.Po ./$(DEPDIR)/fe_misc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/fe_signal.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libdvbapi_a_SOURCES) DIST_SOURCES = $(libdvbapi_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE noinst_LIBRARIES = libdvbapi.a noinst_HEADERS = \ dvb_api.h \ file_io.h \ dmx_pes.h \ dmx_sect.h \ dmx_ts.h \ dmx_tspidscan.h \ dmx_tspidbandwidth.h \ dmx_error.h \ fe_signal.h \ fe_info.h \ fe_misc.h libdvbapi_a_SOURCES = \ dmx_pes.c \ dmx_sect.c \ dmx_ts.c \ dmx_tspidscan.c \ dmx_tspidbandwidth.c \ dmx_error.c \ fe_signal.c \ fe_info.c \ fe_misc.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/dvb_api/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/dvb_api/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libdvbapi.a: $(libdvbapi_a_OBJECTS) $(libdvbapi_a_DEPENDENCIES) -rm -f libdvbapi.a $(libdvbapi_a_AR) libdvbapi.a $(libdvbapi_a_OBJECTS) $(libdvbapi_a_LIBADD) $(RANLIB) libdvbapi.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_pes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_sect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_ts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_tspidbandwidth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmx_tspidscan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fe_info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fe_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fe_signal.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/dvb_api/dmx_pes.c0000744000076400001440000003226710356276716013142 /* $Id: dmx_pes.c,v 1.37 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Streams: PES & PS -- For more information please see: -- ISO 13818-1 and ETSI 300 468 $Log: dmx_pes.c,v $ Revision 1.37 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.36 2005/11/08 23:15:25 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.35 2005/10/20 22:25:06 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.34 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.33 2005/09/02 14:11:34 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.32 2005/08/10 21:28:17 rasc New: Program Stream handling (-s ps) Revision 1.31 2005/08/02 22:57:46 rasc Option -N, rewrite offline filters (TS & Section) Revision 1.30 2004/12/07 21:01:40 rasc Large file support (> 2 GB) for -if cmd option. (tnx to K.Zheng, Philips.com for reporting) Revision 1.29 2004/10/12 20:37:47 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.28 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.27 2004/04/18 19:30:32 rasc Transport Stream payload sub-decoding (Section, PES data) improved Revision 1.26 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.25 2004/02/15 22:22:28 rasc cmd option: -hexdumpbuffer -nohexdumpbuffer Revision 1.24 2004/01/25 22:36:52 rasc minor changes & enhancments Revision 1.23 2004/01/11 22:49:40 rasc PES restructured Revision 1.22 2004/01/06 14:06:08 rasc no message Revision 1.21 2004/01/06 03:13:25 rasc TS prints PES/Section ID on payload_start Revision 1.20 2004/01/02 16:40:36 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.19 2004/01/02 02:37:54 rasc pes sync bugfix Revision 1.18 2004/01/02 00:00:37 rasc error output for buffer overflow Revision 1.17 2004/01/01 20:09:23 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.16 2003/12/30 14:05:37 rasc just some annotations, so I do not forget these over Sylvester party... (some alkohol may reformat parts of /devbrain/0 ... ) cheers! Revision 1.15 2003/12/28 22:53:40 rasc some minor changes/cleanup Revision 1.14 2003/12/28 14:00:25 rasc bugfix: section read from input file some changes on packet header output Revision 1.13 2003/12/15 20:09:48 rasc no message Revision 1.12 2003/12/10 22:54:11 obi more tiny fixes Revision 1.11 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.10 2003/11/24 23:52:16 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.9 2003/10/24 22:45:05 rasc code reorg... Revision 1.8 2003/10/24 22:17:18 rasc code reorg... Revision 1.7 2003/10/16 19:02:27 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.6 2003/05/28 01:35:01 obi fixed read() return code handling Revision 1.5 2003/01/07 00:43:58 obi set buffer size to 256kb Revision 1.4 2002/11/01 20:38:40 Jolt Changes for the new API Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "misc/cmdline.h" #include "misc/output.h" #include "misc/sig_abort.h" #include "pes/pespacket.h" #include "dvb_api.h" #include "file_io.h" #include "dmx_error.h" #include "dmx_pes.h" #define PES_BUF_SIZE (256 * 1024) // default PES dmx buffer size #define READ_BUF_SIZE (256 * 1024) // larger (64KB + 6 Bytes) !!!/ #define PUSHBACK_BUF_SIZE (128) // < 1024 bytes!! see below #define SKIP_BUF_SIZE (1024) // for debugging, etc. static void out_SkipBuffer (int v, int len); static long pes_SyncBufferRead (int fd, u_char *buf, u_long max_len, u_long *skipped_bytes); #define DIRECT_BUFFERED_READ 1 // see below! static int pes_rawBufferedPushByte (u_char c); static long pes_rawBufferedRead (int fd, u_char *dest_buf, u_long dest_len); // int doReadPS (OPTION *opt) int doReadPES (OPTION *opt) { int fd; u_char buf[READ_BUF_SIZE]; /* data buffer */ u_char *b; /* ptr to packet start */ long count; char *f; int openMode; int dmxMode; long dmx_buffer_size = PES_BUF_SIZE; if (opt->inpPidFile) { f = opt->inpPidFile; openMode = O_RDONLY | O_LARGEFILE | O_BINARY; dmxMode = 0; } else { f = opt->devDemux; openMode = O_RDWR; dmxMode = 1; } if((fd = open(f,openMode)) < 0){ IO_error(f); return -1; } /* -- init demux */ if (dmxMode) { struct dmx_pes_filter_params flt; // -- alloc dmx buffer for PES if (opt->rd_buffer_size > 0) { dmx_buffer_size = opt->rd_buffer_size; } if (ioctl(fd,DMX_SET_BUFFER_SIZE, dmx_buffer_size) < 0) { IO_error ("DMX_SET_BUFFER_SIZE failed: "); close (fd); return -1; } memset (&flt, 0, sizeof (struct dmx_pes_filter_params)); flt.pid = opt->pid; flt.input = DMX_IN_FRONTEND; flt.output = DMX_OUT_TAP; flt.pes_type = DMX_PES_OTHER; flt.flags = DMX_IMMEDIATE_START; if (ioctl(fd,DMX_SET_PES_FILTER,&flt) < 0) { IO_error ("DMX_SET_PES_FILTER failed: "); close (fd); return -1; } } /* -- read PES packet for pid */ count = 0; while (! isSigAbort() ) { long n; u_long skipped_bytes = 0; // -- Read PES packet (sync Read) n = pes_SyncBufferRead (fd,buf,sizeof(buf), &skipped_bytes); b = buf; // -- error or eof? if (n < 0) { int err; err = IO_error("read"); // if (err == ETIMEDOUT) break; // Timout, abort continue; } if (n == 0) { if (dmxMode) continue; // dmxmode = no eof! else break; // filemode eof } count ++; if (opt->binary_out) { // direct write to FD 1 ( == stdout) write (1, b, n); } else { // -- skipped Data to get sync byte? if (skipped_bytes) { out_nl (3,"!!! %ld bytes skipped to get PS/PES sync!!!",skipped_bytes); out_SkipBuffer (8, skipped_bytes); } processPS_PES_packet (opt->pid, count, b, n); } // bin_out // Clean Buffer // if (n > 0 && n < sizeof(buf)) memset (buf,0,n+1); // count packets ? if (opt->rd_packet_count > 0) { if (count >= opt->rd_packet_count) break; } if (opt->dec_packet_count > 0) { if (count >= opt->dec_packet_count) break; } } // while /* -- Stop Demux */ if (dmxMode) { ioctl (fd, DMX_STOP, 0); } close(fd); return 0; } // ----------------------------------------------------------- u_char SkipBuffer[SKIP_BUF_SIZE]; /* -- output skipped bytes from last read */ static void out_SkipBuffer (int v, int len) { int lmax; int l; lmax = (sizeof(SkipBuffer)/sizeof(u_char)); l = (len > lmax) ? lmax : len; print_databytes (v,"Skipped bytes:", SkipBuffer, l); if (l == lmax) { out_nl (v,"..."); out_NL (v); } } /* -- read PES packet (Synced) -- buffer pre-read bytes for next execution -- return: len // read()-return code */ static long pes_SyncBufferRead (int fd, u_char *buf, u_long max_len, u_long *skipped_bytes) { u_long sync; u_char *org_buf = buf; // -- simple PES sync... seek for 0x000001 (PES_SYNC_BYTE) // ISO/IEC 13818-1: // -- packet_start_code_prefix -- The packet_start_code_prefix is // -- a 24-bit code. Together with the stream_id that follows it constitutes // -- a packet start code that identifies the beginning of a packet. // -- The packet_start_code_prefix is the bit stream // -- '0000 0000 0000 0000 0000 0001' (0x000001). *skipped_bytes = 0; sync = 0xFFFFFFFF; // -- seek packet sync start while (1) { u_char b[4]; int n; n = pes_rawBufferedRead (fd, b,1); if (n <= 0) return n; // error or strange, abort // -- byte shift for packet_start_code_prefix // -- sync found? 0x000001 + valid PESstream_ID or PS_stream_ID sync = (sync << 8) | *b; if ( (sync & 0xFFFFFF00) == 0x00000100 ) { *skipped_bytes -= 3; buf[0] = 0x00; // write sync + ID to buffer buf[1] = 0x00; buf[2] = 0x01; buf[3] = *b; break; } // -- store skipped bytes if ( (*skipped_bytes) < (sizeof(SkipBuffer)/sizeof(u_char)) ) { SkipBuffer[*skipped_bytes] = *b; } (*skipped_bytes)++; } // -- Sync found! // -- evaluate packet_id and seek packet end (next sync) if (buf[3] >= 0xBC) { // PES system packet with length long n1,n2; long l; n1 = pes_rawBufferedRead (fd, buf+4,2); if (n1 < 0) return n1; if (n1 == 2) { l = (buf[4]<<8) + buf[5]; // PES packet size... n1 = 6; // 4+2 bytes read if (l > 0) { n2 = pes_rawBufferedRead (fd, buf+n1, (unsigned int) l ); return (n2 < 0) ? n2 : n1+n2; } else { // unbound stream! max_len -= n1; // l=0 buf += n1; } } else { max_len -= n1 + 4; buf += n1 + 4; } } else { max_len -= 4; buf += 4; } // -- seek packet end (sync to next packet) // -- ISO 13818-1 length=0 packets (unbound video streams) // -- ISO 13818-2 packets sync = 0xFFFFFFFF; while (max_len > 0) { u_char c; int n; // $$$ TODO: may be optimized n = pes_rawBufferedRead (fd, buf,1); if (n < 0) return n; c = *buf++; max_len -= n; // -- EOF if (n == 0) { return (long) (buf - org_buf); } // -- next packet found? (sync detected) sync = (sync << 8) | c; if ( (sync & 0x00FFFFFF) == 0x000001 ) { pes_rawBufferedPushByte (*(--buf)); // push back sync bytes pes_rawBufferedPushByte (*(--buf)); pes_rawBufferedPushByte (*(--buf)); return (long) (buf - org_buf); } } return -1; // buffer overflow } // ----------------------------------------------------------- // // -- PS/PES raw buffer operations (prior to pes sync) // // // -- Byte Push Back Buffer to raw stream buffer // -- return: -1: buffer overflow // static u_char PB_buffer[PUSHBACK_BUF_SIZE]; // not to large, many bytes might be pushed static int PB_pos = 0; static int pes_rawBufferedPushByte (u_char c) { if ( PB_pos >= (sizeof(PB_buffer) / sizeof(u_char)) ) { return -1; // overflow } PB_buffer[PB_pos++] = c; return 0; } // // -- 2 implementations to choose... // -- over time only one will survive... // #ifdef DIRECT_BUFFERED_READ /* -- raw read PES stream (check push backs) -- pre-read bytes for next call -- return: len // read()-return code */ static long pes_rawBufferedRead (int fd, u_char *dest_buf, u_long dest_len) { int n1 = 0; int n2 = 0; // -- Bytes in PushBack buffer? // -- copy to destination buffer while ( (PB_pos > 0) && (dest_len > 0) ) { *dest_buf++ = PB_buffer[--PB_pos]; dest_len--; n1++; } if (dest_len > 0) { n2 = read(fd,dest_buf,dest_len); if (n2 < 0) return n2; } return n1 + n2; } #else /* -- raw read PES stream buffered (+ check push backs) -- buffer pre-read bytes for next call -- disadvantage: driver -> memcopy -> readbuffer -> memcopy -> pes_packet-buffer -- return: len // read()-return code */ static long pes_rawBufferedRead (int fd, u_char *dest_buf, u_long dest_len) { #define RAW_READ_BUF_SIZE (16 * 1024) /* buffered read buffer */ static u_char *rd_buf = (u_char *)NULL; static u_int pos_Start; static u_int pos_End; u_char *org_dest_buf = dest_buf; // -- first time, init buffer if (! rd_buf) { pos_Start = 0; pos_End = 0; rd_buf = malloc (RAW_READ_BUF_SIZE * sizeof(u_char)); if (! rd_buf) { IO_error("malloc"); exit (1); } } // -- Bytes in PushBack buffer? // -- copy to destination buffer while ( (PB_pos > 0) && (dest_len > 0) ) { *dest_buf++ = PB_buffer[--PB_pos]; dest_len--; } // -- transfere data from rd buffer while (dest_len > 0) { int copy_len; int stored_len; int n; stored_len = pos_End - pos_Start; copy_len = (dest_len <= stored_len) ? dest_len : stored_len; if (copy_len > 0) { memcpy (dest_buf, rd_buf+pos_Start, copy_len); pos_Start += copy_len; dest_buf += copy_len; dest_len -= copy_len; } else { pos_Start = 0; pos_End = 0; n = read(fd,rd_buf,RAW_READ_BUF_SIZE); if (n <= 0) return n; pos_End = n; } } return (long) (dest_buf - org_dest_buf); } #endif // $$$ TODO: // read unbound video streams (length 0) until next sync is read // push back function for already pre-read bytes // $$$ TODO // also read iso 13818-2 and iso 13818-3 streams dvbsnoop-1.4.50/src/dvb_api/dmx_sect.c0000744000076400001440000002246110356276716013304 /* $Id: dmx_sect.c,v 1.34 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Sections Streams -- For more information please see: -- ISO 13818 (-1) and ETSI 300 468 $Log: dmx_sect.c,v $ Revision 1.34 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.33 2005/10/20 22:25:06 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.32 2005/09/06 23:32:03 rasc no message Revision 1.31 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.30 2005/08/02 22:57:46 rasc Option -N, rewrite offline filters (TS & Section) Revision 1.29 2005/07/18 18:38:57 rasc minor changes on section filter, manpage Revision 1.28 2005/07/11 23:06:47 rasc Multibyte section filter redesign: -f 0x4F.22.33.44.55.66 -m 0x.FF.FF.FF etc. Manpage update Revision 1.27 2005/06/27 20:28:16 rasc first version for a man page Revision 1.26 2005/06/06 17:37:03 rasc minor error msg change Revision 1.25 2005/06/02 09:26:11 ghostrider filtering sections up to 4 bytes is now possible, do 'dvbsnoop -f 0x4e2f1c -m 0xFFFFFF 0x12' for filtering only now/next table for VOX on the correct transponder Revision 1.24 2004/12/07 21:01:41 rasc Large file support (> 2 GB) for -if cmd option. (tnx to K.Zheng, Philips.com for reporting) Revision 1.23 2004/10/12 20:37:47 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.22 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.21 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.20 2004/02/15 22:22:28 rasc cmd option: -hexdumpbuffer -nohexdumpbuffer Revision 1.19 2004/02/12 23:00:24 rasc no message Revision 1.18 2004/01/25 22:36:52 rasc minor changes & enhancments Revision 1.17 2004/01/22 22:26:35 rasc pes_pack_header section read timeout Revision 1.16 2004/01/02 22:25:37 rasc DSM-CC MODULEs descriptors complete Revision 1.15 2004/01/02 00:00:37 rasc error output for buffer overflow Revision 1.14 2004/01/01 20:09:23 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.13 2003/12/28 22:53:40 rasc some minor changes/cleanup Revision 1.12 2003/12/28 14:00:25 rasc bugfix: section read from input file some changes on packet header output Revision 1.11 2003/12/15 20:09:48 rasc no message Revision 1.10 2003/12/10 22:46:34 obi tiny section filter fixes Revision 1.9 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.8 2003/10/24 22:45:06 rasc code reorg... Revision 1.7 2003/10/24 22:17:18 rasc code reorg... Revision 1.6 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.5 2003/05/28 01:35:01 obi fixed read() return code handling Revision 1.4 2002/11/01 20:38:40 Jolt Changes for the new API Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "misc/cmdline.h" #include "misc/output.h" #include "misc/pid_mem.h" #include "misc/sig_abort.h" #include "sections/sectables.h" #include "dvb_api.h" #include "file_io.h" #include "dmx_error.h" #include "dmx_sect.h" #define SECT_BUF_SIZE (256*1024) /* default DMX buffer size */ #define READ_BUF_SIZE (32*1024) /* section work buffer (section is @5K) */ static long sect_read (int fd, u_char *buf, long buflen); static int doReadSECT_2 (OPTION *opt); /* -- read sections -- single pid sections or spider pid sections (opt.) */ int doReadSECT (OPTION *opt) { int status; // -- first pid status = doReadSECT_2 (opt); mark_PidMem_as_used (opt->pid); if (status) return status; // -- spider option requested? if (opt->spider_pid) { u_int pid; while ( !isSigAbort() ) { pid = get_UnusedPidFromMem (); if (pid == INVALID_PID) break; // new spidered pid opt->pid = pid; status = doReadSECT_2 (opt); mark_PidMem_as_used (pid); if (status) return status; } } return status; } /* -- read single section */ static int doReadSECT_2 (OPTION *opt) { int fd; u_char buf[READ_BUF_SIZE]; /* data buffer */ long count; long filtered_count; char *f; int openMode; int dmxMode; long dmx_buffer_size = SECT_BUF_SIZE; if (opt->inpPidFile) { f = opt->inpPidFile; openMode = O_RDONLY | O_LARGEFILE | O_BINARY; dmxMode = 0; } else { f = opt->devDemux; openMode = O_RDWR; dmxMode = 1; } if((fd = open(f,openMode)) < 0){ IO_error(f); return -1; } /* -- init demux */ if (dmxMode) { struct dmx_sct_filter_params flt; // -- alloc dmx buffer for SECTION if (opt->rd_buffer_size > 0) { dmx_buffer_size = opt->rd_buffer_size; } if (ioctl(fd,DMX_SET_BUFFER_SIZE, dmx_buffer_size) < 0) { IO_error ("DMX_SET_BUFFER_SIZE failed: "); close (fd); return -1; } memset (&flt, 0, sizeof (struct dmx_sct_filter_params)); flt.pid = opt->pid; // -- set filter (info from the dvb api v3:) // -- The filter comprises 16 bytes(?) covering byte 0 and byte 3..17 in // -- a section,thus excluding bytes 1 and 2 (len field of a sect). { int i; for (i=0; i < opt->filterLen && i < DMX_FILTER_SIZE; i++) { flt.filter.filter[i] = opt->filter[i]; flt.filter.mask[i] = opt->mask[i]; } // memcpy(&flt.filter.filter, opt->filter, DMX_FILTER_SIZE); // memcpy(&flt.filter.mask, opt->mask, DMX_FILTER_SIZE); } flt.timeout = opt->timeout_ms; flt.flags = DMX_IMMEDIATE_START; if (opt->crc) flt.flags |= DMX_CHECK_CRC; if (ioctl (fd, DMX_SET_FILTER, &flt) < 0) { IO_error ("DMX_SET_FILTER failed: "); close(fd); return -1; } } /* -- read SECTION packets for pid */ count = 0; filtered_count = 0; while ( !isSigAbort() ) { long n; int filter_match = 1; n = sect_read(fd,buf,sizeof(buf)); // -- error or eof? if (n < 0) { int err; char s[64]; sprintf (s,"read (PID 0x%04x)",opt->pid); err = IO_error(s); if (err == ETIMEDOUT) break; // Timout, abort continue; } if (n == 0) { if (dmxMode) continue; // dmxmode = no eof! else break; // filemode eof } count ++; // -- FILE filter mode when reading from file (soft section filter) // -- The filter comprises 16 bytes(?) covering byte 0 and byte 3..17 if (! dmxMode) { // file read mode int i; for (i=0; i < opt->filterLen; i++) { int j; j = (i) ? i+2 : 0; // Byte 0, 3..17 if ( (buf[j] & opt->mask[i]) != (opt->filter[i] & opt->mask[i]) ) { filter_match = 0; // fail! break; } } } // -- packet output ? (binary or decoded) // -- This happens, when filter are matching (hard or soft filter) if (filter_match) { filtered_count++; if (opt->binary_out) { // direct write to FD 1 ( == stdout) write (1, buf,n); } else { processSI_packet (opt->pid, count, buf, n); } } // filter_match: packet out // Clean Buffer // if (n > 0 && n < sizeof(buf)) memset (buf,0,n+1); // count packets ? if (opt->rd_packet_count > 0) { if (count >= opt->rd_packet_count) break; } if (opt->dec_packet_count > 0) { if (filtered_count >= opt->dec_packet_count) break; } } // while /* -- Stop Demux */ if (dmxMode) { ioctl (fd, DMX_STOP, 0); } close(fd); return 0; } /* * -- section read * -- read one section * -- return: equivalent to read(); */ static long sect_read (int fd, u_char *buf, long buflen) { int n; int sect_len; n = read(fd,buf,3); // read section header if (n <= 0) return n; // error or strange, abort // section size // -- table_id 8 uimsbf // -- some stuff 4 bits // -- sectionlength 12 uimsbf sect_len = ((buf[1] & 0x0F) << 8) + buf[2]; // get section size if (sect_len > (buflen-3)) return -1; // something odd? n = read(fd,buf+3,sect_len); // read 1 section if (n >=0) n += 3; // we already read header bytes return n; } /* // $$$ TODO * u_int table_id; + u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int service_id; u_int reserved_3; * u_int version_number; u_int current_next_indicator; * u_int section_number; * u_int last_section_number; -- get table_id + version tid_ver[32] (id, version, last_sec_no,completed) --> check section_syntax --> get last_section_nr & sect_number */ dvbsnoop-1.4.50/src/dvb_api/dmx_ts.c0000744000076400001440000002366710356276716013005 /* $Id: dmx_ts.c,v 1.37 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Transport Streams -- For more information please see: -- ISO 13818 (-1) and ETSI 300 468 $Log: dmx_ts.c,v $ Revision 1.37 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.36 2005/11/08 23:15:25 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.35 2005/10/20 22:25:06 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.34 2005/09/09 14:20:29 rasc TS continuity sequence check (cc verbose output) Revision 1.33 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.32 2005/08/02 22:57:46 rasc Option -N, rewrite offline filters (TS & Section) Revision 1.31 2005/01/23 21:52:01 rasc DVR device needs to be open in RD only mode... Revision 1.30 2004/12/07 21:01:41 rasc Large file support (> 2 GB) for -if cmd option. (tnx to K.Zheng, Philips.com for reporting) Revision 1.29 2004/11/16 23:02:50 rasc cmd option "-tsraw" for full/raw TS read (if supported by hard-/firmware) Revision 1.28 2004/11/16 09:15:03 obi show received pid instead of command line pid if pid 0x2000 was specified (full TS) Revision 1.27 2004/10/12 20:37:47 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.26 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.25 2004/04/18 19:30:32 rasc Transport Stream payload sub-decoding (Section, PES data) improved Revision 1.24 2004/04/15 22:29:22 rasc PMT: some brainded section check TS: filter single pids from multi-pid ts-input-file minor enhancements Revision 1.23 2004/04/15 03:38:50 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.22 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.21 2004/02/15 22:22:28 rasc cmd option: -hexdumpbuffer -nohexdumpbuffer Revision 1.20 2004/01/25 22:36:52 rasc minor changes & enhancments Revision 1.19 2004/01/25 21:37:28 rasc bugfixes, minor changes & enhancments Revision 1.18 2004/01/02 02:45:33 rasc no message Revision 1.17 2004/01/02 00:00:37 rasc error output for buffer overflow Revision 1.16 2004/01/01 20:09:23 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.15 2003/12/30 14:05:37 rasc just some annotations, so I do not forget these over Sylvester party... (some alkohol may reformat parts of /devbrain/0 ... ) cheers! Revision 1.14 2003/12/28 22:53:40 rasc some minor changes/cleanup Revision 1.13 2003/12/28 14:00:25 rasc bugfix: section read from input file some changes on packet header output Revision 1.12 2003/12/15 20:09:48 rasc no message Revision 1.11 2003/12/10 22:54:11 obi more tiny fixes Revision 1.10 2003/11/24 23:52:16 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.9 2003/10/24 22:45:06 rasc code reorg... Revision 1.8 2003/10/24 22:17:18 rasc code reorg... Revision 1.7 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.6 2003/05/28 01:35:01 obi fixed read() return code handling Revision 1.5 2003/01/07 00:43:58 obi set buffer size to 256kb Revision 1.4 2002/11/01 20:38:40 Jolt Changes for the new API Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "misc/cmdline.h" #include "misc/output.h" #include "misc/sig_abort.h" #include "ts/tslayer.h" #include "ts/ts2secpes.h" #include "ts/ts_cc_check.h" #include "dvb_api.h" #include "file_io.h" #include "dmx_error.h" #include "dmx_ts.h" #define TS_PACKET_LEN (188) /* TS RDSIZE is fixed !! */ #define TS_SYNC_BYTE (0x47) /* SyncByte fuer TS ISO 138181-1 */ #define TS_BUF_SIZE (256 * 1024) /* default DMX_Buffer Size for TS */ #define READ_BUF_SIZE (3*TS_PACKET_LEN) /* min. 2x TS_PACKET_LEN!!! */ static long ts_SyncRead (int fd, u_char *buf, long max_buflen, long *skipped_bytes); int doReadTS (OPTION *opt) { int fd_dmx = 0, fd_dvr = 0; u_char buf[READ_BUF_SIZE]; /* data buffer */ u_char *b; /* ptr for packet start */ long count; long filtered_count; char *f; int openMode; int fileMode; long dmx_buffer_size = TS_BUF_SIZE; if (opt->inpPidFile) { f = opt->inpPidFile; openMode = O_RDONLY | O_LARGEFILE | O_BINARY; fileMode = 1; } else { f = opt->devDvr; openMode = O_RDONLY; fileMode = 0; } if((fd_dvr = open(f,openMode)) < 0){ IO_error(f); return -1; } /* -- init demux */ if (!fileMode) { struct dmx_pes_filter_params flt; if((fd_dmx = open(opt->devDemux,O_RDWR)) < 0){ IO_error(opt->devDemux); close (fd_dvr); return -1; } // -- alloc dmx buffer for TS if (opt->rd_buffer_size > 0) { dmx_buffer_size = opt->rd_buffer_size; } // -- full Transport Stream Read?? (special DVB-API-PID...) if (opt->ts_raw_mode) { opt->pid = PID_FULL_TS; } if (ioctl(fd_dmx,DMX_SET_BUFFER_SIZE, dmx_buffer_size) < 0) { IO_error ("DMX_SET_BUFFER_SIZE failed: "); close (fd_dmx); close (fd_dvr); return -1; } memset (&flt, 0, sizeof (struct dmx_pes_filter_params)); flt.pid = opt->pid; flt.input = DMX_IN_FRONTEND; flt.output = DMX_OUT_TS_TAP; flt.pes_type = DMX_PES_OTHER; flt.flags = DMX_IMMEDIATE_START; if (ioctl(fd_dmx,DMX_SET_PES_FILTER,&flt) < 0) { IO_error ("DMX_SET_PES_FILTER failed: "); close (fd_dmx); close (fd_dvr); return -1; } } // -- acquire TS subdecoding buffer if (opt->ts_subdecode) { ts2SecPesInit (); } // -- init TS CC check ts_cc_init (); /* -- read TS packets for pid */ count = 0; filtered_count = 0; while ( ! isSigAbort() ) { long n; long skipped_bytes = 0; int pid_filter_match = 1; int packet_pid = -1; // -- Sync TS read! n = ts_SyncRead (fd_dvr,buf,sizeof(buf), &skipped_bytes); b = buf+(skipped_bytes % TS_PACKET_LEN); // -- error or eof? if (n < 0) { int err; err = IO_error("read"); // if (err == ETIMEDOUT) break; // Timout, abort continue; } if (n == 0) { if (!fileMode) continue; // DVRmode = no eof! else { // filemode eof ts2SecPes_LastPacketReadSubdecode_Output (); break; } } count ++; // -- skipped Data to get sync byte? if (skipped_bytes) { if (! opt->binary_out) { out_nl (3,"!!! %ld bytes skipped to get TS sync!!!"); } } // -- SyncByte for TS packet and correct len? if (b[0] != TS_SYNC_BYTE || n != TS_PACKET_LEN) { if (! opt->binary_out) { out_nl (3,"!!! Wrong SyncByte or packet length mismatch (= no TS)!!!"); } continue; } // -- PID soft filter mode // -- We alway do this check (even if we are reading directly // -- from dvb device and PID has already been filtered by demux) packet_pid = getBits (b, 0,11, 13); if ((opt->pid >= 0) && (opt->pid <= MAX_PID) && (opt->pid != packet_pid)) { pid_filter_match = 0; } // -- packet output ? (binary or decoded) // -- This happens, when filter are matching (hard or soft filter) if (pid_filter_match) { filtered_count++; if (opt->binary_out) { // direct write to FD 1 ( == stdout) write (1, b, n); } else { processTS_packet (packet_pid, filtered_count, b, n); } } // pid_filter_match: packet out // count packets ? if (opt->rd_packet_count > 0) { if (count >= opt->rd_packet_count) break; } if (opt->dec_packet_count > 0) { if (filtered_count >= opt->dec_packet_count) break; } } // while // -- release TS subdecoding buffer if (opt->ts_subdecode) ts2SecPesFree (); // -- release TS CC checka buffer, etc. ts_cc_init (); // -- Stop Demux if (!fileMode) { ioctl (fd_dmx, DMX_STOP, 0); close(fd_dmx); } close(fd_dvr); return 0; } /* * -- sync read (optimized = avoid multiple byte reads) * -- Seek TS sync-byte and read packet in buffer * -- ATTENTION: packet is not stored at buf[0] * -- --> packet starts at buf[skipped_bytes % TS_PACKET_LEN] !!! * -- return: equivalent to read(); */ static long ts_SyncRead (int fd, u_char *buf, long max_buflen, long *skipped_bytes) { int n1,n2; int i; int found; // -- simple TS sync... // -- $$$ to be improved: // -- $$$ (best would be: check if buf[188] is also a sync byte) *skipped_bytes = 0; found = 0; while (! found) { n1 = read(fd,buf,TS_PACKET_LEN); if (n1 <= 0) return n1; // error or strange, abort for (i=0;i=0) n2 = n1+n2-i; ; // should be TS_PACKET_LEN anyway... return n2; } dvbsnoop-1.4.50/src/dvb_api/dmx_tspidscan.c0000744000076400001440000002370210356276720014330 /* $Id: dmx_tspidscan.c,v 1.23 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Brute force scan all pids on a transponder -- scanpids principle is based on the sourcefile getpids.c from 'obi' $Log: dmx_tspidscan.c,v $ Revision 1.23 2006/01/02 18:23:59 rasc just update copyright and prepare for a new public tar ball Revision 1.22 2005/11/08 23:15:25 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.21 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.20 2005/08/22 22:37:59 rasc ATSC frontend info Revision 1.19 2005/08/17 21:18:18 rasc improvements on pidscan Revision 1.18 2004/10/12 20:37:47 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.17 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.16 2004/04/05 17:32:13 rasc mass typo fix adaption --> adaptation Revision 1.15 2004/01/31 01:24:26 rasc PIDSCAN redesign, try to show pid content (PES streamID, SECTION tableID) Revision 1.14 2004/01/13 21:04:20 rasc BUGFIX: getbits overflow fixed... Revision 1.13 2004/01/11 21:01:32 rasc PES stream directory, PES restructured Revision 1.12 2004/01/02 00:00:37 rasc error output for buffer overflow Revision 1.11 2004/01/01 20:09:23 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.10 2003/12/28 14:00:26 rasc bugfix: section read from input file some changes on packet header output Revision 1.9 2003/12/15 22:41:28 rasc pidscan improved, problems with max filters on demux Revision 1.8 2003/12/15 22:29:27 rasc pidscan improved, problems with max filters on demux Revision 1.7 2003/12/15 20:09:48 rasc no message Revision 1.6 2003/12/14 18:29:56 rasc no message Revision 1.5 2003/12/10 23:18:10 rasc improve pidscan Revision 1.4 2003/12/10 20:07:15 rasc minor stuff Revision 1.3 2003/12/09 20:34:23 rasc transponder pid-scan improved (should be sufficient now) Revision 1.2 2003/12/09 18:27:48 rasc pidscan on transponder Revision 1.1 2003/12/07 23:36:13 rasc pidscan on transponder - experimental(!) */ #include #include #include #include #include "dvbsnoop.h" #include "strings/dvb_str.h" #include "misc/cmdline.h" #include "misc/helper.h" #include "misc/output.h" #include "misc/sig_abort.h" #include "dvb_api.h" #include "dmx_error.h" #include "dmx_tspidscan.h" /* * some definition */ // min. buffer collect time before read/poll // has to be below timeouts!!! #define PID_TIME_WAIT 100 // timeout in ms // TimoutHIGH will be used on PIDs < 0x20 #define PID_TIMEOUT_LOW (250 - PID_TIME_WAIT) #define PID_TIMEOUT_HIGH (30100 - PID_TIME_WAIT) // max filters (will be checked dynamically) #define MAX_PID_FILTER 256 // highest pid #define MAX_PID 0x1FFF #define TS_LEN 188 #define TS_SYNC_BYTE 0x47 #define TS_BUF_SIZE (TS_LEN * 2048) /* fix buffer size */ enum TS_TYPE { // TS Content TS_NOPID, TS_SECTION, TS_PES, TS_ERROR, TS_SCRAMBLED, TS_STUFFING, TS_UNKNOWN }; typedef struct _TS_PID { int count; int type; int id; } TS_PID; static TS_PID *pidArray; static int analyze_ts_pid (u_char *buf, int len); static TS_PID *ts_payload_check (u_char *b, int pid, TS_PID *tspid); int ts_pidscan (OPTION *opt) { // $$$ TODO buffersize-option? u_char buf[TS_BUF_SIZE]; struct pollfd pfd; struct dmx_pes_filter_params flt; int *dmxfd; int timeout; int timeout_corr; int pid,pid_low; int i; int filters; int max_pid_filter; int pid_found; int rescan; indent (0); out_nl (2,""); out_nl (2,"---------------------------------------------------------"); out_nl (2,"Transponder PID-Scan..."); out_nl (2,"---------------------------------------------------------"); // -- max demux filters to use... max_pid_filter = MAX_PID_FILTER; if (opt->max_dmx_filter > 0) max_pid_filter = opt->max_dmx_filter; // -maxdmx opt // alloc pids pidArray = (TS_PID *) malloc ( (MAX_PID+1) * sizeof(TS_PID) ); if (!pidArray) { IO_error("malloc"); return -1; } for (i=0; i <= MAX_PID ; i++) { (pidArray+i)->count = 0; (pidArray+i)->type = TS_NOPID; } dmxfd = (int *) malloc(sizeof(int) * MAX_PID_FILTER); if (!dmxfd) { free (pidArray); IO_error("malloc"); return -1; } for (i = 0; i < max_pid_filter; i++) dmxfd[i] = -1; pid = 0; while ( (pid <= MAX_PID) && !isSigAbort() ) { pid_low = pid; timeout_corr = 0; rescan = 0; do { pid = pid_low; // -- open DVR device for reading pfd.events = POLLIN | POLLPRI; if((pfd.fd = open(opt->devDvr,O_RDONLY|O_NONBLOCK)) < 0){ IO_error(opt->devDvr); free (pidArray); free (dmxfd); return -1; } // -- set multi PID filter // -- try to get as many dmx filters as possible // -- error messages only if filter 0 fails filters = 0; for (i = 0; (i < max_pid_filter) && (pid <= MAX_PID); i++) { if (dmxfd[i] < 0) { if ((dmxfd[i]=open(opt->devDemux,O_RDWR)) < 0) { // -- no filters??? if (i == 0) IO_error(opt->devDemux); break; } } // -- default buffer should be sufficient // ioctl (dmxfd[i],DMX_SET_BUFFER_SIZE, sizeof(buf)); // -- skip already scanned pids (rescan-mode) while ( ((pidArray+pid)->type != TS_NOPID) && (pid < MAX_PID) ) pid++; flt.pid = pid; flt.input = DMX_IN_FRONTEND; flt.output = DMX_OUT_TS_TAP; flt.pes_type = DMX_PES_OTHER; flt.flags = DMX_IMMEDIATE_START; if (ioctl(dmxfd[i], DMX_SET_PES_FILTER, &flt) < 0) { if (i == 0) IO_error("DMX_SET_PES_FILTER"); break; } pid ++; filters ++; } // -- ieek, no dmx filters available??? // -- there is something terribly wrong here... - abort if (filters == 0) { pid = MAX_PID+1; // abort criteria for loop } else { // -- calc timeout; // -- on lower pids: higher timeout // -- (e.g. TOT/TDT will be sent within 30 secs) timeout = (opt->timeout_ms) ? opt->timeout_ms : PID_TIMEOUT_LOW; if ( (pid_low) < 0x20) timeout = PID_TIMEOUT_HIGH; if (rescan) out (8,"re-"); out (8,"scanning pid 0x%04x to 0x%04x",pid_low, pid-1); out (9," (got %d dmx filters) ",filters); out_NL (8); // give read a chance to collect _some_ pids usleep ((unsigned long) PID_TIME_WAIT * 1000); pid_found = 0; if (poll(&pfd, 1, timeout) > 0) { if (pfd.revents & POLLIN) { int len; len = read(pfd.fd, buf, sizeof(buf)); if (len >= TS_LEN) { pid_found = analyze_ts_pid (buf, len); } } } // rescan should to be done? if (pid_found) { rescan++; if (rescan > filters ) rescan = 0; // abort rescans (if no TS-PUSI) } else { rescan = 0; } } // if (filters==0) // -- close dmx, filters for (i = 0; i < max_pid_filter; i++) { if (dmxfd[i] >= 0) { ioctl(dmxfd[i], DMX_STOP); // ignore any errors close(dmxfd[i]); dmxfd[i] = -1; } } close(pfd.fd); } while (rescan); // -- output for (i = pid_low; i < pid; i++) { TS_PID *p = pidArray+i; if ( p->count > 0) { out (1,"PID found: %4d (0x%04x) ",i,i); switch (p->type) { case TS_SECTION: out (3,"[SECTION: %s]",dvbstrTableID(p->id) ); break; case TS_PES: out (3,"[PS/PES: %s]",dvbstrPESstream_ID(p->id) ); break; case TS_STUFFING: out (3,"[stuffing]"); break; case TS_ERROR: out (3,"[packet error]"); break; case TS_SCRAMBLED: out (3,"[scrambled]"); break; case TS_UNKNOWN: default: out (3,"[unknown]"); break; } out_NL (1); } } } // while free (dmxfd); free (pidArray); return 0; } static int analyze_ts_pid (u_char *buf, int len) { int i; int pid; int found = 0; // find TS sync byte... // SYNC ...[188 len] ...SYNC... for (i=0; i < len; i++) { if (buf[i] == TS_SYNC_BYTE) { if ((i+TS_LEN) < len) { if (buf[i+TS_LEN] != TS_SYNC_BYTE) continue; } break; } } // $$$ TODO: sync output report? for (; i < len; ) { if (buf[i] == TS_SYNC_BYTE) { TS_PID *pa; pid = getBits (buf, i, 11, 13); pa = (pidArray+pid); pa->count++; if ( (pa->type == TS_NOPID) || (pa->type == TS_UNKNOWN) ) { found = 1; ts_payload_check (buf+i, pid, pa); } i += TS_LEN; } else { i++; // no sync on byte } } return found; } static TS_PID *ts_payload_check (u_char *b, int pid, TS_PID *tspid) { // $$$ TODO speedup by b[1] & 0x80 or & 0x40; int err_bit = getBits (b, 0, 8, 1); int payload_start = getBits (b, 0, 9, 1); int scrambled = getBits (b, 0,24, 2); if (err_bit) { return (TS_PID *) NULL; } if (scrambled) { tspid->type = TS_SCRAMBLED; return tspid; } if (payload_start != 0) { int j; int adaptation_field_ctrl = getBits (b, 0,26, 2); tspid->type = TS_UNKNOWN; j = 4; if (adaptation_field_ctrl & 0x2) j += b[j] + 1; // add adapt.field.len if (adaptation_field_ctrl & 0x1) { if (b[j]==0x00 && b[j+1]==0x00 && b[j+2]==0x01) { // -- PES/PS tspid->type = TS_PES; tspid->id = b[j+3]; } else { // -- section (eval pointer field) int offset = j + b[j] +1; tspid->type = TS_SECTION; tspid->id = b[offset]; } return tspid; } return tspid; } if (pid == 0x1FFF) { tspid->type = TS_STUFFING; return tspid; } return (TS_PID *) NULL; } // $$$ TODO: optional: Pidscan by -tsraw // read full transponder stream and do pid analyzing // currently I do not know if there is any reel improvment by this, // because budget card have a huge amount of filters. // $$$ TODO: problems on twinhan budget card (driver issue/suse9.2?) // to be checked dvbsnoop-1.4.50/src/dvb_api/dmx_tspidbandwidth.c0000744000076400001440000001737710356276720015363 /* $Id: dmx_tspidbandwidth.c,v 1.13 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: dmx_tspidbandwidth.c,v $ Revision 1.13 2006/01/02 18:23:59 rasc just update copyright and prepare for a new public tar ball Revision 1.12 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.11 2005/05/08 23:23:06 rasc display bandwidth average at end of poll Revision 1.10 2005/04/09 10:59:00 rasc bandwidth for transponder pid 0x2000 (untested) (-s bandwidth -tsraw) Revision 1.9 2004/12/07 22:25:10 rasc - New: bad ts packet counter on -s bandwidth (tnx to W.J. Beksi, setabox for basic patch) Revision 1.8 2004/10/12 20:37:47 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.7 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.6 2004/01/11 21:01:31 rasc PES stream directory, PES restructured Revision 1.5 2004/01/02 00:00:37 rasc error output for buffer overflow Revision 1.4 2004/01/01 20:09:23 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.3 2003/12/20 05:44:20 obi - use more exact division, - use unsigned long long for calculations because of overflows on high bandwidth pids, - display kbit/s instead of kb/s to avoid confusion Revision 1.2 2003/12/15 20:09:48 rasc no message Revision 1.1 2003/12/14 23:42:00 rasc new: bandwidth usage reporting for a PID */ #include #include #include #include #include #include "dvbsnoop.h" #include "misc/cmdline.h" #include "misc/output.h" #include "misc/pkt_time.h" #include "misc/sig_abort.h" #include "dvb_api.h" #include "dmx_error.h" #include "dmx_tspidbandwidth.h" /* * some definition */ #define TS_LEN 188 #define TS_SYNC_BYTE 0x47 #define TS_BUF_SIZE (TS_LEN * 2048) /* fix dmx buffer size */ static int sync_ts (u_char *buf, int len); static int ts_error_count (u_char *buf, int len); int ts_pidbandwidth (OPTION *opt) { u_char buf[TS_BUF_SIZE]; struct pollfd pfd; struct dmx_pes_filter_params flt; int dmxfd; struct timeval tv,last_tv, first_tv; int pid; unsigned long long b_total; long b; long packets_bad; long packets_total; struct { // simple struct for storing last average bandwidth unsigned long kb_sec; unsigned long b_sec; } last_avg; if (opt->ts_raw_mode) { pid = PID_FULL_TS; } else { pid = opt->pid; } indent (0); out_nl (2,""); out_nl (2,"---------------------------------------------------------"); out_nl (2,"PID bandwidth statistics..."); if (opt->ts_raw_mode) { out (2,"Full Transponder"); } else { out (2,"PID: %u (0x%04x)", pid, pid); } if (opt->rd_packet_count != 0) { out (2," - max packet count: %ld ", opt->rd_packet_count); } out_nl (2,""); out_nl (2,"---------------------------------------------------------"); // -- open DVR device for reading pfd.events = POLLIN | POLLPRI; if((pfd.fd = open(opt->devDvr,O_RDONLY|O_NONBLOCK)) < 0){ IO_error(opt->devDvr); return -1; } if ((dmxfd=open(opt->devDemux,O_RDWR)) < 0) { IO_error(opt->devDemux); close(pfd.fd); return -1; } ioctl (dmxfd,DMX_SET_BUFFER_SIZE, sizeof(buf)); flt.pid = pid; flt.input = DMX_IN_FRONTEND; flt.output = DMX_OUT_TS_TAP; flt.pes_type = DMX_PES_OTHER; flt.flags = DMX_IMMEDIATE_START; if (ioctl(dmxfd, DMX_SET_PES_FILTER, &flt) < 0) { IO_error("DMX_SET_PES_FILTER"); close(pfd.fd); close(dmxfd); return -1; } gettimeofday (&first_tv, NULL); last_tv.tv_sec = first_tv.tv_sec; last_tv.tv_usec = first_tv.tv_usec; b_total = 0; packets_total = 0; packets_bad = 0; while ( !isSigAbort() ) { int b_len, b_start; // -- we will poll the PID in 2 secs intervall int timeout = 2000; b_len = 0; b_start = 0; if (poll(&pfd, 1, timeout) > 0) { if (pfd.revents & POLLIN) { b_len = read(pfd.fd, buf, sizeof(buf)); gettimeofday (&tv, NULL); if (b_len >= TS_LEN) { b_start = sync_ts (buf, b_len); } else { b_len = 0; } b = b_len - b_start; if (b == 0) continue; if (b < 0) { IO_error("read"); continue; } b_total += b; // -- calc bandwidth { unsigned long long bit_s; long d_tim_ms; int packets; packets = b/TS_LEN; packets_total += packets; // output on different verbosity levels // -- current bandwidth d_tim_ms = delta_time_ms (&tv, &last_tv); if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs out (3, "packets read: %3d/(%ld) d_time: %2ld.%03ld s = ", packets, packets_total, d_tim_ms / 1000UL, d_tim_ms % 1000UL); // -- current bandwidth in kbit/sec // --- cast to unsigned long long so it doesn't overflow as // --- early, add time / 2 before division for correct rounding bit_s = (((unsigned long long)b * 8000ULL) + ((unsigned long long)d_tim_ms / 2ULL)) / (unsigned long long)d_tim_ms; out (1, "%5llu.%03llu kbit/s", bit_s / 1000ULL, bit_s % 1000ULL); // -- average bandwidth d_tim_ms = delta_time_ms (&tv,&first_tv); if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs bit_s = ((b_total * 8000ULL) + ((unsigned long long)d_tim_ms / 2ULL)) / (unsigned long long)d_tim_ms; last_avg.kb_sec = (unsigned long) (bit_s / 1000ULL); last_avg.b_sec = (unsigned long) (bit_s % 1000ULL); out (2, " (Avrg: %5lu.%03lu kbit/s)", last_avg.kb_sec, last_avg.b_sec); // -- bad packet(s) check in buffer { int bp; bp = ts_error_count (buf+b_start, b); packets_bad += bp; out (4, " [bad: %d]", bp); } out_NL (1); } last_tv.tv_sec = tv.tv_sec; last_tv.tv_usec = tv.tv_usec; // count packets ? if (opt->rd_packet_count > 0) { opt->rd_packet_count -= b/TS_LEN; if (opt->rd_packet_count <= 0) break; } } } } // -- packets stats out (4, "## "); if (opt->ts_raw_mode) { out (2,"PID: "); } else { out (2,"PID: %u (0x%04x)", pid, pid); } out (4, " bad/total packets: %ld/%ld (= %1.1Lf%%)", packets_bad, packets_total, (((long double) packets_bad)*100)/packets_total ); out (4, " Avrg: %5lu.%03lu kbit/s", last_avg.kb_sec, last_avg.b_sec); out_NL(4); if (ioctl(dmxfd, DMX_STOP) < 0) { IO_error("DMX_STOP"); } close(dmxfd); close(pfd.fd); return 0; } // // -- sync TS stream (if not already done by firmware) // static int sync_ts (u_char *buf, int len) { int i; // find TS sync byte... // SYNC ...[188 len] ...SYNC... for (i=0; i < len; i++) { if (buf[i] == TS_SYNC_BYTE) { if ((i+TS_LEN) < len) { if (buf[i+TS_LEN] != TS_SYNC_BYTE) continue; } break; } } return i; } // // count error packets (ts error bit set, if passed thru by firmware) // we are checking a synced buffer with 1..n TS packets // so, we have to check every TS_LEN the error bit // return: error count // static int ts_error_count (u_char *buf, int len) { int error_count = 0; while (len > 0) { // check = getBits(buf, 0, 8, 1); if (*(buf+1) & 0x80) error_count++; len -= TS_LEN; buf += TS_LEN; } return error_count; } // // $$$ TODO: TS continuity_counter check, if passed thru by firmware // t.continuity_counter = getBits (b, 0,28, 4); // // $$$ TODO: distinguish between TS bandwidth an payload bandwidth... // dvbsnoop-1.4.50/src/dvb_api/dmx_error.c0000744000076400001440000000161410354356244013465 /* $Id: dmx_error.c,v 1.3 2005/12/27 23:30:27 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- simple error output for DMX & file I/O $Log: dmx_error.c,v $ Revision 1.3 2005/12/27 23:30:27 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.2 2004/01/25 22:36:52 rasc minor changes & enhancments Revision 1.1 2004/01/02 00:00:37 rasc error output for buffer overflow */ #include #include #include int IO_error (char *str) { char *s; int err; s = (str) ? str : ""; err = errno; switch (err) { case EOVERFLOW: fprintf (stderr, "Error(%d): %s: Buffer overflow, stream bandwidth to high\n", err,s); break; default: fprintf (stderr,"Error(%d): ",err); perror(s); break; } return err; } dvbsnoop-1.4.50/src/dvb_api/fe_signal.c0000744000076400001440000001060110356276720013411 /* $Id: fe_signal.c,v 1.17 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Signal Statistics Current Frequency/Transponder -- DVB-API $Log: fe_signal.c,v $ Revision 1.17 2006/01/02 18:23:59 rasc just update copyright and prepare for a new public tar ball Revision 1.16 2005/09/18 12:23:23 rasc no message Revision 1.15 2005/09/13 18:41:15 rasc ... revert cygwin stuff Revision 1.14 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.13 2005/08/13 00:06:56 rasc no message Revision 1.12 2004/10/12 20:37:47 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.11 2004/04/05 17:32:13 rasc mass typo fix adaption --> adaptation Revision 1.10 2004/03/21 13:20:07 rasc more -feinfo, some restructs on FE code Revision 1.9 2004/03/21 00:37:47 rasc Query FrontEnd Info (option: -s feinfo) Revision 1.8 2004/03/06 22:33:11 rasc no message Revision 1.7 2004/02/28 12:13:03 rasc minor stuff Revision 1.6 2004/01/06 20:35:14 rasc no message Revision 1.5 2004/01/06 20:06:36 rasc revert a change for -s signal + small adaptations (frontend.h uses enums instead of #defines, so commit didn't work...) Revision 1.4 2004/01/05 02:03:42 rasc no message Revision 1.3 2004/01/04 22:03:21 rasc time for a version leap Revision 1.2 2004/01/03 16:40:12 rasc no message Revision 1.1 2004/01/03 15:40:45 rasc simple frontend signal status query added "-s signal" */ #include #include #include #include #include "dvbsnoop.h" #include "fe_signal.h" #include "fe_misc.h" #include "misc/cmdline.h" #include "misc/output.h" #include "misc/pkt_time.h" #include "misc/sig_abort.h" #include "dmx_error.h" #include "dvb_api.h" int do_SignalStrength (OPTION *opt) { int fd_fe = 0; struct timeval tv,last_tv, first_tv; u_long count; FE_SIGNAL s; FE_SIG_CAP has; if (opt->inpPidFile) { fprintf (stderr,"Error: FileMode not supported...\n"); return -1; } if((fd_fe = open(opt->devFE,O_RDONLY)) < 0){ IO_error(opt->devFE); return -1; } // -- check capabilities has.ber = capability_Check (fd_fe, FE_READ_BER); has.snr = capability_Check (fd_fe, FE_READ_SNR); has.strength = capability_Check (fd_fe, FE_READ_SIGNAL_STRENGTH); has.status = capability_Check (fd_fe, FE_READ_STATUS); has.ublocks = capability_Check (fd_fe, FE_READ_UNCORRECTED_BLOCKS); indent (0); out_NL (2); out_nl (2,"---------------------------------------------------------"); out_nl (2,"Transponder/Frequency signal strength statistics..."); if (opt->rd_packet_count > 0) { out_nl (2,"max cycle count: %ld ", opt->rd_packet_count); } out_nl (9,"Capabilities: BER: %d SNR: %d SIG: %d STAT: %d UBLK: %d", has.ber, has.snr, has.strength, has.status, has.ublocks); out_nl (2,"---------------------------------------------------------"); gettimeofday (&first_tv, NULL); last_tv.tv_sec = first_tv.tv_sec; last_tv.tv_usec = first_tv.tv_usec; count = 0; while ( !isSigAbort() ) { int err; int d_tim_ms; count++; out (6, "cycle: %lu ",count); gettimeofday (&tv, NULL); d_tim_ms = delta_time_ms (&tv, &last_tv); if (d_tim_ms <= 0) d_tim_ms = 1; // ignore usecs last_tv.tv_sec = tv.tv_sec; last_tv.tv_usec = tv.tv_usec; out (6, "d_time: %ld.%03ld s ", d_tim_ms / 1000UL, d_tim_ms % 1000UL); err = read_Signal (fd_fe, &s, &has); if (err == -1) return -1; // if (err == -2) { // out_nl (1," No signal..."); // continue; // } // & 0xFFFF necessary, due to interface transformations?? if (has.strength) out (1,"Sig: %u ", s.strength & 0xFFFFL); if (has.snr) out (2,"SNR: %u ", s.snr & 0xFFFFL); if (has.ber) out (3,"BER: %lu ",s.ber); if (has.ublocks) out (4,"UBLK: %ld ",s.ublocks); if (has.status) { out (4,"Stat: 0x%02x ",s.status); out_status_detail (5,s.status); } out_NL(1); if (opt->timeout_ms) usleep (opt->timeout_ms * 1000); if (d_tim_ms == 0) usleep (1000); // don't kill the system // count cycles? ? if (opt->rd_packet_count && (opt->rd_packet_count <= count)) break; } // while close(fd_fe); return 0; } dvbsnoop-1.4.50/src/dvb_api/fe_info.c0000744000076400001440000000354610356276720013101 /* $Id: fe_info.c,v 1.7 2006/01/02 18:23:59 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- FrontProcessor Info -- DVB-API $Log: fe_info.c,v $ Revision 1.7 2006/01/02 18:23:59 rasc just update copyright and prepare for a new public tar ball Revision 1.6 2005/08/11 21:53:49 rasc minor changes, man page Revision 1.5 2004/03/27 22:34:03 rasc - frontend info current parameters Revision 1.4 2004/03/21 18:02:45 rasc corrections Revision 1.3 2004/03/21 13:20:07 rasc more -feinfo, some restructs on FE code Revision 1.2 2004/03/21 00:40:40 rasc no message Revision 1.1 2004/03/21 00:38:45 rasc Query FrontEnd Info (option: -s feinfo) */ #include #include #include #include "dvbsnoop.h" #include "fe_info.h" #include "fe_misc.h" #include "misc/cmdline.h" #include "misc/output.h" #include "dmx_error.h" #include "dvb_api.h" #if DVB_API_VERSION == 1 // -- not supported in DVB-API 1 int do_FE_Info (OPTION *opt) { fprintf (stderr,"FE_info function not supported in DVB-API 1\n"); return 1; } #else int do_FE_Info (OPTION *opt) { int fd_fe = 0; if (opt->inpPidFile) { fprintf (stderr,"Error: FileMode not possible...\n"); return -1; } if((fd_fe = open(opt->devFE,O_RDONLY)) < 0){ IO_error(opt->devFE); return -1; } indent (0); out_NL (2); out_nl (2,"---------------------------------------------------------"); out_nl (2,"FrontEnd Info..."); out_nl (2,"---------------------------------------------------------"); out_NL (2); out_nl (2,"Device: %s",opt->devFE); out_NL (2); print_FE_BasicCapabilities (3, fd_fe); print_FE_CurrentParameters (2, fd_fe); close(fd_fe); return 0; } #endif // DVB-API Check dvbsnoop-1.4.50/src/dvb_api/fe_misc.c0000744000076400001440000003220210402003250013042 /* $Id: fe_misc.c,v 1.10 2006/03/03 01:51:13 obi Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- FrontEnd routines... -- DVB-API 3 (3.1) $Log: fe_misc.c,v $ Revision 1.10 2006/03/03 01:51:13 obi use same unit for frequency tolerance as for min, max and stepsize Revision 1.9 2006/01/02 18:23:59 rasc just update copyright and prepare for a new public tar ball Revision 1.8 2005/08/22 22:37:59 rasc ATSC frontend info Revision 1.7 2005/08/13 00:06:56 rasc no message Revision 1.6 2004/08/22 22:11:57 rasc no message Revision 1.5 2004/08/22 22:07:48 rasc - Fix: nit.h got lost in Makefile ifdefs for special DVB-API parameters Revision 1.4 2004/04/01 23:02:10 rasc clear structures in cases these are not completly filled... Revision 1.3 2004/03/27 22:34:03 rasc - frontend info current parameters Revision 1.2 2004/03/21 18:02:45 rasc corrections Revision 1.1 2004/03/21 13:20:07 rasc more -feinfo, some restructs on FE code */ #include #include #include #include "dvbsnoop.h" #include "fe_misc.h" #include "misc/output.h" #include "dmx_error.h" #include "dvb_api.h" /* * check capability of device function * return: 0/1 (has_capability) */ int capability_Check (int f, int cap) { u_long dummy; if (ioctl(f,cap,&dummy) < 0) { if (errno == ENOSYS) return 0; } return 1; } /* * -- read signal strength parameter */ int read_Signal(int f, FE_SIGNAL *s, FE_SIG_CAP *cap) { int err = 0; s->strength = 0; s->ber = 0xFFFFFFFF; s->snr = 0; s->status = 0; s->ublocks = 0; if (cap->strength) { err = ioctl(f,FE_READ_SIGNAL_STRENGTH,&s->strength); } if (cap->ber && ! err) { err = ioctl(f,FE_READ_BER,&s->ber); } if (cap->snr && ! err) { err = ioctl(f,FE_READ_SNR,&s->snr); } if (cap->status && ! err) { err = ioctl(f,FE_READ_STATUS,&s->status); } if (cap->ublocks && ! err) { err = ioctl(f,FE_READ_UNCORRECTED_BLOCKS,&s->ublocks); } if (err < 0) { // if (errno == ENOSIGNAL) return -2; IO_error ("frontend ioctl"); return -1; } return 0; } /* -- DVI-API Frontend Status Flags -> verbose -- we do this API independent per flag... -- see history of dvb_api docs */ void out_status_detail (int v,fe_status_t s) { out (v,"["); #if DVB_API_VERSION == 1 if (s & FE_HAS_SIGNAL) out (v,"SIG "); if (s & FE_HAS_LOCK) out (v,"LOCK "); if (s & FE_SPECTRUM_INV)out (v,"INV "); #else if (s & FE_HAS_SIGNAL) out (v,"SIG "); if (s & FE_HAS_CARRIER) out (v,"CARR "); if (s & FE_HAS_VITERBI) out (v,"VIT "); if (s & FE_HAS_SYNC) out (v,"SYNC "); if (s & FE_HAS_LOCK) out (v,"LOCK "); if (s & FE_TIMEDOUT) out (v,"TIMOUT "); if (s & FE_REINIT) out (v,"REINIT "); #endif out (v,"]"); } // Annotation: // // DVB_API 3: // FE_HAS_SIGNAL = 0x01, /* found something above the noise level // FE_HAS_CARRIER = 0x02, /* found a DVB signal */ // FE_HAS_VITERBI = 0x04, /* FEC is stable */ // FE_HAS_SYNC = 0x08, /* found sync bytes */ // FE_HAS_LOCK = 0x10, /* everything's working... */ // FE_TIMEDOUT = 0x20, /* no lock within the last 2 seconds // FE_REINIT = 0x40 /* frontend was reinitialized, */ // // DVB_API: 1 // FE_HAS_POWER = 0x01 the frontend is powered up and is ready to be used // FE_HAS_SIGNAL = 0x02 the frontend detects a signal above the normal noise level // FE_SPECTRUM_INV = 0x04 spectrum inversion is enabled/was necessary for lock // FE_HAS_LOCK = 0x08 frontend successfully locked to a DVB signal // TUNER_HAS_LOCK = 0x80 the tuner has a frequency lock #if DVB_API_VERSION != 1 /* * -- print_FE_BasicCapabilities */ int print_FE_BasicCapabilities (int v, int fd_fe) { int err; u_long d; struct dvb_frontend_info fi; out_nl (v,"Basic capabilities:"); indent(+1); err = read_FEInfo(fd_fe, &fi); if (err) return 1; fi.name[127] = '\0'; // be save... out_nl (v,"Name: \"%s\"",fi.name); { char *s; char *sf; s = ""; sf = ""; switch (fi.type) { case FE_QPSK: s = "QPSK (DVB-S)"; sf = "MHz"; break; case FE_QAM: s = "QAM (DVB-C)"; sf = "kHz"; break; case FE_OFDM: s = "OFDM (DVB-T)"; sf = "kHz"; break; #ifdef FE_ATSC // API 3.1 case FE_ATSC: s = " VSB/QAM (ATSC)"; sf = "khz"; break; // (QAM | VSB) -> VSB_param #endif default: s = "unkonwn"; break; } out_nl (v,"Frontend-type: %s", s); out_nl (v,"Frequency (min): %d.%03d %s", fi.frequency_min / 1000, fi.frequency_min % 1000, sf); out_nl (v,"Frequency (max): %d.%03d %s", fi.frequency_max / 1000, fi.frequency_max % 1000, sf); out_nl (v,"Frequency stepsiz: %d.%03d %s", fi.frequency_stepsize / 1000, fi.frequency_stepsize % 1000, sf); out_nl (v,"Frequency tolerance: %d.%03d %s", fi.frequency_tolerance / 1000, fi.frequency_tolerance % 1000, sf); } d = 1000000L; out_nl (v,"Symbol rate (min): %d.%06d MSym/s", fi.symbol_rate_min / d, fi.symbol_rate_min % d); out_nl (v,"Symbol rate (max): %d.%06d MSym/s", fi.symbol_rate_max / d, fi.symbol_rate_max % d); out_nl (v,"Symbol rate tolerance: %d ppm", fi.symbol_rate_tolerance); out_nl (v,"Notifier delay: %d ms", fi.notifier_delay); out_nl (v,"Frontend capabilities:"); indent (+1); if (fi.caps == FE_IS_STUPID) out_nl (v,"stupid FE"); if (fi.caps & FE_CAN_INVERSION_AUTO) out_nl (v,"auto inversion"); if (fi.caps & FE_CAN_FEC_1_2) out_nl (v,"FEC 1/2"); if (fi.caps & FE_CAN_FEC_2_3) out_nl (v,"FEC 2/3"); if (fi.caps & FE_CAN_FEC_3_4) out_nl (v,"FEC 3/4"); if (fi.caps & FE_CAN_FEC_4_5) out_nl (v,"FEC 4/5"); if (fi.caps & FE_CAN_FEC_5_6) out_nl (v,"FEC 5/6"); if (fi.caps & FE_CAN_FEC_6_7) out_nl (v,"FEC 6/7"); if (fi.caps & FE_CAN_FEC_7_8) out_nl (v,"FEC 7/8"); if (fi.caps & FE_CAN_FEC_AUTO) out_nl (v,"FEC AUTO"); if (fi.caps & FE_CAN_QPSK) out_nl (v,"QPSK"); if (fi.caps & FE_CAN_QAM_16) out_nl (v,"QAM 16"); if (fi.caps & FE_CAN_QAM_32) out_nl (v,"QAM 32"); if (fi.caps & FE_CAN_QAM_64) out_nl (v,"QAM 64"); if (fi.caps & FE_CAN_QAM_128) out_nl (v,"QAM 128"); if (fi.caps & FE_CAN_QAM_256) out_nl (v,"QAM 256"); if (fi.caps & FE_CAN_QAM_AUTO) out_nl (v,"QAM AUTO"); if (fi.caps & FE_CAN_TRANSMISSION_MODE_AUTO) out_nl (v,"auto transmission mode"); if (fi.caps & FE_CAN_BANDWIDTH_AUTO) out_nl (v,"auto bandwidth"); if (fi.caps & FE_CAN_GUARD_INTERVAL_AUTO) out_nl (v,"auto guard interval"); if (fi.caps & FE_CAN_HIERARCHY_AUTO) out_nl (v,"auto hierarchy"); #ifdef FE_CAN_CLEAN_SETUP if (fi.caps & FE_CAN_CLEAN_SETUP) out_nl (v,"clean setup"); #endif #ifdef FE_CAN_16VSB if (fi.caps & FE_CAN_8VSB) out_nl (v,"FE_CAN_8VSB"); if (fi.caps & FE_CAN_16VSB) out_nl (v,"FE_CAN_16VSB"); #endif #ifdef FE_NEEDS_BENDING if (fi.caps & FE_NEEDS_BENDING) out_nl (v,"FE_NEEDS_BENDING"); #endif #ifdef FE_CAN_RECOVER if (fi.caps & FE_CAN_RECOVER) out_nl (v,"FE_CAN_RECOVER"); #endif #ifdef FE_CAN_MUTE_TS if (fi.caps & FE_CAN_MUTE_TS) out_nl (v,"FE_CAN_MUTE_TS"); #endif indent (-1); out_NL(v); indent (-1); return 0; } /* * -- print_FE_CurrentParameters */ int print_FE_CurrentParameters (int v, int fd_fe) { int err; struct dvb_frontend_parameters p; fe_type_t fe_typ; char *s; out_nl (v,"Current parameters:"); indent(+1); fe_typ = read_FEType(fd_fe); err = read_FEParam(fd_fe, &p); if (err) return 1; out_nl (v,"Frequency: %d.%03d %s", p.frequency / 1000, p.frequency % 1000, (fe_typ == QPSK) ? "MHz" : "kHz"); s = "unknown"; switch (p.inversion) { case INVERSION_OFF: s = "OFF"; break; case INVERSION_ON: s = "ON"; break; case INVERSION_AUTO: s = "AUTO"; break; } out_nl (v,"Inversion: %s", s); switch (fe_typ) { case FE_QPSK: print_FE_QPSK_param (v,p.u.qpsk); break; case FE_QAM: print_FE_QAM_param (v,p.u.qam); break; case FE_OFDM: print_FE_OFDM_param (v,p.u.ofdm); break; #ifdef FE_ATSC case FE_ATSC: print_FE_VSB_param (v,p.u.vsb); break; // also for ATSC QAM #endif } indent(-1); out_NL(v); return 0; } /* * -- print_FE QPSK parameters */ void print_FE_QPSK_param (int v, struct dvb_qpsk_parameters qp) { u_long d; d = 1000000L; out_nl (v,"Symbol rate: %d.%06d MSym/s", qp.symbol_rate / d, qp.symbol_rate % d); out_nl (v,"FEC: %s", festr_FE_code_rate (qp.fec_inner)); } /* * -- print_FE QAM parameters */ void print_FE_QAM_param (int v, struct dvb_qam_parameters qp) { u_long d; d = 1000000L; out_nl (v,"Symbol rate: %d.%06d MSym/s", qp.symbol_rate / d, qp.symbol_rate % d); out_nl (v,"FEC: %s", festr_FE_code_rate (qp.fec_inner)); out_nl (v,"Modulation: %s", festr_FE_modulation (qp.modulation)); } /* * -- print_FE OFDM parameters */ void print_FE_OFDM_param (int v, struct dvb_ofdm_parameters op) { out_nl (v,"Bandwidth: %s", festr_FE_bandwidth (op.bandwidth)); out_nl (v,"Stream code rate (hi prio): %s", festr_FE_code_rate (op.code_rate_HP)); out_nl (v,"Stream code rate (lo prio): %s", festr_FE_code_rate (op.code_rate_LP)); out_nl (v,"Modulation: %s", festr_FE_modulation (op.constellation)); out_nl (v,"Transmission mode: %s", festr_FE_transmit_mode (op.transmission_mode)); out_nl (v,"Guard interval: %s", festr_FE_guard_interval (op.guard_interval)); out_nl (v,"Hierarchy: %s", festr_FE_hierarchy (op.hierarchy_information)); } /* * -- print_FE vsb parameters */ #ifdef FE_ATSC void print_FE_VSB_param (int v, struct dvb_vsb_parameters vsb) { out_nl (v,"Modulation: %s", festr_FE_modulation (vsb.modulation)); } #endif // // ---------------------------------------------------------------------- // /* * -- get_FEType * -- returns: fe_type_t (FE_QPSK, FE_QAM, FE_OFDM) */ fe_type_t read_FEType(int f) { struct dvb_frontend_info fi; memset (&fi, 0, sizeof(struct dvb_frontend_info)); read_FEInfo(f, &fi); return fi.type; } /* * -- read frontend info */ int read_FEInfo(int f, struct dvb_frontend_info *fi) { int err = 0; memset (fi, 0, sizeof(struct dvb_frontend_info)); err = ioctl(f, FE_GET_INFO, fi); if (err < 0) { IO_error ("frontend ioctl"); return -1; } return 0; } /* * -- read effective frontend params */ int read_FEParam(int f, struct dvb_frontend_parameters *p) { int err = 0; memset (p, 0, sizeof(struct dvb_frontend_parameters)); err = ioctl(f, FE_GET_FRONTEND, p); if (err < 0) { IO_error ("frontend ioctl"); return -1; } return 0; } // // ---------------------------------------------------------------------- // /* * -- FE strings... */ const char *festr_FE_code_rate (fe_code_rate_t fec) { const char *s = ""; switch (fec) { case FEC_NONE: s = "none"; break; case FEC_1_2: s = "FEC 1/2"; break; case FEC_2_3: s = "FEC 2/3"; break; case FEC_3_4: s = "FEC 3/4"; break; case FEC_4_5: s = "FEC 4/5"; break; case FEC_5_6: s = "FEC 5/6"; break; case FEC_6_7: s = "FEC 6/7"; break; case FEC_7_8: s = "FEC 7/8"; break; case FEC_8_9: s = "FEC 8/9"; break; case FEC_AUTO: s = "FEC AUTO"; break; } return s; } const char *festr_FE_modulation (fe_modulation_t modulation) { const char *s = ""; switch (modulation) { case QPSK: s = "QPSK"; break; case QAM_16: s = "QAM 16"; break; case QAM_32: s = "QAM 32"; break; case QAM_64: s = "QAM 64"; break; case QAM_128: s = "QAM 128"; break; case QAM_256: s = "QAM 256"; break; case QAM_AUTO: s = "QAM AUTO"; break; #ifdef VSB_16 case VSB_8: s = "VSB 8"; break; case VSB_16: s = "VSB 16"; break; #endif } return s; } const char *festr_FE_bandwidth (fe_bandwidth_t bandwidth) { const char *s = ""; switch (bandwidth) { case BANDWIDTH_8_MHZ: s = "8 MHz"; break; case BANDWIDTH_7_MHZ: s = "7 MHz"; break; case BANDWIDTH_6_MHZ: s = "6 MHz"; break; case BANDWIDTH_AUTO: s = "AUTO"; break; } return s; } const char *festr_FE_transmit_mode (fe_transmit_mode_t transmit_mode) { const char *s = ""; switch (transmit_mode) { case TRANSMISSION_MODE_2K: s = "2k mode"; break; case TRANSMISSION_MODE_8K: s = "8k mode"; break; case TRANSMISSION_MODE_AUTO: s = "auto"; break; } return s; } const char *festr_FE_guard_interval (fe_guard_interval_t guard_interval) { const char *s = ""; switch (guard_interval) { case GUARD_INTERVAL_1_32: s = "1/32"; break; case GUARD_INTERVAL_1_16: s = "1/16"; break; case GUARD_INTERVAL_1_8: s = "1/8"; break; case GUARD_INTERVAL_1_4: s = "1/4"; break; case GUARD_INTERVAL_AUTO: s = "auto"; break; } return s; } const char *festr_FE_hierarchy (fe_hierarchy_t hierarchy) { const char *s = ""; switch (hierarchy) { case HIERARCHY_NONE: s = "none"; break; case HIERARCHY_1: s = "1"; break; case HIERARCHY_2: s = "2"; break; case HIERARCHY_4: s = "4"; break; case HIERARCHY_AUTO: s = "auto"; break; } return s; } #endif dvbsnoop-1.4.50/src/pes/0000777000076400001440000000000010630324343010554 5dvbsnoop-1.4.50/src/pes/pespacket.h0000744000076400001440000000062010356276734012636 /* $Id: pespacket.h,v 1.11 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PESPACKET_H__ #define __PESPACKET_H__ void processPS_PES_packet (u_int pid, long pkt_nr, u_char *buf, int len); void decodePS_PES_packet (u_char *b, u_int len, int pid); #endif dvbsnoop-1.4.50/src/pes/pes_std.h0000744000076400001440000000050310356276734012320 /* $Id: pes_std.h,v 1.4 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_STD_H__ #define __PES_STD_H__ void PES_decode_std (u_char *b, int len, u_int PES_streamID); #endif dvbsnoop-1.4.50/src/pes/pes_dsmcc.h0000744000076400001440000000037410356276024012615 /* DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_DSMCC_H__ #define __PES_DSMCC_H__ void PES_decodeDSMCC (u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/pes_psm.h0000744000076400001440000000036610356275300012320 /* DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_PSM_H__ #define __PES_PSM_H__ void PES_decodePSM (u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/pes_psdir.h0000744000076400001440000000037310356275306012646 /* DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_PSDIR_H__ #define __PES_PSDIR_H__ void PES_decodePSDIR (u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/pes_data.h0000744000076400001440000000047710356276734012451 /* $Id: pes_data.h,v 1.4 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_DATA_H #define __PES_DATA_H void PES_decodeDATA_private_stream_1 (u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/pes_data_sync.h0000744000076400001440000000050310356276734013473 /* $Id: pes_data_sync.h,v 1.3 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_DATA_SYNC_H #define __PES_DATA_SYNC_H void PES_decodeDATA_SYNC (u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/pes_data_ebu.h0000744000076400001440000000050310356276734013272 /* $Id: pes_data_ebu.h,v 1.3 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_DATA_EBU_H #define __PES_DATA_EBU_H void PES_decodeDATA_EBU_etc (u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/pes_misc.h0000744000076400001440000000052210356276734012462 /* $Id: pes_misc.h,v 1.4 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PES_MISC_H__ #define __PES_MISC_H__ void print_xTS_field (int v, const char *str, u_char *b, int bit_offset); #endif dvbsnoop-1.4.50/src/pes/mpeg_packheader.h0000744000076400001440000000051610356276734013762 /* $Id: mpeg_packheader.h,v 1.2 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __MPEG_PACK_HEADER__ #define __MPEG_PACK_HEADER__ void mpeg_pack_header (int v, u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/mpeg_sysheader.h0000744000076400001440000000051510356276734013661 /* $Id: mpeg_sysheader.h,v 1.2 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __MPEG_SYS_HEADER__ #define __MPEG_SYS_HEADER__ void mpeg_system_header (int v, u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/mpeg2_video.h0000744000076400001440000000243610354356246013061 /* $Id: mpeg2_video.h,v 1.3 2005/12/27 23:30:29 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __MPEG2_VIDEO__ #define __MPEG2_VIDEO__ void MPEG2_decodeSequenceEnd (int v, u_char *b, int len); void MPEG2_decodeUserData (int v, u_char *b, int len); void MPEG2_decodeGroupOfPictures (int v, u_char *b, int len); void MPEG2_decodeSequenceHeader (int v, u_char *b, int len); void MPEG2_decodePictureHeader (int v, u_char *b, int len); void MPEG2_decodeExtension (int v, u_char *b, int len); void MPEG2_decodeSequenceExtension (int v, u_char *b, int len); void MPEG2_decodeSequenceDisplayExtension (int v, u_char *b, int len); void MPEG2_decodeSequenceScalableExtension (int v, u_char *b, int len); void MPEG2_decodePictureCodingExtension (int v, u_char *b, int len); void MPEG2_decodeQuantMatrixExtension (int v, u_char *b, int len); void MPEG2_decodePictureDisplayExtension (int v, u_char *b, int len); void MPEG2_decodePictureTemporalScalableExtension (int v, u_char *b, int len); void MPEG2_decodePictureSpatialScalableExtension (int v, u_char *b, int len); void MPEG2_decodeCopyrightExtension (int v, u_char *b, int len); void MPEG2_decodeSlice (int v, u_char *b, int len); #endif dvbsnoop-1.4.50/src/pes/Makefile.am0000744000076400001440000000075610334470334012540 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libpes.a noinst_HEADERS = \ pespacket.h \ pes_std.h \ pes_dsmcc.h \ pes_psm.h \ pes_psdir.h \ pes_data.h \ pes_data_sync.h \ pes_data_ebu.h \ pes_misc.h \ mpeg_packheader.h \ mpeg_sysheader.h \ mpeg2_video.h libpes_a_SOURCES = \ pespacket.c \ pes_std.c \ pes_dsmcc.c \ pes_psm.c \ pes_psdir.c \ pes_data.c \ pes_data_sync.c \ pes_data_ebu.c \ pes_misc.c \ mpeg_packheader.c \ mpeg_sysheader.c \ mpeg2_video.c dvbsnoop-1.4.50/src/pes/Makefile.in0000644000076400001440000003175510630302143012542 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libpes_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/pes DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libpes_a_AR = $(AR) $(ARFLAGS) libpes_a_LIBADD = am_libpes_a_OBJECTS = pespacket.$(OBJEXT) pes_std.$(OBJEXT) \ pes_dsmcc.$(OBJEXT) pes_psm.$(OBJEXT) pes_psdir.$(OBJEXT) \ pes_data.$(OBJEXT) pes_data_sync.$(OBJEXT) \ pes_data_ebu.$(OBJEXT) pes_misc.$(OBJEXT) \ mpeg_packheader.$(OBJEXT) mpeg_sysheader.$(OBJEXT) \ mpeg2_video.$(OBJEXT) libpes_a_OBJECTS = $(am_libpes_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/mpeg2_video.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpeg_packheader.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpeg_sysheader.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pes_data.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pes_data_ebu.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pes_data_sync.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pes_dsmcc.Po ./$(DEPDIR)/pes_misc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pes_psdir.Po ./$(DEPDIR)/pes_psm.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pes_std.Po ./$(DEPDIR)/pespacket.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libpes_a_SOURCES) DIST_SOURCES = $(libpes_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libpes.a noinst_HEADERS = \ pespacket.h \ pes_std.h \ pes_dsmcc.h \ pes_psm.h \ pes_psdir.h \ pes_data.h \ pes_data_sync.h \ pes_data_ebu.h \ pes_misc.h \ mpeg_packheader.h \ mpeg_sysheader.h \ mpeg2_video.h libpes_a_SOURCES = \ pespacket.c \ pes_std.c \ pes_dsmcc.c \ pes_psm.c \ pes_psdir.c \ pes_data.c \ pes_data_sync.c \ pes_data_ebu.c \ pes_misc.c \ mpeg_packheader.c \ mpeg_sysheader.c \ mpeg2_video.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/pes/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/pes/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libpes.a: $(libpes_a_OBJECTS) $(libpes_a_DEPENDENCIES) -rm -f libpes.a $(libpes_a_AR) libpes.a $(libpes_a_OBJECTS) $(libpes_a_LIBADD) $(RANLIB) libpes.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg2_video.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg_packheader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg_sysheader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_data_ebu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_data_sync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_dsmcc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_psdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_psm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pes_std.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pespacket.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/pes/pespacket.c0000744000076400001440000002273610356276734012645 /* $Id: pespacket.c,v 1.37 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES Decoding $Log: pespacket.c,v $ Revision 1.37 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.36 2005/12/27 23:30:29 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.35 2005/11/23 23:06:10 rasc ISO13818-2 MPEG2 sequence header Revision 1.34 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.33 2005/11/08 23:15:25 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.32 2005/10/20 22:25:07 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.31 2005/09/06 23:58:50 rasc typo fix Revision 1.30 2005/09/06 23:32:04 rasc no message Revision 1.29 2005/09/06 23:13:52 rasc catch OS signals (kill ...) for smooth program termination Revision 1.28 2005/09/02 14:11:35 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.27 2005/08/10 21:28:18 rasc New: Program Stream handling (-s ps) Revision 1.26 2005/01/17 19:41:23 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.25 2004/08/24 21:30:22 rasc more Metadata Revision 1.24 2004/04/15 03:38:51 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.23 2004/02/09 22:57:00 rasc Bugfix VBI Data descriptor Revision 1.22 2004/02/02 23:34:08 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff Revision 1.21 2004/01/22 22:26:35 rasc pes_pack_header section read timeout Revision 1.20 2004/01/11 22:49:41 rasc PES restructured Revision 1.19 2004/01/11 21:01:32 rasc PES stream directory, PES restructured Revision 1.18 2004/01/02 16:40:38 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.17 2004/01/02 00:00:41 rasc error output for buffer overflow Revision 1.16 2004/01/01 20:09:29 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.15 2003/12/27 14:35:01 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.14 2003/12/17 23:15:04 rasc PES DSM-CC ack and control commands according ITU H.222.0 Annex B Revision 1.13 2003/11/26 19:55:33 rasc no message Revision 1.12 2003/11/26 16:27:47 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.11 2003/11/24 23:52:17 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.10 2003/11/09 20:48:35 rasc pes data packet (DSM-CC) Revision 1.9 2003/11/01 17:05:47 rasc no message Revision 1.8 2003/10/29 22:39:18 rasc pes packet complete now... Revision 1.7 2003/10/29 20:54:56 rasc more PES stuff, DSM descriptors, testdata Revision 1.6 2003/10/24 22:17:20 rasc code reorg... Revision 1.5 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.4 2001/12/06 15:33:18 rasc some small work on pespacket.c Revision 1.3 2001/12/01 12:46:48 rasc pespacket weitergestrickt, leider z.Zt. zuwenig Zeit um es richtig fertig zu machen. Revision 1.2 2001/10/02 21:52:44 rasc - init der time_delta - PES erweitert, PES arbeitet im read() noch nicht richtig!! Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "pespacket.h" #include "pes_std.h" #include "pes_dsmcc.h" #include "pes_psm.h" #include "pes_psdir.h" #include "mpeg_packheader.h" #include "mpeg_sysheader.h" #include "mpeg2_video.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/output.h" #include "misc/print_header.h" #include "misc/cmdline.h" // // -- process PS PES packet (in sync) // -- hexdump, decoding // void processPS_PES_packet (u_int pid, long pkt_nr, u_char *buf, int len) { OPTION *opt = getOptionPtr(); char *strx = (opt->packet_mode == PES) ? "PES" : "PS"; indent (0); print_packet_header (opt, strx, opt->pid, pkt_nr, len); if (opt->buffer_hexdump) { printhex_buf (0, buf, len); out_NL(0); } // decode protocol if (opt->printdecode) { decodePS_PES_packet (buf, len ,opt->pid); out_nl (3,"=========================================================="); out_NL (3); } } void decodePS_PES_packet (u_char *b, u_int len, int pid) { /* IS13818-1 2.4.3.6 */ u_long packet_start_code_prefix; // 24 bit u_int stream_id; u_int PES_packet_length; // -- Get/check packet header prefix (sync bits) packet_start_code_prefix = getBits (b, 0, 0, 24); if (packet_start_code_prefix != 0x000001) { out_nl (3," !!! Packet_Start_CODE [%06lx] is wrong (= no PES/PS [0x000001])!!!\n", packet_start_code_prefix); print_databytes (4,"Unknown packet data:", b, len); return; } out_nl (3,"Packet_start_code_prefix: 0x%06lx",packet_start_code_prefix); // -- PS/PES stream ID stream_id = outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, (char *(*)(u_long))dvbstrPESstream_ID ); // // -- PES Stream ID 0x00 - 0xB8 // -- ISO 13818-2 // if (stream_id <= 0xB8) { // $$$ TODO PES Stream ID 0x00 - 0xB8 // reserved B0 // reserved B1 // sequence_error_code B4 (not for streams) // reserved B6 indent (+1); switch (stream_id) { case 0x00: // picture_start_code 00 MPEG2_decodePictureHeader (4, b, len); break; case 0xB2: // user_data_start_code B2 MPEG2_decodeUserData (4, b, len); break; case 0xB3: // sequence_header_code B3 MPEG2_decodeSequenceHeader (4, b, len); break; case 0xB5: // extension_data B5 MPEG2_decodeExtension (4, b, len); break; case 0xB7: // sequence_end_code B7 MPEG2_decodeSequenceEnd (4, b, len); return; case 0xB8: // group_start_code B8 MPEG2_decodeGroupOfPictures (4, b, len); break; default: // slice_start_code 01 through AF if (stream_id >= 0x01 && stream_id <= 0xAF) { MPEG2_decodeSlice (4, b, len); } else { // unkown if (len > 4) { // sync + stream_id = 4 bytes print_databytes (4,"MPEG2 Data (incl. sync + id):", b, len); } } break; } indent (-1); return; } // // -- PES Stream ID 0xB9 - 0xBB // -- check PS decoding (ProgramStream) // switch (stream_id) { case 0xB9: // MPEG_program_end // stream ID already printed, nothing else to do return; case 0xBA: // MPEG_pack_header_start mpeg_pack_header (3, b, -1); // startcode & ID already printed return; case 0xBB: // MPEG_system_header_start mpeg_system_header (3, b, -1); // startcode & ID already printed return; } // // -- PES decoding ... // -- StreamID 0xBC..0xFF // PES_packet_length = outBit_Sx_NL (3,"PES_packet_length: ", b,32, 16); b += 6; len -= 6; switch (stream_id) { case 0xBC: // program_stream_map PES_decodePSM (b, PES_packet_length); break; case 0xBE: // padding stream! print_databytes (3,"Padding_bytes:", b, PES_packet_length); break; case 0xF2: // DSMCC stream PES_decodeDSMCC (b, PES_packet_length); break; case 0xFF: // program_stream_directory PES_decodePSDIR (b, PES_packet_length); break; case 0xBF: // private_stream_2 (EN301192-1.3.1 S.10) case 0xF0: // ECM case 0xF1: // EMM case 0xF8: // ITU-T Rec. H.222.1 type E print_databytes (3,"PES_packet_data_bytes:", b, PES_packet_length); break; // case 0xFC: // metadata stream (see: H.222.0 AMD1) // $$$ TODO // case 0xBD: // Data Stream, privat_stream_1 (EN301192-1.3.1 S.11) // case 0xC0-0xDF // ISO/IEC 13818-3 or 11172-3 or 13818-7 or 14496-3 audio stream // case 0xE0-0xEF // ITU-T Rec. H.262 | ISO/IEC 13818-2 or 11172-2 or 14496-2 video stream // case 0xF3 // ISO/IEC_13522_stream // case 0xF4 // ITU-T Rec. H.222.1 type A // case 0xF5 // ITU-T Rec. H.222.1 type B // case 0xF6 // ITU-T Rec. H.222.1 type C // case 0xF7 // ITU-T Rec. H.222.1 type D // case 0xF9 // ancillary_stream // case 0xFA // ISO/IEC14496-1_SL-packetized_stream // case 0xFB // ISO/IEC14496-1_FlexMux_stream // case 0xFD // extended_stream_id // case 0xFE // reserved data stream default: { int xlen = PES_packet_length; if ((PES_packet_length==0) && ((stream_id & 0xF0)==0xE0)) { out_nl (3," ==> unbound video elementary stream... \n"); xlen = len; // PES len field == 0, use read packet len } if (xlen > 0) { indent (+1); PES_decode_std (b, xlen, stream_id); indent (-1); } } break; } // switch } // Annotation: // ISO 13818-1, 2.4.3.6: // PES_packet_length: A 16-bit field specifying the number of bytes in the // PES packet following the last byte of the field. A value of 0 indicates that // the PES packet length is neither specified nor bounded and is allowed only // in PES packets whose payload consists of bytes from a video elementary // stream contained in Transport Stream packets. // Annotations: // // // $$$ TODO 0x00000100-B8 ISO 13818-2 Start codes // dvbsnoop-1.4.50/src/pes/pes_std.c0000744000076400001440000002462110362514570012310 /* $Id: pes_std.c,v 1.8 2006/01/15 17:50:31 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES Decode Standard(?) $Log: pes_std.c,v $ Revision 1.8 2006/01/15 17:50:31 rasc no message Revision 1.7 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.6 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.5 2005/11/08 23:15:25 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.4 2004/08/12 22:57:18 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.3 2004/02/02 23:34:08 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff Revision 1.2 2004/01/22 22:26:35 rasc pes_pack_header section read timeout Revision 1.1 2004/01/11 21:01:32 rasc PES stream directory, PES restructured */ #include "dvbsnoop.h" #include "pes_std.h" #include "pes_data.h" #include "pes_misc.h" #include "mpeg_packheader.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/output.h" /* * PES Decoding * -- updated 2004-08-12 from ITU-T H.222.0 AMD2 */ void PES_decode_std (u_char *b, int len, u_int PES_streamID) { /* IS13818-1 2.4.3.6 */ typedef struct _PES2_Packet { u_int reserved1; u_int PES_scrambling_control; u_int PES_priority; u_int data_alignment_indicator; u_int copyright; u_int original_or_copy; u_int PTS_DTS_flags; u_int ESCR_flag; u_int ES_rate_flag; u_int DSM_trick_mode_flag; u_int additional_copy_info_flag; u_int PES_CRC_flag; u_int PES_extension_flag; u_int PES_header_data_length; // N ... data } PES2_Packet; PES2_Packet p; u_char *b_start = b; p.reserved1 = getBits (b, 0, 0, 2); p.PES_scrambling_control = getBits (b, 0, 2, 2); p.PES_priority = getBits (b, 0, 4, 1); p.data_alignment_indicator = getBits (b, 0, 5, 1); p.copyright = getBits (b, 0, 6, 1); p.original_or_copy = getBits (b, 0, 7, 1); p.PTS_DTS_flags = getBits (b, 0, 8, 2); p.ESCR_flag = getBits (b, 0, 10, 1); p.ES_rate_flag = getBits (b, 0, 11, 1); p.DSM_trick_mode_flag = getBits (b, 0, 12, 1); p.additional_copy_info_flag = getBits (b, 0, 13, 1); p.PES_CRC_flag = getBits (b, 0, 14, 1); p.PES_extension_flag = getBits (b, 0, 15, 1); p.PES_header_data_length = getBits (b, 0, 16, 8); // $$$ TODO own subroutine for PES_header (get and out) out_SB_NL (6,"reserved1: ",p.reserved1); out_S2B_NL (3,"PES_scrambling_control: ",p.PES_scrambling_control, dvbstrPESscrambling_ctrl_TYPE(p.PES_scrambling_control)); out_SB_NL (3,"PES_priority: ",p.PES_priority); out_SB_NL (3,"data_alignment_indicator: ",p.data_alignment_indicator); out_SB_NL (3,"copyright: ",p.copyright); out_SB_NL (3,"original_or_copy: ",p.original_or_copy); out_SB_NL (3,"PTS_DTS_flags: ",p.PTS_DTS_flags); out_SB_NL (3,"ES_rate_flag: ",p.ES_rate_flag); out_SB_NL (3,"additional_copy_info_flag: ",p.additional_copy_info_flag); out_SB_NL (3,"PES_CRC_flag: ",p.PES_CRC_flag); out_SB_NL (3,"PES_extension_flag: ",p.PES_extension_flag); out_SB_NL (3,"PES_header_data_length: ",p.PES_header_data_length); b += 3; if (p.PTS_DTS_flags & 0x02) { // 10 out_nl (3,"PTS: "); indent (+1); outBit_Sx_NL (3,"Fixed: ",b,0,4); print_xTS_field (3,"PTS", b, 4) ; indent (-1); b += 5; } if (p.PTS_DTS_flags == 0x03) { // 10 + 01 // PTS already printed, from "if" before... out_nl (3,"DTS: "); indent (+1); outBit_Sx_NL (3,"Fixed: ",b,0,4); print_xTS_field (3,"DTS",b, 4) ; indent (-1); b += 5; } if (p.ESCR_flag == 0x01) { out_nl (3,"ESCR_flag: "); outBit_Sx_NL (6,"reserved: ", b,0,2); indent (+1); print_xTS_field (3,"ESCR_base",b, 2) ; outBit_Sx_NL (3,"ESCR_extension: ",b,38,9); outBit_Sx_NL (3,"marker_bit: ", b,47,1); indent (-1); b += 6; } if (p.ES_rate_flag == 0x01) { out_nl (3,"ES_rate_flag: "); indent (+1); outBit_Sx_NL (3,"marker_bit: ",b, 0, 1); outBit_Sx_NL (3,"ES_rate: ", b, 1,22); outBit_Sx_NL (3,"marker_bit: ",b,23, 1); indent (-1); b += 3; } if (p.DSM_trick_mode_flag == 0x01) { u_int trick_mode_control; out_nl (3,"Trick_mode_control: "); indent (+1); trick_mode_control = outBit_S2x_NL (3,"trick_mode_control: ", b,0,3, (char *(*)(u_long)) dvbstrPESTrickModeControl); if ( (trick_mode_control == 0x0) || /* fast forward */ (trick_mode_control == 0x3) ) { /* fast reverse */ outBit_Sx_NL (3,"field_id: ",b, 3, 2); /* $$$ TABLE ?? */ outBit_Sx_NL (3,"intra_slice_refresh: ",b, 5, 1); outBit_Sx_NL (3,"frequency_truncation: ",b, 6, 2); } else if ( (trick_mode_control == 0x1) || /* slow motion */ (trick_mode_control == 0x4) ) { /* slow reverse */ outBit_Sx_NL (3,"rep_control: ",b, 3, 5); } else if (trick_mode_control == 0x2) { /* freeze frame */ outBit_Sx_NL (3,"field_id: ",b, 3, 2); /* $$$ TABLE ?? */ outBit_Sx_NL (6,"reserved: ",b, 5, 3); } else { /* reserved */ outBit_Sx_NL (6,"reserved: ",b, 3, 8); } indent (-1); b += 1; } /* p.DSM_trick_mode_flag */ if (p.additional_copy_info_flag == 0x01) { out_nl (3,"additional_copy_info: "); indent (+1); outBit_Sx_NL (3,"marker_bit: ",b, 0, 1); outBit_Sx_NL (3,"additional_copy_info: ",b, 1, 7); b += 1; indent (-1); } if (p.PES_CRC_flag == 0x01) { out_nl (3,"PES_CRC: "); indent (+1); outBit_Sx_NL (3,"previous_PES_packet_CRC: ",b, 0, 16); b += 2; indent (-1); } if (p.PES_extension_flag == 0x01) { u_int PES_private_data_flag; u_int pack_header_field_flag; u_int program_packet_sequence_counter_flag; u_int P_STD_buffer_flag; u_int reserved; u_int PES_extension_flag2; out_nl (3,"PES_extension: "); indent (+1); PES_private_data_flag = getBits (b, 0, 0, 1); pack_header_field_flag = getBits (b, 0, 1, 1); program_packet_sequence_counter_flag = getBits (b, 0, 2, 1); P_STD_buffer_flag = getBits (b, 0, 3, 1); reserved = getBits (b, 0, 4, 3); PES_extension_flag2 = getBits (b, 0, 7, 1); b += 1; out_SB_NL (3,"PES_private_data_flag: ", PES_private_data_flag); out_SB_NL (3,"pack_header_field_flag: ", pack_header_field_flag); out_SB_NL (3,"program_packet_sequence_counter_flag: ", program_packet_sequence_counter_flag); out_SB_NL (3,"P-STD_buffer_flag: ", P_STD_buffer_flag); out_SB_NL (6,"reserved: ", reserved); out_SB_NL (3,"PES_extension_flag2: ", PES_extension_flag2); if (PES_private_data_flag == 0x01) { print_databytes (3,"PES_private_data", b, 16); b += 16; } if (pack_header_field_flag == 0x01) { /* ISO 11172-1 pack header */ int pack_field_length; out_nl (3,"pack_header_field: "); indent (+1); pack_field_length = getBits (b, 0, 0, 8); out_SB_NL (3,"pack_field_length: ", pack_field_length); mpeg_pack_header (3, b+1, pack_field_length); b += pack_field_length +1; indent (-1); } if (program_packet_sequence_counter_flag == 0x01) { out_nl (3,"program_packet_sequence_counter: "); indent (+1); out_SB_NL (3,"Marker_bit: ", getBits (b, 0, 0, 1) ); out_SB_NL (3,"program_packet_sequence_counter: ", getBits (b, 0, 1, 7) ); out_SB_NL (3,"Marker_bit: ", getBits (b, 0, 8, 1) ); out_SB_NL (3,"MPEG1_MPEG2_identifier: ", getBits (b, 0, 9, 1) ); out_SB_NL (3,"original_stuff_length: ", getBits (b, 0, 10, 6) ); b += 2; indent (-1); } if (P_STD_buffer_flag == 0x01) { out_nl (3,"P-STD_buffer: "); indent (+1); out_SB_NL (6,"Fix 01: ", getBits (b, 0, 0, 2) ); out_SB_NL (3,"P-STD_buffer_scale: ", getBits (b, 0, 2, 1) ); out_SB_NL (3,"P-STD_buffer_size: ", getBits (b, 0, 3, 13) ); b += 2; indent (-1); } if (PES_extension_flag2 == 0x01) { // -- ITU-T Rec. H.222.0 (2000)/Amd.2 (06/2003) u_int PES_extension_field_length; u_int streamID_extension_flag; out_nl (3,"PES_extension_2: "); indent (+1); out_SB_NL (3,"Marker_bit: ", getBits (b, 0, 0, 1) ); PES_extension_field_length = outBit_Sx_NL (4,"PES_extension_field_length: ", b, 1, 7); streamID_extension_flag = outBit_Sx_NL(4,"stream_id_extension_flag: ", b, 8, 1); if (streamID_extension_flag == 0) { outBit_S2x_NL(4,"stream_id_extension_flag: ", b, 9, 7, (char *(*)(u_long)) dvbstrPESstream_ID_Extension); print_databytes (6,"reserved:", b+2, PES_extension_field_length-1); } b += PES_extension_field_length + 1; indent (-1); } indent (-1); } /* p.PES_extension_flag */ // PES_header_data_length : An 8-bit field specifying the total number of // bytes occupied by the optional fields and any stuffing bytes contained // in this PES packet header. The presence of optional fields is indicated // in the byte that precedes the PES_header_data_length field. // (PES_header_data_length has the length up to this point) // stuffing_byte: // This is a fixed 8-bit value equal to '1111 1111' that // can be inserted by the encoder, for example to meet the requirements // of the channel. It is discarded by the decoder. No more than 32 stuffing // bytes shall be present in one PES packet header. { int i = 0; u_char *bx = b; while (*bx++ == 0xFF) i++; if (i > 0) { print_databytes (4,"stuffing bytes:", b, i); b += i; } } // -- PES packet_data_bytes // -- check streamID // $$$ TODO: data_identifier (Teletext, DVB subtitles, etc...) { // $$$ TODO: unbound streams: len = 0 !! int len2 = len - (b - b_start); if (len2 > 0) { switch (PES_streamID) { case 0xBD: // Data Stream, privat_stream_1 (EN301192-1.3.1 S.11) out_nl (3,"PES_data (private_stream_1):"); indent (+1); PES_decodeDATA_private_stream_1 (b, len2); indent (-1); break; default: print_databytes (4,"PES_packet_data_bytes:", b, len2); break; } } // if } } dvbsnoop-1.4.50/src/pes/pes_dsmcc.c0000644000076400001440000001637610562675313012623 /* $Id: pes_dsmcc.c,v 1.13 2007/02/08 19:17:41 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES DSM-CC ITU H.222.0 Annex B $Log: pes_dsmcc.c,v $ Revision 1.13 2007/02/08 19:17:41 rasc Bugfix on PS Program Stream Map - tnx to "jack" for reporting Revision 1.12 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.11 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.10 2004/02/20 22:18:41 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.9 2004/01/17 23:06:10 rasc minor stuff, some restructs in output Revision 1.8 2004/01/11 21:01:32 rasc PES stream directory, PES restructured Revision 1.7 2004/01/02 22:25:39 rasc DSM-CC MODULEs descriptors complete Revision 1.6 2004/01/02 16:40:38 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:29 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/12/27 22:02:44 rasc dsmcc INT UNT descriptors started Revision 1.3 2003/12/27 18:17:18 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.2 2003/12/27 14:35:01 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.1 2003/12/17 23:15:04 rasc PES DSM-CC ack and control commands according ITU H.222.0 Annex B */ #include "dvbsnoop.h" #include "descriptors/descriptor.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" #include "pes_misc.h" #include "pes_dsmcc.h" static void dsmcc_control (u_char *b, int len); static void dsmcc_ack (u_char *b, int len); static int dsmcc_timecode (u_char *b); static void dsmcc_program_stream_descriptorlist_loop (u_char *b, int len); /* -- DSM-CC Command stream in a PES Packet! -- buffer starts with command_id */ void PES_decodeDSMCC (u_char *b, int len) { /* ITU H.222.0 Annex B */ int commandID; // same as 'dsmcc_discriminator' // -- already processed: // --- packet_start_code_prefix 24 bslbf // --- stream_id 8 uimsbf // --- packet_length 16 uimsbf commandID = outBit_S2x_NL (4,"Command_ID/dsmcc_discriminator: ", b,0,8, (char *(*)(u_long)) dsmccStr_Command_ID); b++; len--; switch (commandID) { case 0x01: dsmcc_control (b,len); break; case 0x02: dsmcc_ack (b,len); break; case 0x80: dsmcc_program_stream_descriptorlist_loop (b,len); break; default: out_nl (4," Unknown DSM-CC commandID/dsmcc_discriminator"); indent (+1); printhex_buf (4, b, len); indent (-1); break; } } static void dsmcc_control (u_char *b, int len) { int select_flag; int retrieval_flag; int storage_flag; out_nl (3,"DSM-CC CONTROL: "); select_flag = outBit_Sx_NL (4,"select_flag: ", b,0,1); retrieval_flag = outBit_Sx_NL (4,"retrieval_flag: ", b,1,1); storage_flag = outBit_Sx_NL (4,"storage_flag: ", b,2,1); outBit_Sx_NL (6,"reserved: ", b,3,12); outBit_Sx_NL (4,"marker_bit: ", b,15,1); b += 2; // len -= 2; if (select_flag) { u_long bitstreamID_31_17; u_long bitstreamID_16_2; u_long bitstreamID_1_0; out_nl (4,"SELECT:"); indent (+1); bitstreamID_31_17 = outBit_Sx_NL (5,"bitstream_id[31..17]: ", b,0,15); outBit_Sx_NL (5,"marker_bit: ", b,15,1); bitstreamID_16_2 = outBit_Sx_NL (5,"bitstream_id[16..2]: ", b,16,15); outBit_Sx_NL (5,"marker_bit: ", b,31,1); bitstreamID_1_0 = outBit_Sx_NL (5,"bitstream_id[1..0]: ", b,32,2); out_SL_NL (4," ==> bitstream_id: ", (bitstreamID_31_17<<17) + (bitstreamID_16_2<<2) + bitstreamID_1_0); outBit_S2x_NL (4,"select_mode: ", b,34,5, (char *(*)(u_long))dsmccStr_SelectMode_ID ); outBit_Sx_NL (4,"marker_bit: ", b,39,1); indent (-1); b += 5; // len -= 5; } if (retrieval_flag) { int jump_flag; int play_flag; out_nl (4,"RETRIEVE:"); indent (+1); jump_flag = outBit_Sx_NL (4,"jump_flag: ", b,0,1); play_flag = outBit_Sx_NL (4,"play_flag: ", b,1,1); outBit_Sx_NL (4,"pause_mode: ", b,2,1); outBit_Sx_NL (4,"resume_mode: ", b,3,1); outBit_Sx_NL (4,"stop_mode: ", b,4,1); outBit_Sx_NL (6,"reserved: ", b,5,10); outBit_Sx_NL (4,"marker_bit: ", b,15,1); b += 2; len -= 2; if (jump_flag) { int xlen = 0; out_nl (4,"JUMP:"); indent (+1); outBit_Sx_NL (6,"reserved: ", b,0,7); outBit_S2x_NL (4,"direction_indicator: ", b,7,1, (char *(*)(u_long)) dsmccStr_DirectionIndicator ); indent (+1); xlen = dsmcc_timecode (b+1); b += xlen+1; // len -= (xlen+1); indent (-1); } if (play_flag) { int xlen; out_nl (4,"PLAY:"); indent (+1); outBit_Sx_NL (4,"speed_mode: ", b,0,1); outBit_S2x_NL (4,"direction_indicator: ", b,1,1, (char *(*)(u_long)) dsmccStr_DirectionIndicator ); outBit_Sx_NL (6,"reserved: ", b,2,6); indent (+1); xlen = dsmcc_timecode (b+1); b += xlen+1; // len -= (xlen+1); indent (-1); } indent (-1); } if (storage_flag) { int record_flag; out_nl (4,"STORAGE:"); indent (+1); outBit_Sx_NL (6,"reserved: ", b,0,6); record_flag = outBit_Sx_NL (4,"record_flag: ", b,6,1); outBit_Sx_NL (4,"stop_mode: ", b,7,1); b++; // len--; if (record_flag) { int xlen; out_nl (4,"RECORD:"); indent (+1); xlen = dsmcc_timecode (b); b += xlen; // len -= xlen; indent (-1); } indent (-1); } } /* ITU H.222.0 Annex B */ static void dsmcc_ack (u_char *b, int len) { int select_ack; int retrieval_ack; int storage_ack; int error_ack; int cmd_status; out_nl (3,"DSM-CC Acknowledge: "); select_ack = outBit_Sx_NL (4,"select_ack: ", b,0,1); retrieval_ack = outBit_Sx_NL (4,"retrieval_ack: ", b,1,1); storage_ack = outBit_Sx_NL (4,"storage_ack: ", b,2,1); error_ack = outBit_Sx_NL (4,"error_ack: ", b,3,1); outBit_Sx_NL (6,"reserved: ", b,4,10); outBit_Sx_NL (4,"marker_bit: ", b,14,1); cmd_status = outBit_Sx_NL (4,"cmd_status: ", b,15,1); if (cmd_status && (retrieval_ack || storage_ack) ) { dsmcc_timecode (b+2); } } /* ITU H.222.0 Annex B */ static int dsmcc_timecode (u_char *b) { int len = 0; int infinite_time_flag; outBit_Sx_NL (6,"reserved: ", b,0,7); infinite_time_flag = outBit_Sx_NL (4,"infinite_time_flag: ", b,7,1); b++; len = 1; if (infinite_time_flag == 0) { outBit_Sx_NL (6,"reserved: ", b,0,4); print_xTS_field (4,"Time period", b, 4); len += 5; } return len; } static void dsmcc_program_stream_descriptorlist_loop (u_char *b, int len) { int first = 1; // dsmcc_discriminator is already displayed for the first pass of the loop while (len > 0) { int len2; if (! first) { outBit_S2x_NL (4,"dsmcc_discriminator: ", b,0,8, (char *(*)(u_long)) dsmccStr_Command_ID); b++; len--; } len2 = descriptor (b, DSMCC_STREAM); b += len2; len -= len2; first = 0; } } /* $$$ TODO some mode && cmd_status could be more verbose */ dvbsnoop-1.4.50/src/pes/pes_psm.c0000644000076400001440000000475010562675313012322 /* $Id: pes_psm.c,v 1.5 2007/02/08 19:17:41 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES PSM (Program Stream Map) ISO/IEC 13818-1 ITU H.222.0, 2.5.4 $Log: pes_psm.c,v $ Revision 1.5 2007/02/08 19:17:41 rasc Bugfix on PS Program Stream Map - tnx to "jack" for reporting Revision 1.4 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.3 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.2 2004/01/02 16:40:38 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.1 2004/01/01 20:31:25 rasc PES program stream map, minor descriptor cleanup */ #include "dvbsnoop.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "pes_psm.h" /* -- Program Stream Map -- buffer starts after packet_length */ void PES_decodePSM (u_char *b, int len) { int psi_len; int esm_len; // -- already processed: // --- packet_start_code_prefix 24 bslbf // --- stream_id 8 uimsbf // --- packet_length 16 uimsbf outBit_S2x_NL (4,"current_next_indicator: ", b, 0, 1, (char *(*)(u_long)) dvbstrCurrentNextIndicator ); outBit_Sx_NL (6,"reserved_1: ", b, 1, 2); outBit_Sx_NL (4,"program_stream_map_version: ", b, 3, 5); outBit_Sx_NL (6,"reserved_2: ", b, 8, 7); outBit_Sx_NL (4,"marker_bit: ", b,15, 1); psi_len = outBit_Sx_NL (5,"program_stream_info_length: ", b,16,16); b += 4; // len -= 4; out_nl (4,"Program stream info:"); indent (+1); while (psi_len > 0) { int x; x = descriptor (b, MPEG); b += x; psi_len -= x; // len -= x; } indent (-1); esm_len = outBit_Sx_NL (5,"elementary_stream_map_length: ", b, 0,16); b += 2; out_nl (4,"Elementary stream Map:"); indent (+1); while (esm_len > 0) { int esi_len; outBit_S2x_NL (4,"stream_type: ", b, 0, 8, (char *(*)(u_long)) dvbstrStream_TYPE); outBit_Sx_NL (5,"elementary_stream_id: ", b, 8, 8); esi_len = outBit_Sx_NL (5,"elementary_stream_info_length: ", b,16,16); b += 4; esm_len -= 4; // len -= 4; out_nl (4,"Elementary stream info:"); indent (+1); while (esi_len > 0) { int x; x = descriptor (b, MPEG); b += x; esi_len -= x; esm_len -= x; // len -= x; } indent (-1); } indent (-1); outBit_Sx_NL (5,"CRC: ", b, 0, 32); } dvbsnoop-1.4.50/src/pes/pes_psdir.c0000644000076400001440000000752510562675313012647 /* $Id: pes_psdir.c,v 1.4 2007/02/08 19:17:41 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES PSD (Program Stream Directory) ISO/IEC 13818-1 ITU H.222.0, 2.5.5 $Log: pes_psdir.c,v $ Revision 1.4 2007/02/08 19:17:41 rasc Bugfix on PS Program Stream Map - tnx to "jack" for reporting Revision 1.3 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.1 2004/01/11 21:01:32 rasc PES stream directory, PES restructured */ #include "dvbsnoop.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "pes_misc.h" #include "pes_psdir.h" static int print_PESDIR_directory_offset (int v, const char *str, u_char *b); /* -- Program Stream Directory -- ISO/IEC 13818-1 ITU H.222.0, 2.5.5 -- buffer starts after packet_length */ void PES_decodePSDIR (u_char *b, int len) { int n1,n2; int au,i; // -- already processed: // --- packet_start_code_prefix 24 bslbf // --- stream_id 8 uimsbf // --- packet_length 16 uimsbf au = outBit_Sx_NL (4,"number_of_access_unuits: ", b, 0, 15); outBit_Sx_NL (4,"marker_bit: ", b,15, 1); n1 = print_PESDIR_directory_offset (4,"prev",b+2); n2 = print_PESDIR_directory_offset (4,"next",b+2+n1); b += n1+n2+2; len -= n1+n2+2; for (i=0; i < au; i++) { out_nl (4,"Access Unit %d (0x%04x)",i,i); indent (+1); outBit_S2x_NL (4,"packet_stream_id: ", b, 0, 8, (char *(*)(u_long)) dvbstrPESstream_ID); { int sign; int off_43_30, off_29_15, off_14_0; long long ll; out_nl (4,"PES_header_position: "); indent (+1); sign = outBit_Sx_NL (4,"..._sign: ", b, 8, 1); off_43_30 = outBit_Sx_NL (4,"offset[43..30]: ", b, 9, 14); outBit_Sx_NL (4,"marker_bit: ", b,23, 1); off_29_15 = outBit_Sx_NL (4,"offset[29..15]: ", b,24, 15); outBit_Sx_NL (4,"marker_bit: ", b,39, 1); off_14_0 = outBit_Sx_NL (4,"offset[14.. 0]: ", b,40, 15); outBit_Sx_NL (4,"marker_bit: ", b,55, 1); ll = (off_43_30 << 30) + (off_29_15 << 15) + off_14_0; if (sign) ll = -ll ; out_nl (4," ==> PES_header_position_offset: %lld [bytes]", ll); indent (-1); } outBit_Sx (4,"reference_offset: ", b,56, 16); out_nl (4, " [bytes]"); outBit_Sx_NL (4,"marker_bit: ", b,72, 1); outBit_Sx_NL (6,"reserved: ", b,73, 3); print_xTS_field (4,"PTS", b, 76); { u_long btr_1, btr_2; u_long ul; btr_1 = outBit_Sx_NL (4,"bytes_to_read[22.. 8]: ", b, 112, 15); outBit_Sx_NL (4,"marker_bit: ", b, 127, 1); btr_2 = outBit_Sx_NL (4,"bytes_to_read[ 7.. 0]: ", b, 128, 8); ul = (btr_1 << 8) + btr_2; out_nl (4," ==> bytes_to_read: %lu (0x%06lx) [bytes]", ul,ul); } outBit_Sx_NL (4,"marker_bit: ", b, 136, 1); outBit_Sx_NL (4,"intra_coded_indicator: ", b, 137, 1); // $$$ TODO table outBit_Sx_NL (4,"coding_parameter_indicator: ", b, 138, 2); // $$$ TODO Table outBit_Sx_NL (6,"reserved: ", b, 140, 4); indent (-1); } } static int print_PESDIR_directory_offset (int v, const char *str, u_char *b) { int off_44_30, off_29_15, off_14_0; long long ll; int v1 = v+1; out_nl (v,"%s_directory: ",str); indent (+1); off_44_30 = outBit_Sx_NL (v1,"..._offset[44..30]: ", b, 0, 15); outBit_Sx_NL (v1,"marker_bit: ", b,15, 1); off_29_15 = outBit_Sx_NL (v1,"..._offset[29..15]: ", b,16, 15); outBit_Sx_NL (v1,"marker_bit: ", b,31, 1); off_14_0 = outBit_Sx_NL (v1,"..._offset[14.. 0]: ", b,32, 15); outBit_Sx_NL (v1,"marker_bit: ", b,47, 1); ll = (off_44_30 << 30) + (off_29_15 << 15) + off_14_0; out_nl (v," ==> %s_directory_offset: %lld (0x%012llx) [bytes]", str, ll,ll); indent (-1); return 6; } dvbsnoop-1.4.50/src/pes/pes_data.c0000744000076400001440000000311710356276734012436 /* $Id: pes_data.c,v 1.3 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES Data Privat_stream_1 -- Data Packet Synchronous and synchronized data streaming $Log: pes_data.c,v $ Revision 1.3 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/02/02 23:34:08 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff */ #include "dvbsnoop.h" #include "pes_data.h" #include "pes_data_ebu.h" #include "pes_data_sync.h" #include "strings/dvb_str.h" #include "misc/helper.h" #include "misc/hexprint.h" #include "misc/output.h" /* -- Data Packet Synchronous and synchronized data streaming -- Privat_stream_1 */ void PES_decodeDATA_private_stream_1 (u_char *b, int len) { u_int data_identifier; // -- Data Buffer starts at PES_DATA_BYTES... data_identifier = getBits (b, 0, 0, 8); // -- Async Data Streaming will be done as private_stream_2 (pes_std) if (data_identifier >= 0x10 && data_identifier <= 0x1F) { // Teletext EBU data (see EN 300 472) PES_decodeDATA_EBU_etc (b, len); } else if (data_identifier == 0x20) { // DVB subtitling (see EN 300 743) // $$$ TODO DVB subtitling (see EN 300 743) print_databytes (4,"TODO dvb subtitles:", b, len); } else { // default sync. data streams (see EN 301 192) PES_decodeDATA_SYNC (b, len); } } dvbsnoop-1.4.50/src/pes/pes_data_sync.c0000744000076400001440000000605110356276734013472 /* $Id: pes_data_sync.c,v 1.3 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES Data: Synchronous and synchronized data streaming $Log: pes_data_sync.c,v $ Revision 1.3 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.1 2004/02/02 23:41:23 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream, restructuring - some other stuff Revision 1.1 2004/01/11 21:01:32 rasc PES stream directory, PES restructured */ #include "dvbsnoop.h" #include "pes_data_sync.h" #include "strings/dvb_str.h" #include "misc/helper.h" #include "misc/hexprint.h" #include "misc/output.h" /* -- Data Packet Synchronous and synchronized data streaming -- EN 301 192 v1.3.1 S. 11 */ void PES_decodeDATA_SYNC (u_char *b, int len) { typedef struct _PES_DATA { u_int data_identifier; u_int sub_stream_id; u_int PTS_extension_flag; u_int output_data_rate_flag; u_int reserved; u_int PES_data_packet_header_length; // N ... optional data } PES_DATA; PES_DATA p; int len2; out_nl (4,"Data (synchronous/synchronized):"); indent (+1); p.data_identifier = getBits (b, 0, 0, 8); p.sub_stream_id = getBits (b, 0, 8, 8); p.PTS_extension_flag = getBits (b, 0, 16, 1); p.output_data_rate_flag = getBits (b, 0, 17, 1); p.reserved = getBits (b, 0, 18, 2); p.PES_data_packet_header_length = getBits (b, 0, 20, 4); b += 3; len -= 3; len2 = p.PES_data_packet_header_length; out_S2B_NL (4,"data_identifier: ", p.data_identifier, dvbstrPESDataIdentifier (p.data_identifier) ); out_SB_NL (4,"sub_stream_id: ", p.sub_stream_id); out_SB_NL (4,"PTS_extension_flag: ", p.PTS_extension_flag); out_SB_NL (4,"output_data_rate_flag: ", p.output_data_rate_flag); out_SB_NL (6,"reserved_1: ", p.reserved); out_SB_NL (4,"PES_data_packet_header_length: ", p.PES_data_packet_header_length); if (p.PTS_extension_flag == 0x01) { out_nl (4,"PTS_extension:"); indent (+1); out_SB_NL (6,"reserved: ", getBits (b, 0, 0, 7) ); out_SW_NL (4,"PTS_extension: ", getBits (b, 0, 7, 9) ); /* $$$ TODO PCR extension output in clear text, see ISO 13818-1*/ b += 2; len -= 2; len2 -= 2; indent (-1); } if (p.output_data_rate_flag == 0x01) { out_nl (4,"output_data_rate:"); indent (+1); out_SB_NL (6,"reserved: ", getBits (b, 0, 0, 4) ); out_SL_NL (4,"output_data_rate: ", getBits (b, 0, 4, 28) ); b += 4; len -= 4; len2 -= 4; indent (-1); } print_databytes (4,"PES_data_private_byte:", b, len2); b += len2; len -= len2; print_databytes (4,"PES_data_byte:", b, len); b += len; len -= len; indent (-1); } dvbsnoop-1.4.50/src/pes/pes_data_ebu.c0000744000076400001440000001130310356276734013265 /* $Id: pes_data_ebu.c,v 1.5 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PES Data: Teletext, VPS, WSS, closed caption, etc. -- EBU data (see EN 300 472, EN 301 775, and some more) $Log: pes_data_ebu.c,v $ Revision 1.5 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.4 2004/03/10 21:05:53 rasc WSS (Wide Screen Signalling) data decoding Revision 1.3 2004/03/09 20:59:23 rasc VPS decoding (someone check the NPP & PTY code output please...) Revision 1.2 2004/02/04 22:36:29 rasc more EBU/teletext stuff Revision 1.1 2004/02/02 23:41:23 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream, restructuring - some other stuff */ #include "dvbsnoop.h" #include "pes_data_ebu.h" #include "strings/dvb_str.h" #include "ebu/teletext.h" #include "ebu/vps.h" #include "ebu/wss.h" #include "ebu/ebu_misc.h" #include "misc/helper.h" #include "misc/hexprint.h" #include "misc/output.h" static int teletext_data_field (int v, u_char *b, int len); static int vps_data_field (int v, u_char *b, int len); static int wss_data_field (int v, u_char *b, int len); static int closed_caption_data_field (int v, u_char *b, int len); static int monochrome_data_field (int v, u_char *b, int len); /* -- Data Teletext */ void PES_decodeDATA_EBU_etc (u_char *b, int len) { // -- PES_DATA_bytes EBU // -- Data Buffer starts at PES_DATA_BYTES... // --> see parent int data_identifier; out_nl (4,"EBU data:"); indent (+1); data_identifier = getBits (b, 0, 0, 8); outBit_S2x_NL (4,"data_identifier: ", b, 0, 8, (char *(*)(u_long)) dvbstrPESDataIdentifier); b++; len--; while (len > 0) { int len2; int dui; int n=0; out_NL (4); dui = outBit_S2x_NL (4,"data_unit_id: ", b, 0, 8, (char *(*)(u_long)) dvbstrPES_EBUDataUnitID); len2 = outBit_Sx_NL (4,"data_unit_length: ", b, 8, 8); b += 2; len -= 2; if (dui==0x02 || dui==0x03 || dui==0xC0 || dui==0xC1) { n = teletext_data_field (4, b, len2); } else if (dui==0xC3) { n = vps_data_field(4, b,len2); } else if (dui==0xC4) { n = wss_data_field (4, b,len2); } else if (dui==0xC5) { n = closed_caption_data_field (4, b,len2); } else if (dui==0xC6) { n = monochrome_data_field (4, b,len2); } else if (dui==0xFF) { /* No data field */ n = 0; } if ( (len2-n) > 0 ) { print_databytes (4,"stuffing bytes:", b+n, len2-n); } b += len2; len -= len2; } indent (-1); } // EN 300 472 and EN 300 706 static int teletext_data_field (int v, u_char *b, int len) { int v1 = v+1; int len2; out_nl (v,"Teletext data:"); indent (+1); ebu_rfl_out (v1,b); outBit_S2x_NL (v1,"frame_coding: ", b, 8, 8, (char *(*)(u_long)) dvbstrTELETEXT_framingcode ); b += 2; len -= 2; print_databytes (8,"data_block:", b, 42); out_nl (v1," => decoded:"); indent (+1); invertBuffer (b, 42); len2 = print_teletext_control_decode (v1, b, 42); b += len2; len -= len2; indent (-1); indent (-1); return 44; } // EN 300 231 static int vps_data_field (int v, u_char *b, int len) { int v1 = v+1; out_nl (v,"VPS (Video Programming System) data:"); indent (+1); ebu_rfl_out (v1,b); print_vps_decode (v1, b+1, 13); indent (-1); return 14; } // EN 300 294 static int wss_data_field (int v, u_char *b, int len) { int v1 = v+1; out_nl (v,"WSS (Wide Screen Signalling) data:"); indent (+1); ebu_rfl_out (v1,b); b++; print_wss_decode (v1, b); // 14 bit outBit_Sx_NL (v1,"reserved: ", b,14, 2); indent (-1); return 3; } // Closed Captioning data packets EIA-608 Revision A static int closed_caption_data_field (int v, u_char *b, int len) { int v1 = v+1; out_nl (v,"CC (Closed Caption) data:"); indent (+1); ebu_rfl_out (v1,b); // $$$ TODO outBit_Sx_NL (v1,"closed_caption_data_block: ", b, 8,16); indent (-1); return 3; } // Monochrome 4:2:2: ITU-R BT.601-1 and ITU-R BT.656 static int monochrome_data_field (int v, u_char *b, int len) { int v1 = v+1; int n; out_nl (v,"Monochrome 4:2:2 sample data:"); indent (+1); outBit_Sx_NL (v1,"first_segment_flag: ",b, 0, 1); outBit_Sx_NL (v1,"last_segment_flag: ", b, 1, 1); outBit_Sx_NL (v1,"field_parity: ", b, 2, 1); outBit_Sx_NL (v1,"line_offset: ", b, 3, 5); outBit_Sx_NL (v1,"first_pixel_position: ",b, 8, 16); n = outBit_Sx_NL (v1,"n_pixel: ", b, 24, 8); print_databytes (v1,"Y_values:", b+3, n); indent (-1); return 3+n; } dvbsnoop-1.4.50/src/pes/pes_misc.c0000744000076400001440000000467710354356246012467 /* $Id: pes_misc.c,v 1.11 2005/12/27 23:30:29 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PS misc. -- PES misc. $Log: pes_misc.c,v $ Revision 1.11 2005/12/27 23:30:29 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.10 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.9 2005/08/10 21:28:18 rasc New: Program Stream handling (-s ps) Revision 1.8 2004/08/12 22:57:18 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.7 2004/02/20 22:18:41 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.6 2004/02/05 10:30:57 rasc no message Revision 1.5 2004/02/04 23:54:37 rasc Bugfix: PTS wrongly displayed!!! Revision 1.4 2004/02/02 23:34:08 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff Revision 1.3 2004/01/25 21:37:28 rasc bugfixes, minor changes & enhancments Revision 1.2 2004/01/22 22:26:35 rasc pes_pack_header section read timeout Revision 1.1 2004/01/11 21:01:32 rasc PES stream directory, PES restructured */ #include "dvbsnoop.h" #include "pes_misc.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/helper.h" #include "misc/output.h" /* * PTS // DTS * Len is 36 bits fixed */ void print_xTS_field (int v, const char *str, u_char *b, int bit_offset) { long long xTS_32_30; long long xTS_29_15; long long xTS_14_0; long long ull; int bo = bit_offset; int v1 = v+1; out_nl (v,"%s:",str); indent (+1); xTS_32_30 = outBit_Sx_NL (v1,"bit[32..30]: ", b, bo+0, 3); outBit_Sx_NL (v1,"marker_bit: ", b, bo+3, 1); xTS_29_15 = outBit_Sx_NL (v1,"bit[29..15]: ", b, bo+4, 15); outBit_Sx_NL (v1,"marker_bit: ", b, bo+19, 1); xTS_14_0 = outBit_Sx_NL (v1,"bit[14..0]: ", b, bo+20,15); outBit_Sx_NL (v1,"marker_bit: ", b, bo+35, 1); ull = (xTS_32_30<<30) + (xTS_29_15<<15) + xTS_14_0; out (v," ==> %s: ", str); print_timebase90kHz (v, ull); out_NL (v); indent (-1); } dvbsnoop-1.4.50/src/pes/mpeg_packheader.c0000744000076400001440000000404210354356246013746 /* $Id: mpeg_packheader.c,v 1.2 2005/12/27 23:30:29 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: mpeg_packheader.c,v $ Revision 1.2 2005/12/27 23:30:29 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.1 2005/11/10 00:07:18 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix */ #include "dvbsnoop.h" #include "mpeg_packheader.h" #include "mpeg_sysheader.h" #include "pes_misc.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/helper.h" #include "misc/output.h" /* * PES/PS Pack Header * if (len == -1) then * pack_header is in a PS * do not print packet_start_code (already printed by caller) * else * pack_header is within a pes packet * and check if a system_header is within len */ void mpeg_pack_header (int v, u_char *b, int len) { /* z.B. H.222 ISO 13818-1 Table 2-33 */ /* ISO 11172-1 pack header */ int v1 = v+1; int pack_stuffing_len; if (len == 0) return; out_nl (v,"Pack_header: "); indent (+1); if (len > 0) { // -- within PES packet, not PS! outBit_Sx_NL (v1,"pack_start_code: ", b, 0, 32); } outBit_Sx_NL (v1,"fixed '01': ", b, 32, 2); print_xTS_field (v1, "system_clock_reference_base", b, 34) ; // len 36b outBit_Sx_NL (v1,"system_clock_reference_extension: ",b, 70, 9); outBit_Sx_NL (v1,"marker_bit: ", b, 79, 1); outBit_Sx (v1,"program_mux_rate: ", b, 80,22); out_nl (v1," [= x 50 bytes/sec]"); outBit_Sx_NL (v1,"marker_bit: ", b, 102, 1); outBit_Sx_NL (v1,"marker_bit: ", b, 103, 1); outBit_Sx_NL (v1,"reserved: ", b, 104, 5); pack_stuffing_len = outBit_Sx_NL (v1,"pack_stuffing_len: ", b, 109, 3); print_databytes (6,"stuffing bytes 0xFF:", b+14, pack_stuffing_len); b += 14 + pack_stuffing_len; if (len >= 0) len -= 14 + pack_stuffing_len; if (len > 0) mpeg_system_header (v1, b, len); // only if len > 0 (PES packet) indent (-1); } dvbsnoop-1.4.50/src/pes/mpeg_sysheader.c0000744000076400001440000000467510356276734013667 /* $Id: mpeg_sysheader.c,v 1.2 2006/01/02 18:24:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: mpeg_sysheader.c,v $ Revision 1.2 2006/01/02 18:24:12 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2005/11/10 00:07:18 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix */ #include "dvbsnoop.h" #include "mpeg_sysheader.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/helper.h" #include "misc/output.h" /* * PS System header * if (len == -1) then * system_header is in a PS * do not print packet_start_code & ID (already printed by caller) * else * pack_header is within a pes packet (pack_header) * print packet_start_code */ void mpeg_system_header (int v, u_char *b, int len) { /* z.B. H.222 ISO 13818-1 Table 2-34 */ /* ISO 11172-1 system header */ if (len == 0) return; out_nl (v,"System_header: "); indent (+1); if (len > 0) { // -- within PES packet, not PS! outBit_Sx_NL (v,"system_header_start_code: ", b, 0, 32); } // -- get real length from system_header data len = outBit_Sx_NL (v,"header_length: ", b, 32, 16); outBit_Sx_NL (v,"marker_bit: ", b, 48, 1); outBit_Sx_NL (v,"rate_bound: ", b, 49, 22); outBit_Sx_NL (v,"marker_bit: ", b, 71, 1); outBit_Sx_NL (v,"audio_bound: ", b, 72, 6); outBit_Sx_NL (v,"fixed_flag: ", b, 78, 1); outBit_Sx_NL (v,"CSPS_flag: ", b, 79, 1); outBit_Sx_NL (v,"system_audio_lock_flag: ", b, 80, 1); outBit_Sx_NL (v,"system_video_lock_flag: ", b, 81, 1); outBit_Sx_NL (v,"marker_bit: ", b, 82, 1); outBit_Sx_NL (v,"video_bound: ", b, 83, 5); outBit_Sx_NL (v,"packet_rate_restriction_flag: ", b, 88, 1); outBit_Sx_NL (v,"reserved_byte: ", b, 89, 7); b += 12; len -= 12; // while (nextbits () == '1') { // while ((bit = getBits (b, 0,0,1)) == 0x01) { while ( (*b & 0x80) ) { if (len <= 0) break; out_NL (v); outBit_S2x_NL(v,"Stream_id: ", b, 0, 8, (char *(*)(u_long))dvbstrPESstream_ID ); outBit_Sx_NL (v,"fixed (0x02): ", b, 8, 2); outBit_Sx_NL (v,"P-STD_buffer_bound_scale: ", b, 10, 1); outBit_Sx_NL (v,"P-STD_buffer_size_bound: ", b, 11, 13); b += 3; len -= 3; if (len < 0) out_nl (1, "$$$ something wrong here (length<0)"); } indent (-1); } dvbsnoop-1.4.50/src/pes/mpeg2_video.c0000744000076400001440000004072210354356246013054 /* $Id: mpeg2_video.c,v 1.3 2005/12/27 23:30:29 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) ISO 13818-2 MPEG-2 Video $Log: mpeg2_video.c,v $ Revision 1.3 2005/12/27 23:30:29 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.2 2005/11/23 23:06:10 rasc ISO13818-2 MPEG2 sequence header Revision 1.1 2005/11/10 00:07:18 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix */ #include "dvbsnoop.h" #include "mpeg2_video.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/helper.h" #include "misc/output.h" // -- ISO 13818-2, 6.3.12 Picture display extension static int number_of_frame_centre_offsets = 0; // ------------------------------------------------------------------ /* -- MPEG-2 Sequence End -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodeSequenceEnd (int v, u_char *b, int len) { // .. nothing to do... return; } /* -- MPEG-2 User Data -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodeUserData (int v, u_char *b, int len) { // outBit_Sx_NL (3,"packet_start_code: ", b, 0, 24); // outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, // (char *(*)(u_long))dvbstrPESstream_ID ); print_databytes (v,"User data:", b+4, len-4); } /* -- MPEG-2 GOP, Group of Pictures -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodeGroupOfPictures (int v, u_char *b, int len) { // outBit_Sx_NL (3,"packet_start_code: ", b, 0, 24); // outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, // (char *(*)(u_long))dvbstrPESstream_ID ); // len -= 4; b += 4; // outBit_Sx_NL (4,"time_code: ", b, 0, 25); out_nl (v,"time_code:"); indent (+1); outBit_Sx_NL (v,"drop_frame_flag: ", b, 0, 1); outBit_Sx_NL (v,"time_code_hours: ", b, 1, 5); outBit_Sx_NL (v,"time_code_minutes: ", b, 6, 6); outBit_Sx_NL (v,"marker_bit: ", b, 12, 1); outBit_Sx_NL (v,"time_code_seconds: ", b, 13, 6); outBit_Sx_NL (v,"time_code_pictures: ", b, 19, 6); indent (-1); outBit_Sx_NL (v,"closed_gop: ", b, 25, 1); outBit_Sx_NL (v,"broken_link: ", b, 26, 1); } /* -- MPEG-2 sequence header -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodeSequenceHeader (int v, u_char *b, int len) { int liqm; int nliqm; int bc; // bit offset count; // outBit_Sx_NL (3,"packet_start_code: ", b, 0, 24); // outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, // (char *(*)(u_long))dvbstrPESstream_ID ); // len -= 4; b += 4; outBit_Sx_NL (v,"horizontal_size_value: ", b, 0, 12); outBit_Sx_NL (v,"vertical_size_value: ", b, 12, 12); outBit_S2x_NL(v,"aspect_ratio_information: ", b, 24, 4, (char *(*)(u_long))dvbstrAspectRatioInfo_FLAG); outBit_S2x_NL(v,"frame_rate_code: ", b, 28, 4, (char *(*)(u_long))dvbstrMPEG_FrameRateCode); outBit_S2Tx_NL(v,"bit_rate_value: ", b, 32, 18, "* 400 bit/s"); outBit_Sx_NL (v,"marker_bit: ", b, 50, 1); outBit_Sx_NL (v,"vbv_buffer_size_value: ", b, 51, 10); outBit_Sx_NL (v,"contraint_parameters_flag: ", b, 61, 1); liqm = outBit_Sx_NL (v,"load_intra_quantiser_matrix: ", b, 62, 1); bc = 63; if (liqm) { // 8x[64] print_BitMatrix (v,"intra_quantiser_matrix: ", b, bc, 8,64); bc += 8*64; } nliqm = outBit_Sx_NL (v,"load_non_intra_quantiser_matrix: ", b, bc, 1); bc++; if (nliqm) { // 8x[64] print_BitMatrix (v,"non_intra_quantiser_matrix: ", b, bc, 8,64); bc += 8*64; } // -- ISO 13818-2, 6.3.12 Picture display extension number_of_frame_centre_offsets = 0; } /* -- MPEG-2 Picture Start -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodePictureHeader (int v, u_char *b, int len) { int pct; int bc; // bit count // outBit_Sx_NL (3,"packet_start_code: ", b, 0, 24); // outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, // (char *(*)(u_long))dvbstrPESstream_ID ); // len -= 4; bc = 32; // b += 4 outBit_Sx_NL (v,"temporal_reference: ", b, bc+ 0, 10); pct = outBit_S2x_NL(v,"picture_coding_type: ", b, bc+10, 3, (char *(*)(u_long)) dvbstrMPEG_PictureCodingType ); outBit_Sx_NL (v,"vbv_delay: ", b, bc+13, 16); // $$$ TODO 90 KHz Clock bc += 16; if (pct == 2 || pct == 3) { outBit_Sx_NL (v,"full_pel_forward_vector: ", b, bc+0, 1); outBit_Sx_NL (v,"forward_f_code: ", b, bc+1, 3); bc += 4; } if (pct == 3) { outBit_Sx_NL (v,"full_pel_backward_vector: ", b, bc+0, 1); outBit_Sx_NL (v,"backward_f_code: ", b, bc+1, 3); bc += 4; } // while (nextbits() == 1) while ( outBit_Sx_NL (v,"extra_bit_picture: ", b, bc+0, 1) ) { outBit_Sx_NL (v,"extra_information_picture: ", b, bc+1, 8); bc += 9; } } /* -- MPEG-2 Extension -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodeExtension (int v, u_char *b, int len) { int esci; // extension_start_code_identifier // outBit_Sx_NL (3,"packet_start_code: ", b, 0, 24); // outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, // (char *(*)(u_long))dvbstrPESstream_ID ); esci = outBit_S2x_NL (v,"extension_start_code_identifier: ", b+4, 0, 4, (char *(*)(u_long)) dvbstrMPEG_ExtensionStartCodeIdentifier); switch ( esci ) { case 0x01: // "Sequence Extension ID" MPEG2_decodeSequenceExtension (v, b, len); break; case 0x02: // "Sequence Display Extension ID" MPEG2_decodeSequenceDisplayExtension (v, b, len); break; case 0x03: // "Quant Matrix Extension ID" MPEG2_decodeQuantMatrixExtension (v, b, len); break; case 0x04: // "Copyright Extension ID" MPEG2_decodeCopyrightExtension(v, b, len); break; case 0x05: // "Sequence Scalable Extension ID" MPEG2_decodeSequenceScalableExtension (v, b, len); break; case 0x07: // "Picture Display Extension ID" MPEG2_decodePictureDisplayExtension (v, b, len); break; case 0x08: // "Picture Coding Extension ID" MPEG2_decodePictureCodingExtension (v, b, len); break; case 0x09: // "Picture Spatial Scalable Extension ID" MPEG2_decodePictureSpatialScalableExtension (v, b, len); break; case 0x0A: // "Picture Temporal Scalable Extension ID" MPEG2_decodePictureTemporalScalableExtension (v, b, len); break; default: print_databytes (v,"Unkown extension data (incl. start_code):", b, len); break; } } // // -- IMPORTANT: on all Extension IDs: // -- "packet start code" (sync, streamID) and "extension // -- start code identifier" already printed. // -- Buffer pointer and length are from packet start(!). // -- (so we start decoding at buffer+4 and + 4 bits) // /* -- MPEG-2 Sequence Extension -- ISO 13818-2 */ void MPEG2_decodeSequenceExtension (int v, u_char *b, int len) { int eb; b += 4; // outBit_S2x_NL (v,"profile_and_level_indication: ", b, 4, 8, // (char *(*)(u_long)) dvbstrMPEG_ProfileAndLevelIndication); out_nl (v,"profile_and_level_indication: "); indent (+1); eb = outBit_Sx_NL (v,"escape_bit: ", b, 4, 1); if (eb == 0) { outBit_S2x_NL (v,"profile_indication: ", b, 5, 3, (char *(*)(u_long)) dvbstrMPEG_ProfileIndication); outBit_S2x_NL (v,"level_indication: ", b, 8, 4, (char *(*)(u_long)) dvbstrMPEG_LevelIndication); } else { outBit_Sx_NL (v,"profile_and_level_indication [0..6]: ", b, 5, 7); } indent (-1); outBit_Sx_NL (v,"progressive_sequence: ", b, 12, 1); outBit_S2x_NL (v,"chroma_format: ", b, 13, 2, (char *(*)(u_long)) dvbstrMPEG_ChromaFormat); outBit_Sx_NL (v,"horizontal_size_extension: ", b, 15, 2); outBit_Sx_NL (v,"vertical_size_extension: ", b, 17, 2); outBit_Sx_NL (v,"bit_rate_extension: ", b, 19, 12); outBit_Sx_NL (v,"marker_bit: ", b, 31, 1); outBit_Sx_NL (v,"vbv_buffer_size_extension: ", b, 32, 8); outBit_Sx_NL (v,"low_delay: ", b, 40, 1); outBit_Sx_NL (v,"frame_rate_extension_n: ", b, 41, 2); outBit_Sx_NL (v,"frame_rate_extension_d: ", b, 43, 5); } /* -- MPEG-2 Sequence Display Extension -- ISO 13818-2 */ void MPEG2_decodeSequenceDisplayExtension (int v, u_char *b, int len) { int cd; b += 4; outBit_S2x_NL (v,"video_format: ", b, 4, 3, (char *(*)(u_long)) dvbstrMPEG_VideoFormat); cd = outBit_Sx_NL (v,"color_description: ", b, 7, 1); b++; if (cd) { outBit_S2x_NL (v,"color_primaries: ", b, 0, 8, (char *(*)(u_long)) dvbstrMPEG_ColorPrimaries); outBit_S2x_NL (v,"transfer_characteristics: ", b, 8, 8, (char *(*)(u_long)) dvbstrMPEG_TransferCharacteristics); outBit_S2x_NL (v,"matrix_coefficients: ", b, 16, 8, (char *(*)(u_long)) dvbstrMPEG_MatrixCoefficients); b += 3; } outBit_Sx_NL (v,"display_horizontal_size: ", b, 0, 14); outBit_Sx_NL (v,"marker_bit: ", b, 14, 1); outBit_Sx_NL (v,"display_vertical_size: ", b, 15, 14); } /* -- MPEG-2 Sequence Scalable Extension -- ISO 13818-2 */ void MPEG2_decodeSequenceScalableExtension (int v, u_char *b, int len) { int sm; int pme; int bc; // bit count bc = 32; sm = outBit_S2x_NL (v,"scalable_mode: ", b, bc+4, 2, (char *(*)(u_long)) dvbstrMPEG_ScalableMode); outBit_Sx_NL (v,"layer_id: ", b, bc+6, 4); bc += 10; if (sm == 1) { // spacial scalability outBit_Sx_NL (v,"lower_layer_prediction_horizontal_size: ", b, bc+ 0, 14); outBit_Sx_NL (v,"marker_bit: ", b, bc+14, 1); outBit_Sx_NL (v,"lower_layer_prediction_vertical_size: ", b, bc+15, 14); outBit_Sx_NL (v,"horizontal_subsampling_factor_m: ", b, bc+29, 5); outBit_Sx_NL (v,"horizontal_subsampling_factor_n: ", b, bc+34, 5); outBit_Sx_NL (v,"vertical_subsampling_factor_m: ", b, bc+39, 5); outBit_Sx_NL (v,"vertical_subsampling_factor_n: ", b, bc+44, 5); bc += 49; } if (sm == 3) { // temporal scalability pme = outBit_Sx_NL (v,"picture_mux_enable: ", b, bc+ 0, 1); bc++; if (pme) { outBit_Sx_NL (v,"mux_to_progressive_sequence: ", b, bc+ 0, 1); bc++; } outBit_Sx_NL (v,"picture_mux_order: ", b, bc+ 0, 3); outBit_Sx_NL (v,"picture_mux_factor: ", b, bc+ 3, 3); } } /* -- MPEG-2 Picture Coding Extension -- ISO 13818-2 */ void MPEG2_decodePictureCodingExtension (int v, u_char *b, int len) { int cdf; b += 4; outBit_Sx_NL (v,"f_code[forward][horizontal]: ", b, 4, 4); outBit_Sx_NL (v,"f_code[forward][vertical]: ", b, 8, 4); outBit_Sx_NL (v,"f_code[backward][horizontal]: ", b, 12, 4); outBit_Sx_NL (v,"f_code[backward][vertical]: ", b, 16, 4); outBit_S2x_NL (v,"intra_dc_precision: ", b, 20, 2, (char *(*)(u_long)) dvbstrMPEG_Intra_DC_Precision); outBit_S2x_NL (v,"picture_structure: ", b, 22, 2, (char *(*)(u_long)) dvbstrMPEG_PictureStructure); outBit_Sx_NL (v,"top_field_first: ", b, 24, 1); outBit_Sx_NL (v,"frame_pred_frame_dct: ", b, 25, 1); outBit_Sx_NL (v,"concealment_motion_vectors: ", b, 26, 1); outBit_Sx_NL (v,"q_scale_type: ", b, 27, 1); outBit_Sx_NL (v,"intra_vlc_format: ", b, 28, 1); outBit_Sx_NL (v,"alternate_scan: ", b, 29, 1); outBit_Sx_NL (v,"repeat_first_field: ", b, 30, 1); outBit_Sx_NL (v,"chroma_420_type: ", b, 31, 1); outBit_Sx_NL (v,"progressive_frame: ", b, 32, 1); cdf = outBit_Sx_NL (v,"composite_display_flag: ", b, 33, 1); if (cdf) { outBit_Sx_NL (v,"v_axis: ", b, 34, 1); outBit_Sx_NL (v,"field_sequence: ", b, 35, 3); outBit_Sx_NL (v,"sub_carrier: ", b, 38, 1); outBit_Sx_NL (v,"burst_amplitude: ", b, 39, 7); outBit_Sx_NL (v,"sub_carrier_phase: ", b, 46, 8); } } /* -- MPEG-2 Quant Matrix Extension -- ISO 13818-2 */ void MPEG2_decodeQuantMatrixExtension (int v, u_char *b, int len) { int bc; int liqm; int lniqm; int lciqm; int lcniqm; b += 4; liqm = outBit_Sx_NL (v,"load_intra_quantiser_matrix: ", b, 4, 1); bc = 5; if (liqm) { // 8x[64] print_BitMatrix (v,"intra_quantiser_matrix: ", b, bc, 8,64); bc += 8*64; } lniqm = outBit_Sx_NL (v,"load_non_intra_quantiser_matrix: ", b, bc, 1); bc++; if (lniqm) { // 8x[64] print_BitMatrix (v,"non_intra_quantiser_matrix: ", b, bc, 8,64); bc += 8*64; } lciqm = outBit_Sx_NL (v,"load_chroma_intra_quantiser_matrix: ", b, bc, 1); bc++; if (lciqm) { // 8x[64] print_BitMatrix (v,"chroma_intra_quantiser_matrix: ", b, bc, 8,64); bc += 8*64; } lcniqm = outBit_Sx_NL (v,"load_chroma_non_intra_quantiser_matrix: ", b, bc, 1); bc++; if (lcniqm) { // 8x[64] print_BitMatrix (v,"chroma_non_intra_quantiser_matrix: ", b, bc, 8,64); bc += 8*64; } } /* -- MPEG-2 Picture Display Extension -- ISO 13818-2 */ void MPEG2_decodePictureDisplayExtension (int v, u_char *b, int len) { int bc; int bit_len; bc = 32 + 4; // // $$$ TODO // // -- ISO 13818-2, 6.3.12 Picture display extension // // if ( progressive_sequence == 1) { // if ( repeat_first_field == '1' ) { // if ( top_field_first == '1' ) // number_of_frame_centre_offsets = 3 // else // number_of_frame_centre_offsets = 2 // } else { // number_of_frame_centre_offsets = 1 // } // } else { // if (picture_structure == "field") { // number_of_frame_centre_offsets = 1 // } else { // if (repeat_first_field == '1' ) // number_of_frame_centre_offsets = 3 // else // number_of_frame_centre_offsets = 2 // } // } // -- as long we do not have implemented "number_of_frame_centre_offsets", // -- we are using length information... // // $$$ TODO for ( i=0; i= 34 ) { outBit_Sx_NL (v,"frame_centre_horizontal_offset: ", b, bc+ 0, 16); outBit_Sx_NL (v,"marker_bit: ", b, bc+16, 1); outBit_Sx_NL (v,"frame_centre_vertical_offset: ", b, bc+17, 16); outBit_Sx_NL (v,"marker_bit: ", b, bc+33, 1); out_NL (v); bc += 34; bit_len -= 34; } } /* -- MPEG-2 Picture temporal scalable extension -- ISO 13818-2 */ void MPEG2_decodePictureTemporalScalableExtension (int v, u_char *b, int len) { b += 4; outBit_Sx_NL (v,"reference_select_code: ", b, 4, 2); outBit_Sx_NL (v,"forward_temporal_reference: ", b, 6, 10); outBit_Sx_NL (v,"marker_bit: ", b, 16, 1); outBit_Sx_NL (v,"backward_temporal_reference: ", b, 17, 10); } /* -- MPEG-2 Picture spatial scalable extension -- ISO 13818-2 */ void MPEG2_decodePictureSpatialScalableExtension (int v, u_char *b, int len) { b += 4; outBit_Sx_NL (v,"lower_layer_temporal_reference: ", b, 4, 10); outBit_Sx_NL (v,"marker_bit: ", b, 14, 1); outBit_Sx_NL (v,"lower_layer_horizontal_offset: ", b, 15, 15); outBit_Sx_NL (v,"marker_bit: ", b, 30, 1); outBit_Sx_NL (v,"lower_layer_vertical_offset: ", b, 31, 15); outBit_Sx_NL (v,"spatial_temporal_weight_code_table_index: ", b,46, 2); outBit_Sx_NL (v,"lower_layer_progressive_frame: ", b, 48, 1); outBit_Sx_NL (v,"lower_layer_deinterlaced_field_select: ", b, 49, 1); } /* -- MPEG-2 Copyright Extension -- ISO 13818-2 */ void MPEG2_decodeCopyrightExtension (int v, u_char *b, int len) { b += 4; outBit_Sx_NL (v,"copyright_flag: ", b, 4, 1); outBit_Sx_NL (v,"copyright_identifier: ", b, 5, 8); outBit_S2x_NL (v,"original_or_copy: ", b, 13, 1, (char *(*)(u_long)) dvbstrMPEG_Original_Or_Copy); outBit_Sx_NL (v,"reserved: ", b, 14, 7); outBit_Sx_NL (v,"marker_bit: ", b, 21, 1); outBit_Sx_NL (v,"copyright_number_1: ", b, 22, 20); outBit_Sx_NL (v,"marker_bit: ", b, 42, 1); outBit_Sx_NL (v,"copyright_number_2: ", b, 43, 22); outBit_Sx_NL (v,"marker_bit: ", b, 65, 1); outBit_Sx_NL (v,"copyright_number_3: ", b, 66, 22); } // ------------------------------------------------------------------ /* -- MPEG-2 Picture Data SLICE -- ISO 13818-2 -- Sync and streamID already displayed */ void MPEG2_decodeSlice (int v, u_char *b, int len) { // outBit_Sx_NL (3,"packet_start_code: ", b, 0, 24); // outBit_S2x_NL(3,"Stream_id: ", b, 24, 8, // (char *(*)(u_long))dvbstrPESstream_ID ); // $$$ TODO print_databytes (v+2,"MPEG-2 Slice (incl. sync + id):", b, len); } dvbsnoop-1.4.50/src/ts/0000777000076400001440000000000010630324343010413 5dvbsnoop-1.4.50/src/ts/tslayer.h0000744000076400001440000000115710457510232012171 /* $Id: tslayer.h,v 1.12 2006/07/19 20:05:46 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __TSLAYER_H #define __TSLAYER_H void processTS_packet (u_int pid, long packet_nr, u_char *b, int len); void decodeTS_packet (u_char *b, int len); void decodeTS_iso13818 (u_char *b, int len); void decodeTS_NullPacket (u_char *b, int len); int ts_adaptation_field (u_char *b); int ts_adaptation_field_extension (u_char *b); int print_PCR_field (int v, const char *str, u_char *b, int bit_offset); #endif dvbsnoop-1.4.50/src/ts/ts2secpes.h0000744000076400001440000000144510356276762012440 /* $Id: ts2secpes.h,v 1.8 2006/01/02 18:24:34 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __TS2SECPES_H #define __TS2SECPES_H int ts2SecPesInit (void); void ts2SecPesFree (void); int ts2SecPes_AddPacketStart (int pid, int cc, u_char *b, u_int len); int ts2SecPes_AddPacketContinue (int pid, int cc, u_char *b, u_int len); void ts2SecPes_subdecode (u_char *b, int len, u_int pid); int ts2SecPes_checkAndDo_PacketSubdecode_Output (void); int ts2SecPes_LastPacketReadSubdecode_Output (void); void ts2SecPes_Output_subdecode (u_int overleap_bytes); void ts2sec_multipacket (u_char *b, int len, u_int pid); void ts2ps_pes_multipacket (u_char *b, int len, u_int pid); #endif dvbsnoop-1.4.50/src/ts/ts_cc_check.h0000744000076400001440000000056510356276762012757 /* $Id: ts_cc_check.h,v 1.2 2006/01/02 18:24:34 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __TS_CC_CHECK_H #define __TS_CC_CHECK_H void ts_cc_init (void); void ts_cc_free (void); void ts_cc_SetPid (int pid); char *ts_cc_StatusStr (int cc); #endif dvbsnoop-1.4.50/src/ts/ts_mip.h0000744000076400001440000000113110373750011011767 /* $Id: ts_mip.h,v 1.1 2006/02/12 23:17:13 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __TS_MIP_H #define __TS_MIP_H void decodeTS_MIP (u_char *b, int len); int MIP_function (u_char *b); void MIP_FUNC_tx_time_offset (u_char *b); void MIP_FUNC_tx_frequency_offset (u_char *b); void MIP_FUNC_tx_power (u_char *b); void MIP_FUNC_private_data (u_char *b); void MIP_FUNC_cell_id (u_char *b); void MIP_FUNC_enable (u_char *b); void MIP_FUNC_bandwidth (u_char *b); #endif dvbsnoop-1.4.50/src/ts/ts_misc.h0000744000076400001440000000100310373750011012133 /* $Id: ts_misc.h,v 1.1 2006/02/12 23:17:13 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __TS_MISC_H #define __TS_MISC_H // -- Transport Stream Packet Header Data typedef struct _tsphd { int sync; int tei; int pusi; int tprio; int tsc; int afc; int pid; int cc; } TSPHD; int decodeTS_PacketHeader (u_char *b, TSPHD *header_data); int check_TS_PID_special (u_int pid); #endif dvbsnoop-1.4.50/src/ts/Makefile.am0000744000076400001440000000036110373727722012400 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libts.a noinst_HEADERS = \ tslayer.h \ ts2secpes.h \ ts_cc_check.h \ ts_mip.h \ ts_misc.h libts_a_SOURCES = \ tslayer.c \ ts2secpes.c \ ts_cc_check.c \ ts_mip.c \ ts_misc.c dvbsnoop-1.4.50/src/ts/Makefile.in0000644000076400001440000002740510630302151012375 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libts_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/ts DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libts_a_AR = $(AR) $(ARFLAGS) libts_a_LIBADD = am_libts_a_OBJECTS = tslayer.$(OBJEXT) ts2secpes.$(OBJEXT) \ ts_cc_check.$(OBJEXT) ts_mip.$(OBJEXT) ts_misc.$(OBJEXT) libts_a_OBJECTS = $(am_libts_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ts2secpes.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ts_cc_check.Po ./$(DEPDIR)/ts_mip.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/ts_misc.Po ./$(DEPDIR)/tslayer.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libts_a_SOURCES) DIST_SOURCES = $(libts_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libts.a noinst_HEADERS = \ tslayer.h \ ts2secpes.h \ ts_cc_check.h \ ts_mip.h \ ts_misc.h libts_a_SOURCES = \ tslayer.c \ ts2secpes.c \ ts_cc_check.c \ ts_mip.c \ ts_misc.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libts.a: $(libts_a_OBJECTS) $(libts_a_DEPENDENCIES) -rm -f libts.a $(libts_a_AR) libts.a $(libts_a_OBJECTS) $(libts_a_LIBADD) $(RANLIB) libts.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts2secpes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts_cc_check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts_mip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tslayer.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/ts/tslayer.c0000744000076400001440000002566210457533364012206 /* $Id: tslayer.c,v 1.28 2006/07/19 22:49:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Transport Stream Decode/Table section $Log: tslayer.c,v $ Revision 1.28 2006/07/19 22:49:24 rasc no message Revision 1.27 2006/07/19 20:05:46 rasc Special handling for null packets Revision 1.26 2006/02/12 23:17:13 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.25 2006/01/02 18:24:34 rasc just update copyright and prepare for a new public tar ball Revision 1.24 2005/10/20 22:25:31 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.23 2005/09/09 14:20:31 rasc TS continuity sequence check (cc verbose output) Revision 1.22 2005/09/02 14:11:36 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.21 2005/08/02 22:57:47 rasc Option -N, rewrite offline filters (TS & Section) Revision 1.20 2004/10/12 20:37:48 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.19 2004/04/15 22:29:23 rasc PMT: some brainded section check TS: filter single pids from multi-pid ts-input-file minor enhancements Revision 1.18 2004/04/15 03:38:51 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.17 2004/04/05 17:32:14 rasc mass typo fix adaption --> adaptation Revision 1.16 2004/01/06 20:06:36 rasc revert a change for -s signal + small adaptions (frontend.h uses enums instead of #defines, so committ didn't work...) Revision 1.15 2004/01/06 14:06:11 rasc no message Revision 1.14 2004/01/06 03:13:26 rasc TS prints PES/Section ID on payload_start Revision 1.13 2004/01/02 16:40:44 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.12 2004/01/02 02:45:33 rasc no message Revision 1.11 2004/01/02 00:00:42 rasc error output for buffer overflow Revision 1.10 2004/01/01 20:09:43 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.9 2003/12/17 23:21:35 rasc PES DSM-CC ack and control commands according ITU H.222.0 Annex B Revision 1.8 2003/12/17 23:15:06 rasc PES DSM-CC ack and control commands according ITU H.222.0 Annex B Revision 1.7 2003/12/07 23:36:13 rasc pidscan on transponder - experimental(!) Revision 1.6 2003/11/26 16:27:48 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.5 2003/11/24 23:52:18 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.4 2003/10/24 22:17:24 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "tslayer.h" #include "ts2secpes.h" #include "ts_mip.h" #include "ts_misc.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" #include "misc/print_header.h" #include "misc/cmdline.h" // // -- process TS packet (in sync) // -- hexdump, subdecode processing, decoding // void processTS_packet (u_int pid, long pkt_nr, u_char *b, int len) { OPTION *opt = getOptionPtr(); // -- subdecode prev. collected TS data // -- push new data if (opt->printdecode && opt->ts_subdecode) { ts2SecPes_subdecode (b, len, pid); } // -- new packet, output header indent (0); print_packet_header (opt, "TS", opt->pid, pkt_nr, len); // hex output (also on wrong packets) if (opt->buffer_hexdump) { printhex_buf (0, b, len); out_NL(0); } // -- decode protocol (if ts packet) if (opt->printdecode) { decodeTS_packet (b, len); out_nl (3,"=========================================================="); out_NL (3); if (opt->ts_subdecode) { // -- check if stored packet(s) length is sufficient for output ts2SecPes_checkAndDo_PacketSubdecode_Output(); } } } // // -- Dispatch TS packet // --- Standard Transport Stream // --- Special Transport Streams... // void decodeTS_packet (u_char *b, int len) { int pid; pid = getBits (b, 0,11,13); // -- see also ts_misc.c-> special pids!! switch (pid) { case 0x15: // MIP, TS 101 191 decodeTS_MIP (b, len); break; case 0x1FFF: // NULL PACKET (ISO 13818-1) decodeTS_NullPacket (b, len); break; default: // ISO 13818-1 decodeTS_iso13818 (b, len); break; } } // // -- Decode TS packet content // -- Standard TS packet ISO 13818 // void decodeTS_iso13818 (u_char *b, int len) { /* ISO 13818-1 2.4.3.2 */ int n; TSPHD h; // // -- decode packet header (32 bit) // n = decodeTS_PacketHeader (b, &h); len -= n; b += n; if (h.afc & 0x2) { indent (+1); out_nl (3,"Adaptation_field: "); indent (+1); n = ts_adaptation_field (b); b += n; len -= n; indent (-1); indent (-1); } if (h.afc & 0x1) { indent (+1); out_nl (3,"Payload: (len: %d)",len); // -- if payload_start, check PES/SECTION if (h.pusi && ! (h.tsc || h.tei) ) { indent (+1); if (b[0]==0x00 && b[1]==0x00 && b[2]==0x01) { // -- PES outBit_S2x_NL (4,"==> PES-stream: ", b+3, 0,8, (char *(*)(u_long))dvbstrPESstream_ID ); } else { // -- section (eval pointer field) int pointer = b[0]+1; outBit_Sx_NL (4,"==> pointer_field: ", b, 0,8); outBit_S2x_NL (4,"==> Section table: ", b+pointer, 0,8, (char *(*)(u_long))dvbstrTableID ); } indent (-1); } print_databytes (5, "Data-Bytes:", b,len); indent (-1); } if (h.afc == 0x00) { // -- ISO/IEC reserved... print_databytes (5, "Data-Bytes:", b,len); } } // // -- Decode TS packet content // -- Standard TS Null Packet 0x1FFF // void decodeTS_NullPacket (u_char *b, int len) { /* ISO 13818-1 2.4.3.2 */ int n; TSPHD h; // // -- decode packet header (32 bit) // n = decodeTS_PacketHeader (b, &h); len -= n; b += n; // Null Packet may contain any data print_databytes (5, "Data-Bytes:", b,len); } int ts_adaptation_field (u_char *b) { int len; int af_len; int pcr_flag; int opcr_flag; int sp_flag; int tpd_flag; int afe_flag; af_len = outBit_Sx_NL (3,"adaptation_field_length: ", b, 0, 8); b += 1; len = af_len; if (af_len == 0) return 1; outBit_Sx_NL (3,"discontinuity_indicator: ", b, 0, 1); outBit_Sx_NL (3,"random_access_indicator: ", b, 1, 1); // $$$ TODO discontinuity signalling check outBit_Sx_NL (3,"elementary_stream_priotity_indicator: ", b, 2, 1); pcr_flag = outBit_Sx_NL (3,"PCR_flag: ", b, 3, 1); opcr_flag = outBit_Sx_NL (3,"OPCR_flag: ", b, 4, 1); sp_flag = outBit_Sx_NL (3,"splicing_point_flag: ", b, 5, 1); tpd_flag = outBit_Sx_NL (3,"transport_private_data_flag: ", b, 6, 1); afe_flag = outBit_Sx_NL (3,"adaptation_field_extension_flag: ", b, 7, 1); b += 1; len -= 1; if (pcr_flag) { int n = print_PCR_field (3, "program_clock_reference", b, 0); b += n; len -= n; } if (opcr_flag) { int n = print_PCR_field (3, "original_program_clock_reference", b, 0); b += n; len -= n; } if (sp_flag) { outBit_Sx_NL (3,"splice_countdown: ", b, 0, 8); b += 1; len -= 1; } if (tpd_flag) { int len1; int n; len1 = outBit_Sx_NL (3,"transport_private_data_length: ", b, 0, 8); print_databytes (3,"Transport_private_data:",b+1,len1); n = 1 + len1; b += n; len -= n; } // Extension if (afe_flag) { int n; indent (+1); n = ts_adaptation_field_extension (b); b += n; len -= n; indent (-1); } // Stuffing bytes if (len > 0) { out_nl (3,"(Stuffing_bytes length: %d) ",len); print_databytes (3,"Stuffing bytes:",b,len); } return (af_len + 1); } int ts_adaptation_field_extension (u_char *b) { int len; int afe_len; int ltw_flag; int pr_flag; int ss_flag; afe_len = outBit_Sx_NL (3,"adaptation_field_extension_length: ", b, 0, 8); b += 1; len = afe_len; if (afe_len == 0) return 1; ltw_flag = outBit_Sx_NL (3,"ltw_flag: ", b, 0, 1); pr_flag = outBit_Sx_NL (3,"piecewise_rate_flag: ", b, 1, 1); ss_flag = outBit_Sx_NL (3,"seamless_splice_flag: ", b, 2, 1); outBit_Sx_NL (3,"reserved: ", b, 3, 5); b += 1; len -= 1; if (ltw_flag) { outBit_Sx_NL (3,"ltw_valid_flag: ", b, 0, 1); outBit_Sx_NL (3,"ltw_offset: ", b, 1, 15); b += 2; len -= 2; } if (pr_flag) { outBit_Sx_NL (3,"reserved: ", b, 0, 2); outBit_Sx_NL (3,"piecewise_rate: ", b, 2, 22); b += 3; len -= 3; } if (ss_flag) { outBit_Sx_NL (3,"splice_type: ", b, 0, 4); { // $$$ TODO: this is basically the same as for PES long long xTS_32_30; long long xTS_29_15; long long xTS_14_0; long long ull; xTS_32_30 = outBit_Sx_NL (3,"DTS_next_AU[32..30]: ", b, 4, 3); outBit_Sx_NL (3,"marker_bit: ", b, 7, 1); xTS_29_15 = outBit_Sx_NL (3,"DTS_next_AU[29..15]: ", b, 8, 15); outBit_Sx_NL (3,"marker_bit: ", b, 23, 1); xTS_14_0 = outBit_Sx_NL (3,"DTS_next_AU[14..0]: ", b, 24, 15); outBit_Sx_NL (3,"marker_bit: ", b, 39, 1); ull = (xTS_32_30<<30) + (xTS_29_15<<15) + xTS_14_0; out (3," ==> DTS_next_AU: "); print_timebase90kHz (3, ull); out_NL (3); } b += 5; len -= 5; } if (len > 0) { out_nl (3,"(Reserved Bytes length: %d) ",len); print_databytes (3,"Reserved bytes:",b,len); } return afe_len + 1; } /* * PCR * Len is 6 bytes fixed */ int print_PCR_field (int v, const char *str, u_char *b, int bit_offset) { long long pcr_H, pcr_L, pcr_Ext; long long ull; int bo = bit_offset; int v1 = v+1; out_nl (v,"%s:",str); indent (+1); pcr_H = outBit_Sx_NL (v1,"baseH: ", b, bo+ 0, 1); pcr_L = outBit_Sx_NL (v1,"baseL: ", b, bo+ 1, 32); outBit_Sx_NL (v1,"reserved: ", b, bo+33, 6); pcr_Ext = outBit_Sx_NL (v1,"extension: ", b, bo+39, 9); ull = (pcr_H << 32) + pcr_L; out (v," ==> %s: ", str); // print_timebase90kHz (v, ull); print_pcr_time (v, ull,pcr_Ext); out_NL (v); indent (-1); return 6; } dvbsnoop-1.4.50/src/ts/ts2secpes.c0000744000076400001440000003127510373750011012416 /* $Id: ts2secpes.c,v 1.15 2006/02/12 23:17:13 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Transport Stream Sub-Decode PES / SECTION $Log: ts2secpes.c,v $ Revision 1.15 2006/02/12 23:17:13 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.14 2006/01/02 18:24:34 rasc just update copyright and prepare for a new public tar ball Revision 1.13 2005/11/08 23:15:27 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.12 2005/10/25 18:41:41 rasc minor code rewrite Revision 1.11 2005/10/23 22:50:28 rasc - New: started ISO 13818-2 StreamIDs - New: decode multiple PS/PES packets within TS packets (-tssubdecode) Revision 1.10 2005/10/23 20:58:15 rasc subdecode multiple SI packets with TS packet using -tssubdecode Revision 1.9 2005/10/20 22:25:31 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.8 2005/09/09 14:20:31 rasc TS continuity sequence check (cc verbose output) Revision 1.7 2005/09/06 23:13:52 rasc catch OS signals (kill ...) for smooth program termination Revision 1.6 2004/04/18 19:30:32 rasc Transport Stream payload sub-decoding (Section, PES data) improved Revision 1.5 2004/04/15 23:22:58 rasc no message Revision 1.4 2004/04/15 22:29:23 rasc PMT: some brainded section check TS: filter single pids from multi-pid ts-input-file minor enhancements Revision 1.3 2004/04/15 10:53:22 rasc minor changes Revision 1.2 2004/04/15 04:08:49 rasc no message Revision 1.1 2004/04/15 03:40:39 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets */ #include "dvbsnoop.h" #include "ts2secpes.h" #include "ts_misc.h" #include "sections/sectables.h" #include "pes/pespacket.h" #include "misc/packet_mem.h" #include "misc/output.h" #define TS_SUBDEC_BUFFER (128*1024) enum { TSD_no_error = 0, TSD_output_done, TSD_no_pui, TSD_error, TSD_continuity_error, TSD_scrambled_error, TSD_pid_change, TSD_mem_error}; typedef struct _TS_SUBDEC { int mem_handle; int pid; int status; // content is invalid? int continuity_counter; // 4 bit max !! int packet_counter; int payload_length; // total length of PES or SECTION to be read, 0 = unspecified } TS_SUBDEC; static TS_SUBDEC tsd; //------------------------------------------------------------ // // -- init TS sub decoding buffer // -- return: < 0: fail // int ts2SecPesInit (void) { tsd.mem_handle = packetMem_acquire (TS_SUBDEC_BUFFER); tsd.pid = -1; tsd.status = TSD_no_pui; tsd.continuity_counter = -1; tsd.packet_counter = 0; tsd.payload_length = 0; return tsd.mem_handle; } // // -- free TS sub decoding buffer // void ts2SecPesFree (void) { packetMem_free (tsd.mem_handle); } // // -- add TS data // -- return: 0 = fail // int ts2SecPes_AddPacketStart (int pid, int cc, u_char *b, u_int len) { int l; // -- duplicate packet ? if ((pid == tsd.pid) && (cc == tsd.continuity_counter)) { return 1; } tsd.status = TSD_no_error; tsd.pid = pid; tsd.continuity_counter = cc; tsd.packet_counter = 1; // -- Save PES/PS or SECTION length information of incoming packet // -- set 0 for unspecified length l = 0; // -- TS can contain multiple packets streamed in payload, so calc will be wrong!!! // -- so I skip this at this time... // -- $$$ code modification mark (1) start // if (len > 6) { // // Non-System PES (<= 0xBC) will have an unknown length (= 0) // if (b[0]==0x00 && b[1]==0x00 && b[2]==0x01 && b[3]>=0xBC) { // l = (b[4]<<8) + b[5]; // PES packet size... // if (l) l += 6; // length with PES-sync, etc. // } else { // int pointer = b[0]+1; // if (pointer+3 <= len) { // not out of this packet? // l = ((b[pointer+1] & 0x0F) << 8) + b[pointer+2]; // sect size (get_bits) // } // if (l) l += pointer + 3; // length with pointer & tableId // } // } // -- $$$ code modification mark (1) end // tsd.payload_length = l; packetMem_clear (tsd.mem_handle); if (! packetMem_add_data (tsd.mem_handle,b,len)) { tsd.status = TSD_mem_error; return 0; } return 1; } int ts2SecPes_AddPacketContinue (int pid, int cc, u_char *b, u_int len) { // -- duplicate packet? (this would be ok, due to ISO13818-1) if ((pid == tsd.pid) && (cc == tsd.continuity_counter)) { return 1; } // -- pid change in stream? (without packet start) // -- This is currently not supported $$$ TODO if ((tsd.status == TSD_no_error) && (pid != tsd.pid)) { tsd.status = TSD_pid_change; } // -- discontinuity error in packet ? if ((tsd.status == TSD_no_error) && (cc != (++tsd.continuity_counter%16))) { tsd.status = TSD_continuity_error; } tsd.continuity_counter = cc; if (tsd.status == TSD_no_error) { if (!packetMem_add_data (tsd.mem_handle,b,len) ) { tsd.status = TSD_mem_error; } else { tsd.packet_counter++; return 1; } } return 0; } //------------------------------------------------------------ // // -- TS SECTION/PES subdecoding // -- check TS buffer and push data to sub decoding buffer // -- on new packet start, output old packet data // void ts2SecPes_subdecode (u_char *b, int len, u_int opt_pid) { u_int transport_error_indicator; u_int payload_unit_start_indicator; u_int pid; u_int transport_scrambling_control; u_int continuity_counter; u_int adaptation_field_control; pid = getBits (b, 0,11,13); // -- filter pid? if (opt_pid >= 0 && opt_pid <= MAX_PID) { if (opt_pid != pid) return; } // -- no ts subdecode for special pids... if (check_TS_PID_special (pid)) return; transport_error_indicator = getBits (b, 0, 8, 1); payload_unit_start_indicator = getBits (b, 0, 9, 1); transport_scrambling_control = getBits (b, 0,24, 2); adaptation_field_control = getBits (b, 0,26, 2); continuity_counter = getBits (b, 0,28, 4); len -= 4; b += 4; // -- skip adaptation field if (adaptation_field_control & 0x2) { int n; n = b[0] + 1; b += n; len -= n; } // -- push data to subdecoding collector buffer // -- on packet start, output collected data of buffer if (adaptation_field_control & 0x1) { // -- payload buffering/decoding // -- oerks, this we cannot use if (transport_scrambling_control || transport_error_indicator) { tsd.status = TSD_scrambled_error; return; } // -- if payload_start, check PES/SECTION if (payload_unit_start_indicator) { // -- sections: pui-start && pointer != 0 push data to last section! // -- (PES would be also 0x00) int SI_offset = b[0]; // pointer if (SI_offset) { ts2SecPes_AddPacketContinue (pid, continuity_counter, b+1, (u_long)SI_offset); // -- because re-add data below, we have to fake cc tsd.continuity_counter--; } // $$$ TODO: here we have a flaw, when pointer != 0, we do not display the new // TS packet, but we are subdecoding (display) using the TS overflow data... // Workaround: pass SI_offset to output to display, that we are using data // from next TS packet... (this should do for now) // -- output data of prev. collected packets // -- if not already decoded or length was unspecified if ((tsd.status != TSD_output_done) && packetMem_length(tsd.mem_handle)) { ts2SecPes_Output_subdecode (SI_offset); } // -- first buffer data (also "old" prior to "pointer" offset...) ts2SecPes_AddPacketStart (pid, continuity_counter, b, (u_long)len); } else { // -- add more data ts2SecPes_AddPacketContinue (pid, continuity_counter, b, (u_long)len); } } } // // -- check if TS packet should already be sent to sub-decoding and output... // -- if so, do sub-decoding and do output // -- return: 0 = no output, 1 = output done // // $$$ Remark: this routine is obsolete and in fact does nothing, // due to code modification mark (1) // int ts2SecPes_checkAndDo_PacketSubdecode_Output (void) { // -- already read all data? decode & output data... if ( (tsd.payload_length) && (tsd.payload_length <= packetMem_length(tsd.mem_handle)) ) { if (tsd.status != TSD_output_done) { ts2SecPes_Output_subdecode (0); return 1; } } return 0; } // // -- last packet read subdecode output // --- This is needed when eof arrives, when reading files // --- and no new PUSI will follow. // -- return: 0 = no output, 1 = output done // int ts2SecPes_LastPacketReadSubdecode_Output (void) { if (tsd.status != TSD_output_done) { ts2SecPes_Output_subdecode (0); return 1; } return 0; } // // -- TS SECTION/PES subdecoding output // -- overleap_bytes: !=0 indicator how many bytes are from the "next" packet // -- (pointer!=0) // void ts2SecPes_Output_subdecode (u_int overleap_bytes) { indent (+1); out_NL (3); if (tsd.pid > MAX_PID) { out_nl (3,"TS sub-decoding (%d packet(s)):", tsd.packet_counter); } else { out_nl (3,"TS sub-decoding (%d packet(s) stored for PID 0x%04x):", tsd.packet_counter,tsd.pid & 0xFFFF); } if (overleap_bytes) { out_nl (3,"Subdecoding takes %u bytes from next TS packet", overleap_bytes); } out_nl (3,"====================================================="); if (tsd.status != TSD_no_error) { char *s = ""; switch (tsd.status) { case TSD_error: s = "unknown packet error"; break; case TSD_no_pui: s = "no data collected, no payload start"; break; case TSD_continuity_error: s = "packet continuity error"; break; case TSD_scrambled_error: s = "packet scrambled or packet error"; break; case TSD_pid_change: s = "PID change in TS stream"; break; case TSD_mem_error: s = "subdecoding buffer (allocation) error"; break; case TSD_output_done: s = "[data already displayed (this should never happen)]"; break; } out_nl (3,"Packet cannot be sub-decoded: %s",s); } else { u_char *b; u_int len; b = packetMem_buffer_start (tsd.mem_handle); len = (u_int) packetMem_length (tsd.mem_handle); if (b && len) { // -- PES/PS or SECTION if (b[0]==0x00 && b[1]==0x00 && b[2]==0x01) { out_nl (3,"TS contains PES/PS stream..."); ts2ps_pes_multipacket (b, len, tsd.pid); } else { int pointer = b[0]+1; b += pointer; out_nl (3,"TS contains Section..."); ts2sec_multipacket (b, len-pointer, tsd.pid); } } else { out_nl (3,"No prev. packet start found..."); } } out_NL (3); out_NL (3); indent (-1); tsd.status = TSD_output_done; } // // -- decode SI packets in saved TS data // -- check for consecutive SI packets // void ts2sec_multipacket (u_char *b, int len, u_int pid) { int sect_len; while (len > 0) { if (b[0] == 0xFF) break; // stuffing, no more data // sect_len = getBits (b, 0, 12, 12) + 3; sect_len = ((b[1] & 0x0F) << 8) + b[2] + 3; // sect size (getBits) if (sect_len > len) { // this should not happen! out_nl (3,"$$$ something is wrong here!!..."); break; } out_nl (3,"SI packet (length=%d): ",sect_len); out_NL (9); print_databytes (9,"SI packet hexdump:", b, sect_len); out_NL (9); indent (+1); decodeSI_packet (b, sect_len, pid); indent (-1); out_NL (3); b += sect_len; len -= sect_len; } } // // -- decode PS/PES packets in saved TS data // -- check for consecutive PS/PES packets // void ts2ps_pes_multipacket (u_char *b, int len, u_int pid) { int pkt_len; while (len > 0) { // we are on packet start: b[0..2] = 0x000001 pkt_len = 0; if (b[3] >0xBC) { // has length field? pkt_len = (b[4]<<8) + b[5]; // PES packet size... (getBits) if (pkt_len) pkt_len += 6; // not 0? get total length } if (pkt_len == 0) { // unbound stream?, seek next pkt int i = 5; while (i < (len-3)) { i++; // seek next 0x000001 if (b[i] != 0x00) continue; if (b[i+1] != 0x00) continue; if (b[i+2] != 0x01) continue; pkt_len = i; break; } } if (pkt_len == 0) { // still not found, or last pkt in buffer pkt_len = len; } out_nl (3,"PS/PES packet (length=%d): ",pkt_len); out_NL (9); print_databytes (9,"PS/PES packet hexdump:", b, pkt_len); out_NL (9); indent (+1); decodePS_PES_packet (b, pkt_len, pid); indent (-1); out_NL (3); b += pkt_len; len -= pkt_len; } } // // $$$ TODO: discontinuity signalling flag check? // // // $$$ TODO: hexdump prior to decoding (-pd 9) dvbsnoop-1.4.50/src/ts/ts_cc_check.c0000744000076400001440000000375110356276762012752 /* $Id: ts_cc_check.c,v 1.2 2006/01/02 18:24:34 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Transport Stream continuity counter check $Log: ts_cc_check.c,v $ Revision 1.2 2006/01/02 18:24:34 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2005/09/09 14:21:12 rasc TS continuity sequence check (cc verbose output) */ #include "dvbsnoop.h" #include "ts_cc_check.h" #include "misc/output.h" typedef struct _TS_CC { char last_continuity_counter; // 0..15 + special values } TS_CC; enum { CC_DISCONTINUED=127 }; static TS_CC tscc[MAX_PID+2]; static int current_pid; // reminder for current pid //------------------------------------------------------------ // // -- init TS sub decoding buffer // -- return: < 0: fail // void ts_cc_init (void) { int i; int n = (sizeof(tscc) / sizeof(tscc[0])); for (i=0; i < n; i++) { tscc[i].last_continuity_counter = CC_DISCONTINUED; } } void ts_cc_free (void) { return; } // // -- set current PID for checking CC // -- (this is workaround, because we can only deliver 1 param to // -- string routine using out_S2x...) // void ts_cc_SetPid (int pid) { current_pid = pid; } // // -- TS Continuity status check // -- (has to be compatible to dvbStr... routines!) // -- Return status string for display // char * ts_cc_StatusStr (int cc) { char *s = "(sequence ok)"; int pid = current_pid; // -- first time or discontinuity signalled if (tscc[pid].last_continuity_counter == CC_DISCONTINUED) { tscc[pid].last_continuity_counter = cc; return s; } // -- duplicate packet (same cc for pid) // -- check continuity counter if (tscc[pid].last_continuity_counter == cc) { s = "(duplicate packet)"; } else if (cc != ((tscc[pid].last_continuity_counter+1) % 16) ) { s = "(continuity error!)"; } tscc[pid].last_continuity_counter = cc; return s; } dvbsnoop-1.4.50/src/ts/ts_mip.c0000744000076400001440000001535410373760525012011 /* $Id: ts_mip.c,v 1.2 2006/02/13 00:31:01 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Transport Stream -- Mega-Frame Initialization Packet (MIP) -- ETSI TS 101 191 $Log: ts_mip.c,v $ Revision 1.2 2006/02/13 00:31:01 rasc no message Revision 1.1 2006/02/12 23:17:13 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Complete implementation (rasc) Basic code by (c) Cedric Delfosse for TDF-C2R, 2006 */ #include "dvbsnoop.h" #include "ts_mip.h" #include "ts_misc.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" // // -- decode TS MIP packet (PID: 0x15) // -- ETSI TS 101 191 // void decodeTS_MIP (u_char *b, int len) { int n; u_long t; TSPHD h; int slen; int ialen; // // -- decode packet header (32 bit) // n = decodeTS_PacketHeader (b, &h); len -= n; b += n; // transport_packet_header: // The transport_packet_header shall comply with ISO/IEC 13818-1 [1], clause 2.4.3.2, // tables 3 and 4. // The PID value for the Mega-frame initialization Packet (MIP) shall be 0 × 15. // The payload_unit_start_indicator is not used by the SFN synchronization // function and shall be set to 1. // // The transport_priority value is not used by the SFN synchronization // function and shall be set to 1. // The transport_scrambling_control value shall be set to 00 (not scrambled). // The adaptation_field_control value shall be set to 01 (payload only). // All other parameters are according to ISO/IEC 13818-1 [1], clause 2.4.3.2. // The Transport Packet Header (TPH) is mandatory. outBit_S2x_NL (3,"synchronization_id: ", b, 0, 8, (char *(*)(u_long))dvbstrTS_MIP_Syncronization); slen = outBit_Sx_NL (3,"section_length: ", b, 8, 8); outBit_Sx_NL (3,"pointer: ", b, 16, 16); outBit_Sx_NL (3,"periodic_flag: ", b, 32, 1); outBit_Sx_NL (3,"reserved: ", b, 33, 15); t = outBit_Sx (3,"synchronization_time_stamp: ", b, 48, 24); out_nl (3," [= %0lu.%04lu ms]", t / 10000, t % 10000) ; t = outBit_Sx (3,"maximum_delay: ", b, 72, 24); out_nl (3," [= %0lu.%04lu ms]", t / 10000, t % 10000) ; // outBit_Sx_NL (3,"tps_mip: ", b, 96, 32); out_nl (3,"tps_mips:"); indent (+1); outBit_S2x_NL (3,"constellation: ", b, 96+ 0, 2, (char *(*)(u_long))dvbstrTerrConstellation_FLAG ); outBit_S2x_NL (3,"hierarchy: ", b, 96+ 2, 3, (char *(*)(u_long))dvbstrTerrHierarchy_FLAG); outBit_S2x_NL (3,"code_rate: ", b, 96+ 5, 3, (char *(*)(u_long))dvbstrTerrCodeRate_FLAG); outBit_S2x_NL (3,"guard_interval: ", b, 96+ 8, 2, (char *(*)(u_long))dvbstrTerrGuardInterval_FLAG); outBit_S2x_NL (3,"transmission_mode: ", b, 96+10, 2, (char *(*)(u_long))dvbstrTerrTransmissionMode_FLAG); outBit_S2x_NL (3,"bandwidth: ", b, 96+12, 2, (char *(*)(u_long))dvbstrTerrBandwidth_SCHEME); outBit_S2x_NL (3,"priority: ", b, 96+14, 1, (char *(*)(u_long))dvbstrTerrPriority); outBit_S2x_NL (3,"DVB-H signalling: ", b, 96+15, 2, (char *(*)(u_long))dvbstrTerr_DVBH_service_indication); outBit_Sx_NL (3,"reserved: ", b, 96+17, 15); indent (-1); ialen = outBit_Sx_NL (3,"individual_addressing_length: ", b,128, 8); b += 17; len -= 17 + ialen; slen-= 15 + ialen; // // // if (ialen > 0) { out_nl (3,"Transmitter loop:"); indent (+1); while (ialen > 0) { int txi; int fl_len; txi = outBit_Sx (3,"tx_identifier: ", b, 0, 16); if (txi == 0x0000) out_nl (3," [= broadcast]"); else out_NL (3); fl_len = outBit_Sx_NL (3,"function_loop_length: ", b, 16, 8); b += 3; ialen -= 3 + fl_len; out_nl (3,"Function loop:"); indent (+1); while (fl_len > 0) { int l; l = MIP_function (b); b += l; fl_len -= l; out_NL (3); } indent (-1); } indent (-1); } // ialen > 0 outBit_Sx_NL (3,"CRC: ", b, 0, 32); b += 4; len -= 4; slen -= 4; if (len > 0) { print_databytes(3,"stuffing bytes:", b,len); } return; } // // -- MIP function dispatcher // int MIP_function (u_char *b) { int tag; int len; tag = outBit_S2x_NL (3,"function_tag: ", b, 0, 8, (char *(*)(u_long))dvbstrTS_MIP_FunctionTag); len = outBit_Sx_NL (3,"function_length: ", b, 0, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor/function printhex_buf (9, b,len+2); switch (tag) { case 0x00: MIP_FUNC_tx_time_offset (b); break; case 0x01: MIP_FUNC_tx_frequency_offset (b); break; case 0x02: MIP_FUNC_tx_power (b); break; case 0x03: MIP_FUNC_private_data (b); break; case 0x04: MIP_FUNC_cell_id (b); break; case 0x05: MIP_FUNC_enable (b); break; case 0x06: MIP_FUNC_bandwidth (b); break; default: // reserved print_databytes (4,"reserved function data:", b+2, len); break; } return len+2; // (total length) } /* * -- MIP functions */ void MIP_FUNC_tx_time_offset (u_char *b) { long t; // tag = b[0]; // len = b[1]; t = outBit_Sx (3,"time_offset: ", b, 16, 16); out_nl (3," [= %0ld.%04lu ms]", t / 10000, t % 10000) ; } void MIP_FUNC_tx_frequency_offset (u_char *b) { long o; // tag = b[0]; // len = b[1]; o = outBit_Sx (3,"frequency_offset: ", b, 16, 24); out_nl (3," [= %0ld.%03lu kHz]", o / 1000, o % 1000) ; } void MIP_FUNC_tx_power (u_char *b) { u_long p; // tag = b[0]; // len = b[1]; p = outBit_Sx (3,"tx_power: ", b, 16, 16); out_nl (3," [= %0lu.%01lu dbm]", p / 10, p % 10) ; } void MIP_FUNC_private_data (u_char *b) { int len; // tag = b[0]; len = b[1]; print_databytes (4,"private data:", b+2, len); } void MIP_FUNC_cell_id (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (3,"cell_id: ", b, 16, 16); outBit_Sx_NL (3,"wait_for_enable_flag: ", b, 32, 1); outBit_Sx_NL (3,"reserved: ", b, 33, 7); } void MIP_FUNC_enable (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; while (len > 0) { outBit_S2x_NL (3,"enable_function_tag: ", b, 0, 8, (char *(*)(u_long))dvbstrTS_MIP_FunctionTag); b++; len --; } } void MIP_FUNC_bandwidth (u_char *b) { // tag = b[0]; // len = b[1]; outBit_S2x_NL (3,"ch_bandwidth: ", b, 16, 7, (char *(*)(u_long))dvbstrTS_MIP_ChannelBandwidth); outBit_Sx_NL (3,"wait_for_enable_flag: ", b, 23, 1); } dvbsnoop-1.4.50/src/ts/ts_misc.c0000744000076400001440000000412310457510232012136 /* $Id: ts_misc.c,v 1.2 2006/07/19 20:05:46 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Transport Stream misc routines $Log: ts_misc.c,v $ Revision 1.2 2006/07/19 20:05:46 rasc Special handling for null packets Revision 1.1 2006/02/12 23:17:13 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) */ #include "dvbsnoop.h" #include "ts_misc.h" #include "ts_cc_check.h" #include "strings/dvb_str.h" #include "misc/output.h" // // -- Decode TS packet header content (4 Bytes len) // -- Print CC errors // -- Return: Transport Stream Packet Header Data (ptr) // -- Return: len in bytes (== 4) // int decodeTS_PacketHeader (u_char *b, TSPHD *h) { /* IS13818-1 2.4.3.2 */ h->sync = outBit_Sx_NL (3,"Sync-Byte 0x47: ", b, 0, 8); h->tei = outBit_S2x_NL (3,"Transport_error_indicator: ", b, 8, 1, (char *(*)(u_long))dvbstrTS_TEI ); h->pusi = outBit_S2x_NL (3,"Payload_unit_start_indicator: ", b, 9, 1, (char *(*)(u_long))dvbstrTS_PUSI ); h->tprio = outBit_Sx_NL (3,"transport_priority: ", b, 10, 1); h->pid = outBit_S2x_NL (3,"PID: ", b, 11,13, // (char *(*)(u_long))dvbstrTSpid_ID ); (char *(*)(u_long))dvbstrPID_assignment ); ts_cc_SetPid (h->pid); // set this here for ts_cc_check... h->tsc = outBit_S2x_NL (3,"transport_scrambling_control: ", b, 24, 2, (char *(*)(u_long))dvbstrTS_ScramblingCtrl_TYPE ); h->afc = outBit_S2x_NL (3,"adaptation_field_control: ", b, 26, 2, (char *(*)(u_long))dvbstrTS_AdaptationField_TYPE ); h->cc = outBit_S2x_NL (3,"continuity_counter: ", b, 28, 4, (char *(*)(u_long))ts_cc_StatusStr ); return 4; } // // -- Check if PID is a special TS // -- Return: 0 = Standard TS containing PES or SECTION // -- 1 = Special TS handling needed (and no subdecoding) // int check_TS_PID_special (u_int pid) { // see also TS pid dispatch switch (pid) { case 0x15: return 1; // MIP case 0x1FFF: return 1; // NULL PACKET } return 0; } dvbsnoop-1.4.50/src/datacarousel/0000777000076400001440000000000010630324344012435 5dvbsnoop-1.4.50/src/datacarousel/ait.h0000744000076400001440000000044310356276704013314 /* $Id: ait.h,v 1.4 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __AIT_H #define __AIT_H void section_MHP_AIT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc.h0000744000076400001440000000044510356276704013632 /* $Id: dsmcc.h,v 1.5 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_H #define __DSMCC_H void section_DSMCC (u_char *b, int len); #endif dvbsnoop-1.4.50/src/datacarousel/ints.h0000744000076400001440000000044510356276704013516 /* $Id: ints.h,v 1.8 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __INTS_H #define __INTS_H void section_DSMCC_INT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/datacarousel/unts.h0000744000076400001440000000044510356276704013532 /* $Id: unts.h,v 1.4 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __UNTS_H #define __UNTS_H void section_DSMCC_UNT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/datacarousel/mpe_fec.h0000744000076400001440000000052110356276704014132 /* $Id: mpe_fec.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __MPE_FEC_H #define __MPE_FEC_H void section_MPE_FEC (u_char *b, int len); int real_time_parameters (u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/datagram.h0000744000076400001440000000046210356276704014320 /* $Id: datagram.h,v 1.6 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _DATAGRAM_H #define _DATAGRAM_H void section_DSMCC_DATAGRAM (u_char *b, int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_ddb.h0000744000076400001440000000050610356276704014441 /* $Id: dsmcc_ddb.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_DDB_H #define __DSMCC_DDB_H int dsmcc_DownloadDataMessage (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm.h0000744000076400001440000000050310356276704014504 /* $Id: dsmcc_unm.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_UNM_H #define __DSMCC_UNM_H int dsmcc_UserNetworkMessage (int v, u_char *b, int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm_dsi.h0000744000076400001440000000052210356276704015344 /* $Id: dsmcc_unm_dsi.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_UNM_DSI_H #define __DSMCC_UNM_DSI_H int dsmcc_DownloadServerInitiate (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm_dii.h0000744000076400001440000000052210356276704015332 /* $Id: dsmcc_unm_dii.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_UNM_DII_H #define __DSMCC_UNM_DII_H int dsmcc_DownloadInfoIndication (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm_dlcancel.h0000744000076400001440000000053210356276704016333 /* $Id: dsmcc_unm_dlcancel.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_UNM_DLCANCEL_H #define __DSMCC_UNM_DLCANCEL_H int dsmcc_DownloadCancel (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_misc.h0000744000076400001440000000232410403124321014617 /* $Id: dsmcc_misc.h,v 1.10 2006/03/06 20:25:37 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_MISC_H #define __DSMCC_MISC_H // U-N defines (server messages only) #define DownloadInfoIndication 0x1002 #define DownloadDataBlock 0x1003 #define DownloadCancel 0x1005 #define DownloadServerInitiate 0x1006 // data from dsmcc_message_header typedef struct _DSMCC_MSG_HEADER { int msg_len; int dsmccType; int messageId; u_long transaction_id; // also download_id } DSMCC_MSG_HD; int dsmcc_pto_descriptor_loop (char *name, u_char *b); int dsmcc_CompatibilityDescriptor(u_char *b); int dsmcc_MessageHeader (int v, u_char *b, int len, DSMCC_MSG_HD *dmh); int dsmcc_AdaptationHeader (int v, u_char *b, int len); int dsmcc_ConditionalAccess (int v, u_char *b, int len); int dsmcc_UserID (int v, u_char *b, int len); u_long dsmcc_print_transactionID_32 (int v, u_char *b); int dsmcc_carousel_NSAP_address_B20 (int v, const char *s, u_char *b); int dsmcc_CarouselDescriptor_Loop (const char *s, u_char *b, int len); int dsmcc_DVB_service_location (int v, u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/dsmcc_grpinfind.h0000744000076400001440000000052410356276704015670 /* $Id: dsmcc_grpinfind.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __DSMCC_GRPINFIND_H #define __DSMCC_GRPINFIND_H int dsmcc_GroupInfoIndication (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/biop.h0000744000076400001440000000076010402705261013455 /* $Id: biop.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _BIOP #define _BIOP u_long BIOP_BIOPProfileBody (int v, u_char *b); u_long BIOP_LiteOptionsProfileBody (int v, u_char *b); u_long BIOP_LiteComponent (int v, u_char *b); u_long BIOP_ObjectLocation (int v, u_char *b); int BIOP_Name (int v, u_char *b, u_long *p_kinddata); #endif dvbsnoop-1.4.50/src/datacarousel/biop_dsm.h0000744000076400001440000000105110402705261014312 /* $Id: biop_dsm.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _BIOP_DSM #define _BIOP_DSM int BIOP_DSM_ConnBinder (int v, u_char *b); int BIOP_DSM_ServiceLocation (int v, u_char *b); int BIOP_DSM_ServiceDomain (int v, u_char *b, int len); int BIOP_DSM_CosNaming_Name (int v, u_char *b); int BIOP_DSM_Stream_Info_T (int v, u_char *b); int BIOP_DSM_Event_EventList_T (int v, u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/biop_message.h0000744000076400001440000000046110402705261015157 /* $Id: biop_message.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _BIOP_MESSAGE #define _BIOP_MESSAGE u_long BIOP_Message (int v, u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/biop_tag_tap.h0000744000076400001440000000055410402705261015155 /* $Id: biop_tag_tap.h,v 1.1 2006/03/06 00:04:49 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _BIOP_TAG_TAP #define _BIOP_TAG_TAP u_long BIOP_TAG_dispatch (int v, u_char *b); int BIOP_TAP (int v, const char *str, u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/biop_modinfo.h0000744000076400001440000000047310356276704015206 /* $Id: biop_modinfo.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _BIOP_MODINFO #define _BIOP_MODINFO int BIOP_ModuleInfo (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/biop_servgatinf.h0000744000076400001440000000051410356276704015717 /* $Id: biop_servgatinf.h,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _BIOP_SERVGATINF #define _BIOP_SERVGATINF int BIOP_ServiceGatewayInfo (int v, u_char *b, u_int len); #endif dvbsnoop-1.4.50/src/datacarousel/iop_ior.h0000744000076400001440000000051110402705262014157 /* $Id: iop_ior.h,v 1.3 2006/03/06 00:04:50 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _IOP_IOR #define _IOP_IOR int IOP_IOR (int v, u_char *b); u_long IOP_taggedProfile (int v, u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/mhp_misc.h0000744000076400001440000000056310356276704014341 /* $Id: mhp_misc.h,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __MHP_MISC_H #define __MHP_MISC_H int mhp_application_identifier (int v, u_char *b); int mhp_application_profile_version (int v, u_char *b); #endif dvbsnoop-1.4.50/src/datacarousel/llc_snap.h0000744000076400001440000000036210356273010014315 /* DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __LLC_SNAP #define __LLC_SNAP 1 int llc_snap (int verbosity, u_char *buf); #endif dvbsnoop-1.4.50/src/datacarousel/Makefile.am0000744000076400001440000000143110402674702014410 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libdatacarousel.a noinst_HEADERS = \ ait.h \ dsmcc.h \ ints.h \ unts.h \ mpe_fec.h \ datagram.h \ dsmcc_ddb.h \ dsmcc_unm.h \ dsmcc_unm_dsi.h \ dsmcc_unm_dii.h \ dsmcc_unm_dlcancel.h \ dsmcc_misc.h \ dsmcc_grpinfind.h \ biop.h \ biop_dsm.h \ biop_message.h \ biop_tag_tap.h \ biop_modinfo.h \ biop_servgatinf.h \ iop_ior.h \ mhp_misc.h \ llc_snap.h libdatacarousel_a_SOURCES = \ ait.c \ dsmcc.c \ ints.c \ unts.c \ mpe_fec.c \ datagram.c \ dsmcc_ddb.c \ dsmcc_unm.c \ dsmcc_unm_dsi.c \ dsmcc_unm_dii.c \ dsmcc_unm_dlcancel.c \ dsmcc_misc.c \ dsmcc_grpinfind.c \ biop.c \ biop_dsm.c \ biop_message.c \ biop_tag_tap.c \ biop_modinfo.c \ biop_servgatinf.c \ iop_ior.c \ mhp_misc.c \ llc_snap.c dvbsnoop-1.4.50/src/datacarousel/Makefile.in0000644000076400001440000003530310630302136014415 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libdatacarousel_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/datacarousel DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libdatacarousel_a_AR = $(AR) $(ARFLAGS) libdatacarousel_a_LIBADD = am_libdatacarousel_a_OBJECTS = ait.$(OBJEXT) dsmcc.$(OBJEXT) \ ints.$(OBJEXT) unts.$(OBJEXT) mpe_fec.$(OBJEXT) \ datagram.$(OBJEXT) dsmcc_ddb.$(OBJEXT) dsmcc_unm.$(OBJEXT) \ dsmcc_unm_dsi.$(OBJEXT) dsmcc_unm_dii.$(OBJEXT) \ dsmcc_unm_dlcancel.$(OBJEXT) dsmcc_misc.$(OBJEXT) \ dsmcc_grpinfind.$(OBJEXT) biop.$(OBJEXT) biop_dsm.$(OBJEXT) \ biop_message.$(OBJEXT) biop_tag_tap.$(OBJEXT) \ biop_modinfo.$(OBJEXT) biop_servgatinf.$(OBJEXT) \ iop_ior.$(OBJEXT) mhp_misc.$(OBJEXT) llc_snap.$(OBJEXT) libdatacarousel_a_OBJECTS = $(am_libdatacarousel_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ait.Po ./$(DEPDIR)/biop.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/biop_dsm.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/biop_message.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/biop_modinfo.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/biop_servgatinf.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/biop_tag_tap.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/datagram.Po ./$(DEPDIR)/dsmcc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_ddb.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_grpinfind.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_misc.Po ./$(DEPDIR)/dsmcc_unm.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_unm_dii.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_unm_dlcancel.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_unm_dsi.Po ./$(DEPDIR)/ints.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/iop_ior.Po ./$(DEPDIR)/llc_snap.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mhp_misc.Po ./$(DEPDIR)/mpe_fec.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/unts.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libdatacarousel_a_SOURCES) DIST_SOURCES = $(libdatacarousel_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libdatacarousel.a noinst_HEADERS = \ ait.h \ dsmcc.h \ ints.h \ unts.h \ mpe_fec.h \ datagram.h \ dsmcc_ddb.h \ dsmcc_unm.h \ dsmcc_unm_dsi.h \ dsmcc_unm_dii.h \ dsmcc_unm_dlcancel.h \ dsmcc_misc.h \ dsmcc_grpinfind.h \ biop.h \ biop_dsm.h \ biop_message.h \ biop_tag_tap.h \ biop_modinfo.h \ biop_servgatinf.h \ iop_ior.h \ mhp_misc.h \ llc_snap.h libdatacarousel_a_SOURCES = \ ait.c \ dsmcc.c \ ints.c \ unts.c \ mpe_fec.c \ datagram.c \ dsmcc_ddb.c \ dsmcc_unm.c \ dsmcc_unm_dsi.c \ dsmcc_unm_dii.c \ dsmcc_unm_dlcancel.c \ dsmcc_misc.c \ dsmcc_grpinfind.c \ biop.c \ biop_dsm.c \ biop_message.c \ biop_tag_tap.c \ biop_modinfo.c \ biop_servgatinf.c \ iop_ior.c \ mhp_misc.c \ llc_snap.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/datacarousel/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/datacarousel/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libdatacarousel.a: $(libdatacarousel_a_OBJECTS) $(libdatacarousel_a_DEPENDENCIES) -rm -f libdatacarousel.a $(libdatacarousel_a_AR) libdatacarousel.a $(libdatacarousel_a_OBJECTS) $(libdatacarousel_a_LIBADD) $(RANLIB) libdatacarousel.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ait.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biop_dsm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biop_message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biop_modinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biop_servgatinf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/biop_tag_tap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datagram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_ddb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_grpinfind.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_unm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_unm_dii.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_unm_dlcancel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_unm_dsi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ints.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iop_ior.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llc_snap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mhp_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpe_fec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unts.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/datacarousel/ait.c0000744000076400001440000000564010356276704013313 /* $Id: ait.c,v 1.6 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- AIT Section -- MHP Application Information Section -- TS 102 812 $Log: ait.c,v $ Revision 1.6 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.5 2004/10/17 22:20:35 rasc section decoding functions renamed due to preparation of private structures Revision 1.4 2004/02/12 21:21:19 rasc MHP AIT descriptors some smaller changes Revision 1.3 2004/02/10 22:57:52 rasc MHP descriptor, missing DVB descriptor done Revision 1.2 2004/02/09 21:24:57 rasc AIT descriptors minor redesign on output routines Revision 1.1 2004/02/07 01:28:00 rasc MHP Application Information Table some AIT descriptors */ #include "dvbsnoop.h" #include "ait.h" #include "mhp_misc.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/helper.h" #include "misc/output.h" void section_MHP_AIT (u_char *b, int len) { /* TS 102 812 */ int len2; u_int table_id; out_nl (3,"AIT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id != 0x74) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); outBit_Sx_NL (6,"reserved_2: ", b,10, 2); outBit_Sx_NL (5,"section_length: ", b,12,12); outBit_Sx_NL (3,"test_application_flag: ", b,24, 1); outBit_S2x_NL(3,"application_type: ", b,25, 15, (char *(*)(u_long))dsmccStrMHP_application_type ); outBit_Sx_NL (6,"reserved_3: ", b,40, 2); outBit_Sx_NL (3,"Version_number: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b,48, 8); outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); outBit_Sx_NL (6,"reserved_4: ", b,64, 4); len2 = outBit_Sx_NL (3,"common_descriptors_length: ", b,68,12); b += 10; indent (+1); while (len2 > 0) { int x; x = descriptor (b, MHP_AIT); b += x; len2 -= x; } indent (-1); out_NL (4); outBit_Sx_NL (6,"reserved_5: ", b, 0, 4); len2 = outBit_Sx_NL (3,"application_loop_length: ", b, 4,12); b += 2; indent (+1); while (len2 > 0) { int x; int len3; x = mhp_application_identifier (3, b); b += x; len2 -= x; outBit_S2x_NL (3,"application_control_code: ", b, 0, 8, (char *(*)(u_long))dsmccStrMHP_application_control_code); outBit_Sx_NL (6,"reserved: ", b, 8, 4); len3 = outBit_Sx_NL (3,"application_descriptor_loop_length: ", b, 12,12); b += 3; len2 -= 3; while (len3 > 0) { int x; x = descriptor (b, MHP_AIT); b += x; len2 -= x; len3 -= x; } indent (-1); out_NL (4); } indent (-1); outBit_Sx_NL (5,"CRC: ", b,0,32); } dvbsnoop-1.4.50/src/datacarousel/dsmcc.c0000744000076400001440000001230610356276704013624 /* $Id: dsmcc.c,v 1.11 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- DSM-CC Section -- DSM-CC Data Carousel -- ETSI TR 101 202 -- ISO/IEC 13818-6 $Log: dsmcc.c,v $ Revision 1.11 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2004/10/17 22:20:35 rasc section decoding functions renamed due to preparation of private structures Revision 1.9 2004/02/15 18:58:27 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.8 2004/02/15 01:01:00 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.7 2004/02/14 01:24:44 rasc DSM-CC started (DSI/DII, DDB) Revision 1.6 2004/01/22 22:26:34 rasc pes_pack_header section read timeout Revision 1.5 2004/01/02 22:25:34 rasc DSM-CC MODULEs descriptors complete Revision 1.4 2004/01/02 16:40:33 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.3 2004/01/01 20:09:16 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.2 2003/12/27 14:35:00 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.1 2003/12/27 00:21:16 rasc dsmcc section tables */ #include "dvbsnoop.h" #include "dsmcc.h" #include "dsmcc_ddb.h" #include "dsmcc_unm.h" #include "dsmcc_misc.h" #include "llc_snap.h" #include "descriptors/descriptor.h" #include "strings/dsmcc_str.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" static void DSMCC_descriptor_list (u_char *b, int len); void section_DSMCC (u_char *b, int len) { /* TR 101 202 */ int len1; u_int table_id; u_int section_length; u_int section_syntax_indicator; u_int private_indicator; u_int sect_nr; u_int last_sect_nr; out_nl (3,"DSM-CC-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id < 0x3a || table_id > 0x3e) { out_nl (3,"wrong Table ID"); return; } section_syntax_indicator = outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); private_indicator = outBit_Sx_NL (4,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved_1: ", b,10, 2); section_length = outBit_Sx_NL (5,"dsmcc_section_length: ", b,12,12); outBit_Sx_NL (3,"table_id_extension: ", b,24,16); outBit_Sx_NL (6,"reserved_3: ", b,40, 2); outBit_Sx_NL (3,"Version_number: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); sect_nr = outBit_Sx_NL (3,"Section_number: ", b,48, 8); last_sect_nr = outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); b += 8; len1 = section_length - 5 - 4; // -4 == CRC/Checksum if (table_id == 0x3A) { llc_snap (3,b); // ISO/IEC 8802-2 } else if (table_id == 0x3B) { dsmcc_UserNetworkMessage (4, b, len1); } else if (table_id == 0x3C) { dsmcc_DownloadDataMessage (4, b, len1); } else if (table_id == 0x3D) { DSMCC_descriptor_list (b,len1); } else if (table_id == 0x3E) { // $$$ Remark: DVB defines 0x3E as datagram!! print_private_data (4, b, len1); } b += len1; outBit_Sx_NL (5, (section_syntax_indicator) ?"CRC: " :"Checksum: ", b,0,32); } /* NOTE 1: The DownloadServerInitiate message, the DownloadInfoIndication message, and the DownloadCancel message are in the userNetworkMessage class. NOTE 2: The DownloadDataBlock message is within the downloadMessage class. */ static void DSMCC_descriptor_list (u_char *b, int len) { int x; while (len > 0) { x = descriptor (b, DSMCC_STREAM); b += x; len -= x; } } /* * $$$ TODO * * table_id_extension: This 16-bit field is set as shown below according to table_id field: When the value of the table_id field equals 0x3B, this field must convey a copy of the least significant two bytes of the transaction_id field . When the value of the table_id field equals 0x3C, this field must convey a copy of the module_id field. B.2.4.3.4 DSM-CC sections for DSMCC_descriptor_list() If the table_id .eld equals 0x3D the current_next_indicator bit shall be set to "1". B.2.4.3.5 Encoding of table id extension The section's table id extension .eld provides information on the stream descriptor(s)carried by the section: Table B.31 :Encoding of table id extension for DSMCC_descriptor_lists table_id_extension bits Payload of DSM-CC section with table ID 0x3D [15 ][14 ][13 …0 ] 0 0 eventID [13 …0 ]Section carries a single "do it now"event 0 1 xx xxxx xxxx Section carries NPT reference descriptors 1 0 xx xxxx xxxx Section carries one or more other stream descriptors.I.e -Stream event descriptor(s)with a future eventNPTs -Stream mode descriptor (can be ignored in this speci .cation) -NPT endpoint descriptor (can be ignored in this speci .cation) 1 1 reserved for future use The value of eventID for "do it now"events shall be in the range 0x0001 …0x3FFF.The value of eventID for scheduled events shall be in the range 0x8000 …0xBFFF.The value 0 is not allowed (see 5.5.2.2.1 in ISO/IEC 13818-6 [26 ]). */ dvbsnoop-1.4.50/src/datacarousel/ints.c0000744000076400001440000000527210356276704013514 /* $Id: ints.c,v 1.15 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- INT Section -- IP/MAC Notification Section -- DSM-CC Data Carousel EN 301 192 $Log: ints.c,v $ Revision 1.15 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.14 2004/10/17 22:20:35 rasc section decoding functions renamed due to preparation of private structures Revision 1.13 2004/02/12 21:21:19 rasc MHP AIT descriptors some smaller changes Revision 1.12 2004/01/01 20:09:16 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.11 2003/12/27 14:35:00 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.10 2003/12/26 23:27:39 rasc DSM-CC UNT section Revision 1.9 2003/11/26 23:54:46 rasc -- bugfixes on Linkage descriptor Revision 1.8 2003/10/29 20:54:56 rasc more PES stuff, DSM descriptors, testdata */ #include "dvbsnoop.h" #include "ints.h" #include "dsmcc_misc.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/output.h" void section_DSMCC_INT (u_char *b, int len) { /* EN 301 192 7.x */ int len1,i; u_int table_id; u_int section_length; out_nl (3,"INT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id != 0x4c) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); outBit_Sx_NL (6,"reserved_2: ", b,10, 2); section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); outBit_S2x_NL(3,"Action_type: ", b,24, 8, (char *(*)(u_long))dsmccStrAction_Type ); outBit_Sx_NL (3,"Platform_id_hash: ", b,32, 8); outBit_Sx_NL (6,"reserved_3: ", b,40, 2); outBit_Sx_NL (3,"Version_number: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b,48, 8); outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); outBit_S2x_NL(3,"Platform_id: ", b,64,24, (char *(*)(u_long))dsmccStrPlatform_ID ); outBit_S2x_NL(3,"Processing_order: ", b,88, 8, (char *(*)(u_long))dsmccStrProcessing_order); b += 12; len1 = section_length - 9; i = dsmcc_pto_descriptor_loop ("platform",b); b += i; len1 -= i; while (len1 > 4) { i = dsmcc_pto_descriptor_loop ("target",b); b += i; len1 -= i; i = dsmcc_pto_descriptor_loop ("operational",b); b += i; len1 -= i; } out_NL (4); outBit_Sx_NL (5,"CRC: ", b,0,32); } dvbsnoop-1.4.50/src/datacarousel/unts.c0000744000076400001440000000547210356276704013532 /* $Id: unts.c,v 1.7 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- UNT Section (Update Notification Table) -- DSM-CC Data Carousel ETSI TS 102 006 $Log: unts.c,v $ Revision 1.7 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.6 2004/10/17 22:20:35 rasc section decoding functions renamed due to preparation of private structures Revision 1.5 2004/02/12 21:21:19 rasc MHP AIT descriptors some smaller changes Revision 1.4 2004/01/01 20:09:16 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.3 2003/12/27 14:35:00 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.2 2003/12/27 00:21:16 rasc dsmcc section tables Revision 1.1 2003/12/26 23:27:39 rasc DSM-CC UNT section */ #include "dvbsnoop.h" #include "unts.h" #include "dsmcc_misc.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/output.h" void section_DSMCC_UNT (u_char *b, int len) { int len1,i; u_int table_id; u_int section_length; out_nl (3,"UNT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id != 0x4b) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (4,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); outBit_Sx_NL (6,"reserved_2: ", b,10, 2); section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); outBit_S2x_NL(3,"Action_type: ", b,24, 8, (char *(*)(u_long))dsmccStrAction_Type ); outBit_Sx_NL (3,"OUI_hash: ", b,32, 8); outBit_Sx_NL (6,"reserved_3: ", b,40, 2); outBit_Sx_NL (3,"Version_number: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b,48, 8); outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); outBit_S2x_NL(3,"OUI: ", b,64,24, (char *(*)(u_long))dsmccStrOUI ); outBit_S2x_NL(3,"Processing_order: ", b,88, 8, (char *(*)(u_long))dsmccStrProcessing_order); b += 12; len1 = section_length - 9; /* common descriptor loop */ i = dsmcc_pto_descriptor_loop ("common",b); b += i; len1 -= i; indent (+1); while (len1 > 4) { int len2; i= dsmcc_CompatibilityDescriptor(b); b += i; len1 -= i; len2 = outBit_Sx_NL (3,"platform_loop_length: ", b, 0,16); b += 2; len1 -= 2; while (len2 > 0) { i = dsmcc_pto_descriptor_loop ("target",b); b += i; len1 -= i; len2 -= i; i = dsmcc_pto_descriptor_loop ("operational",b); b += i; len1 -= i; len2 -= i; } out_NL (4); } indent (-1); outBit_Sx_NL (5,"CRC: ", b,0,32); } dvbsnoop-1.4.50/src/datacarousel/mpe_fec.c0000744000076400001440000000525310356276704014134 /* $Id: mpe_fec.c,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- MPE_FEC Section -- EN 301 192 v1.4.1 $Log: mpe_fec.c,v $ Revision 1.3 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/10/17 22:20:35 rasc section decoding functions renamed due to preparation of private structures Revision 1.1 2004/07/24 11:47:08 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes */ #include "dvbsnoop.h" #include "mpe_fec.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/output.h" void section_MPE_FEC (u_char *b, int len) { /* EN 301 192 7.x */ u_int i; u_int table_id; u_int section_length; out_nl (3,"MPE_FEC-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id != 0x78) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved_1: ", b,10, 2); section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); outBit_Sx_NL (3,"padding_columns: ", b,24, 8); outBit_Sx_NL (6,"reserved_for_future_use: ", b,32, 8); outBit_Sx_NL (6,"reserved_3: ", b,40, 2); outBit_Sx_NL (6,"reserved_for_future_use: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b,48, 8); outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); b += 8; section_length -= 5; i = real_time_parameters(b); b += i; section_length -= i; print_databytes (4,"rs_data_bytes:", b,section_length-4); b += section_length-4; outBit_Sx_NL (5,"CRC: ", b,0,32); } // // -- real time parameter block // -- EN 301 192 v 1.4.1 // int real_time_parameters (u_char *b) { int delta_t; out_nl (3,"Real time parameters:"); indent (1); delta_t = outBit_Sx (3,"delta_t: ", b, 0, 12); if (delta_t) out_nl (3," [= %d.%02d sec]", delta_t/100, delta_t%100); else out_nl (3," [= no more bursts]"); outBit_S2x_NL (3,"table_boundary: ", b, 12, 1, (char *(*)(u_long))dvbstrMPE_FEC_table_frame_boundary ); outBit_S2x_NL (3,"frame_boundary: ", b, 13, 1, (char *(*)(u_long))dvbstrMPE_FEC_table_frame_boundary ); outBit_Sx_NL (3,"address: ", b, 14, 18); indent (-1); return 4; } dvbsnoop-1.4.50/src/datacarousel/datagram.c0000744000076400001440000001660310477053236014314 /* $Id: datagram.c,v 1.20 2006/09/04 15:26:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- DATAGRAM section -- DSM-CC Data Carousel EN 301 192 $Log: datagram.c,v $ Revision 1.20 2006/09/04 15:26:47 rasc New: DVB-Net IP, UDP decoding (RFC791, RFC2460) (Stéphane Esté-Gracias) Revision 1.19 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.18 2004/10/17 22:20:35 rasc section decoding functions renamed due to preparation of private structures Revision 1.17 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.16 2004/02/12 23:00:22 rasc no message Revision 1.15 2004/01/04 22:03:21 rasc time for a version leap Revision 1.14 2004/01/01 20:09:16 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.13 2003/12/26 23:27:38 rasc DSM-CC UNT section Revision 1.12 2003/11/26 23:54:46 rasc -- bugfixes on Linkage descriptor Revision 1.11 2003/11/26 20:31:50 rasc no message Revision 1.10 2003/11/26 19:55:31 rasc no message Revision 1.9 2003/11/24 23:52:15 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.8 2003/11/09 22:54:16 rasc no message Revision 1.7 2003/11/09 22:50:32 rasc no message Revision 1.6 2003/11/09 22:26:11 rasc filename change Revision 1.5 2003/10/25 19:11:49 rasc no message Revision 1.4 2003/10/24 22:17:14 rasc code reorg... Revision 1.1 2003/10/19 22:22:58 rasc - some datacarousell stuff started */ #include "dvbsnoop.h" #include "datagram.h" #include "llc_snap.h" #include "net_ip/ip.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" void section_DSMCC_DATAGRAM (u_char *b, int len) { /* EN 301 192 7.x */ // $$$ TODO this differs from ISO/IEC 13818-6:1998 AMD_1_2000_Cor_1_2002 typedef struct _DATAGRAM { u_int table_id; u_int section_syntax_indicator; u_int private_indicator; u_int reserved_1; u_int section_length; u_int MAC_addr6; u_int MAC_addr5; u_int reserved_2; u_int payload_scrambling_control; u_int address_scrambling_control; u_int LLC_SNAP_flag; u_int current_next_indicator; u_int section_number; u_int last_section_number; u_int MAC_addr4; u_int MAC_addr3; // MAC-Bits: MSB first order u_int MAC_addr2; u_int MAC_addr1; // conditional // LLC SNAP according ISO 8802-2 // N ip datagram bytes u_int ip_datagram_data_bytes; // conditional u_int stuffing_bytes; // conditional unsigned long crc_checksum; } DATAGRAM; DATAGRAM d; int len1; d.table_id = b[0]; d.section_syntax_indicator = getBits (b, 0, 8, 1); d.private_indicator = getBits (b, 0, 9, 1); // $$$ TODO error indicator d.reserved_1 = getBits (b, 0, 10, 2); d.section_length = getBits (b, 0, 12, 12); d.MAC_addr6 = getBits (b, 0, 24, 8); d.MAC_addr5 = getBits (b, 0, 32, 8); d.reserved_2 = getBits (b, 0, 40, 2); d.payload_scrambling_control = getBits (b, 0, 42, 2); d.address_scrambling_control = getBits (b, 0, 44, 2); d.LLC_SNAP_flag = getBits (b, 0, 46, 1); d.current_next_indicator = getBits (b, 0, 47, 1); d.section_number = getBits (b, 0, 48, 8); d.last_section_number = getBits (b, 0, 56, 8); d.MAC_addr4 = getBits (b, 0, 64, 8); d.MAC_addr3 = getBits (b, 0, 72, 8); d.MAC_addr2 = getBits (b, 0, 80, 8); d.MAC_addr1 = getBits (b, 0, 88, 8); // MAC-Bits: MSB first ! b += 12; len1 = d.section_length - 9; out_nl (3,"DSM-CC DATAGRAM-decoding...."); out_S2B_NL (3,"Table_ID: ",d.table_id, dvbstrTableID (d.table_id)); if (d.table_id != 0x3e) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",d.section_syntax_indicator); out_SB_NL (3,"private_indicator: ",d.private_indicator); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_SW_NL (5,"Section_length: ",d.section_length); out_SB_NL (5,"MACaddrbyte/DevicdID 6: ",d.MAC_addr6); out_SB_NL (5,"MACaddrbyte/DeviceID 5: ",d.MAC_addr5); out_SB_NL (6,"reserved_2: ",d.reserved_2); out_S2B_NL (3,"payload_scrambling_control: ",d.payload_scrambling_control, dsmccStrPayload_scrambling_control(d.payload_scrambling_control)); out_S2B_NL (3,"address_scrambling_control: ",d.address_scrambling_control, dsmccStrAddress_scrambling_control(d.address_scrambling_control)); out_SB_NL (3,"LLC_SNAP_flag: ",d.LLC_SNAP_flag); out_S2B_NL(3,"current_next_indicator: ",d.current_next_indicator, dvbstrCurrentNextIndicator(d.current_next_indicator)); out_SB_NL (3,"Section_number: ",d.section_number); out_SB_NL (3,"Last_Section_number: ",d.last_section_number); out_SB_NL (5,"MACaddrbyte/DeviceID 4: ",d.MAC_addr4); out_SB_NL (5,"MACaddrbyte/DeviceID 3: ",d.MAC_addr3); out_SB_NL (5,"MACaddrbyte/DeviceID 2: ",d.MAC_addr2); out_SB (5,"MACaddrbyte/DeviceID 1: ",d.MAC_addr1); out_nl (3," => MAC-Address/DeviceID: %02x:%02x:%02x:%02x:%02x:%02x", d.MAC_addr1,d.MAC_addr2,d.MAC_addr3, d.MAC_addr4,d.MAC_addr5,d.MAC_addr6); if (d.LLC_SNAP_flag == 0x01) { /* ISO/IEC 8802-2 */ int k; k = llc_snap (4, b); } else { net_IP_data (4, b, len1-4); } b += (len1 - 4); outBit_Sx_NL (5, (d.section_syntax_indicator) ?"CRC: " :"Checksum: ", b,0,32); } /* $$$ TODO realtime parameters in MPE EN 301 192 v1.4.1 9.10 Real time parameters On an elementary stream where Time Slicing and/or MPE-FEC are used, each MPE section and MPE-FEC section shall carry real time parameters described in table 42. For the MPE sections, real time parameters are carried within the MAC_address_4…MAC_address_1, as illustrated in figure 20. Table 42: Time Slicing and MPE-FEC real time parameters Syntax Number of bits Identifier real_time_parameters () { delta_t 12 uimsbf table_boundary 1 bslbf frame_boundary 1 bslbf address 18 uimsbf } delta_t: Usage of this 12-bit field depends on whether Time Slicing is used on the elementary stream. The following applies when Time Slicing is used (regardless whether MPE-FEC is used or not): • The field indicates the time (delta-t) to the next Time Slice burst within the elementary stream. The time information is in all MPE sections and MPE-FEC sections within a burst and the value may differ section by section. The resolution of the delta-t is 10 ms. Value 0x00 is reserved to indicate that no more bursts will be transmitted within the elementary stream (e.g. end of service). In such a case, all MPE sections and MPE-FEC sections within the burst shall have the same value in this field. EXAMPLE: delta-t value 0xC00 = 3072 indicates the time to the next burst is 30,72 s. • Delta-t information is the time from the transport packet carrying the first byte of the current MPE section or MPE-FEC section to the transport packet carrying the first byte of next burst. Therefore the delta-t information may differ between MPE sections and between MPE-FEC sections within a burst. • The time indicated by delta-t shall be beyond the end of the maximum burst duration of the actual burst. This ensures a decoder can always reliably distinguish two sequential bursts within an elementary stream. ... */ dvbsnoop-1.4.50/src/datacarousel/dsmcc_ddb.c0000744000076400001440000000374110403125163014421 /* $Id: dsmcc_ddb.c,v 1.4 2006/03/06 20:32:35 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc download Data Block Message $Log: dsmcc_ddb.c,v $ Revision 1.4 2006/03/06 20:32:35 rasc DSM-CC Carousel, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.3 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/02/15 18:58:27 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.1 2004/02/15 01:02:10 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed */ #include "dvbsnoop.h" #include "dsmcc_ddb.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" /* * ISO/IEC 13818-6 * dsmcc_downloadDataMessage * Download Data Block */ int dsmcc_DownloadDataMessage (int v, u_char *b, u_int len) { int x; int len_org = len; DSMCC_MSG_HD dmh; x = dsmcc_MessageHeader (v, b, len, &dmh); b += x; len -= x; outBit_Sx_NL (v,"moduleId: ", b, 0, 16); outBit_Sx_NL (v,"moduleVersion: ", b, 16, 8); outBit_Sx_NL (v,"reserved: ", b, 24, 8); outBit_Sx_NL (v,"blockNumber: ", b, 32, 16); b += 6; len -= 6; print_databytes (v, "Block Data: ", b, len); // $$$ TODO: Save Blockdata if option set to file // a good Test transponder is ASTRA's MHP carousel // Beware of multiple BIOPs in a Module! (read below!) return len_org; } // $$$ TODO // // 11.2.4 Transport of BIOP Messages // // BIOP messages are transported in Modules of DSM-CC Data Carousels. // Multiple BIOP messages may be carried in one Module. The Modules of // the Data Carousel are fragmented into Blocks. These Blocks are // transported in DownloadDataBlock() messages (described in clause 7). // Figure 11-3 illustrates the applied encapsulation and fragmentation // methods. dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm.c0000744000076400001440000000301110356276704014474 /* $Id: dsmcc_unm.c,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc User Network Message -- ISO/IEC 13818-6:2000 7. User-Network Download $Log: dsmcc_unm.c,v $ Revision 1.3 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/02/15 18:58:27 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.1 2004/02/15 01:02:10 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed */ #include "dvbsnoop.h" #include "dsmcc_unm.h" #include "dsmcc_unm_dsi.h" #include "dsmcc_unm_dii.h" #include "dsmcc_unm_dlcancel.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" /* * ISO/IEC 13818-6 * user Network Message */ int dsmcc_UserNetworkMessage (int v, u_char *b, int len) { int x; int len_org = len; DSMCC_MSG_HD dmh; x = dsmcc_MessageHeader (v, b, len, &dmh); b += x; len -= x; switch (dmh.messageId) { case DownloadInfoIndication: dsmcc_DownloadInfoIndication (v, b, len); break; case DownloadServerInitiate: dsmcc_DownloadServerInitiate (v, b, len); break; case DownloadCancel: dsmcc_DownloadCancel (v, b, len); break; default: out_nl (v,"unsupported messageId (please report!)"); print_databytes (v, "Data bytes: ", b, len); break; } return len_org; } dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm_dsi.c0000744000076400001440000000726410402705262015335 /* $Id: dsmcc_unm_dsi.c,v 1.8 2006/03/06 00:04:50 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc download Server Initiate -- to be called from U-N-Message $Log: dsmcc_unm_dsi.c,v $ Revision 1.8 2006/03/06 00:04:50 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.7 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.6 2004/02/29 20:42:55 rasc no message Revision 1.5 2004/02/28 12:13:03 rasc minor stuff Revision 1.4 2004/02/24 23:03:04 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.3 2004/02/17 23:54:12 rasc Bug (not fixed yet): DSM-CC DII Carousel Descriptor Loop is strange Revision 1.2 2004/02/15 20:46:09 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.1 2004/02/15 18:58:28 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) */ #include "dvbsnoop.h" #include "dsmcc_unm_dsi.h" #include "dsmcc_misc.h" #include "dsmcc_grpinfind.h" #include "biop_servgatinf.h" #include "misc/output.h" #include "misc/hexprint.h" /* * ISO/IEC 13818-6 * dsmcc_Download Server Initiate */ int dsmcc_DownloadServerInitiate (int v, u_char *b, u_int len) { int len_org = len; int len2; int x; u_long uu_type_id; // already read dsmcc_MessageHeader (v, b, len, &dmh); dsmcc_carousel_NSAP_address_B20 (v, "Server-ID", b); x = dsmcc_CompatibilityDescriptor (b+20); b += 20+x; // len -= 20+x; len2 = outBit_Sx_NL (v,"privateDataLength: ", b, 0, 16); b += 2; // len -= 2; // DataCarousel: GroupInfoByte structure + dsmcc_CarouselDescriptors // ObjectCarousel: BIOP::ServiceGatewayInformation // because we do not know, if DC or OC, we make a check for BIOP // U-U Objects type_id "srg\0" and "DSM:" // (normally we should remember a databroadcast_id for decision) if (len2 >= 8) { out (v,"guessing private data: "); uu_type_id = getBits (b+4, 0, 0, 32); } else { uu_type_id = 0; } if (len > 0) { if (uu_type_id != 0x73726700 && uu_type_id != 0x53443a4d ) { // Data Carousel dsmcc_GroupInfoIndication (v, b, len2); } else { // Object Carousel BIOP_ServiceGatewayInfo (v, b, len2); } } // b += len2; // len -= len2; return len_org; } // EN 301 192: // 8.1.2 DownloadServerInitiate message // // The DownloadServerInitiate message is used to build a SuperGroup. // The semantics for DVB data carousels are as follows: // // serverId: this field shall be set to 20 bytes with the value of 0xFF. // // compatibilityDescriptor(): this structure shall only contain the // compatibilityDescriptorLength field of the compatibilityDescriptor() // as defined in DSM-CC (see ISO/IEC 13818-6 [5]). It shall be set to // the value of 0x0000. The privateDataByte fields shall contain the // GroupInfoIndication structure as defined in table 37. // // privateDataLength: this field defines the length in bytes of the // following GroupInfoIndication structure. // // privateDataByte: these fields shall convey the GroupInfoIndication // structure as defined in table 37. // // --> SuperGroupInfo // groupInfobyte may contain BIOP, descriptor_carousel_loopm etc. // Or // // PrivateDataBytes may Contain BIOP::ServiceGateway Info // $$$ TO be checked!!!!! // TS 102 812 v1.2.1 B2.2.3: // MHP: contains ServiceGatewayInformation // dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm_dii.c0000744000076400001440000001136310356276704015332 /* $Id: dsmcc_unm_dii.c,v 1.6 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc Download Info Indication -- to be called from U-N-Message $Log: dsmcc_unm_dii.c,v $ Revision 1.6 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.5 2004/02/24 23:03:04 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.4 2004/02/20 22:18:38 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.3 2004/02/17 23:54:12 rasc Bug (not fixed yet): DSM-CC DII Carousel Descriptor Loop is strange Revision 1.2 2004/02/15 20:46:09 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.1 2004/02/15 18:58:27 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) */ #include "dvbsnoop.h" #include "dsmcc_unm_dii.h" #include "dsmcc_misc.h" #include "biop_modinfo.h" #include "misc/output.h" #include "misc/hexprint.h" /* * ISO/IEC 13818-6 * dsmcc Download Info Indication */ int dsmcc_DownloadInfoIndication (int v, u_char *b, u_int len) { int len_org = len; int n_modules; int len2; int i, x; // already read dsmcc_MessageHeader (v, b, len, &dmh); outBit_Sx_NL (v,"downloadId: ", b , 0, 32); outBit_Sx_NL (v,"blockSize: ", b+ 4, 0, 16); outBit_Sx_NL (v,"windowSize: ", b+ 6, 0, 8); outBit_Sx_NL (v,"ackPeriod: ", b+ 7, 0, 8); outBit_Sx_NL (v,"tCDownloadWindow: ", b+ 8, 0, 32); outBit_Sx_NL (v,"tCDownloadScenario: ", b+12, 0, 32); b += 16; len -= 16; x = dsmcc_CompatibilityDescriptor (b); b += x; len -= x; n_modules = outBit_Sx_NL (v,"numberOfModules: ", b, 0, 16); b += 2; len -= 2; for (i=0; i < n_modules; i++) { u_int mId; out_NL (v); out_nl (v, "Module (%d):",i); indent (+1); mId = outBit_Sx (v,"moduleId: ", b, 0, 16); out_nl (4, "%s", (mId < 0xFFF0) ? "" : " [= DAVIC application]"); outBit_Sx_NL (v,"moduleSize: " , b, 16, 32); outBit_Sx_NL (v,"moduleVersion: ", b, 48, 8); len2 = outBit_Sx_NL (v,"moduleInfoLength: ", b, 56, 8); b += 8; len -= 8; // moduleInfoByte: these fields shall convey a list of descriptors // which each define one or more attributes of the described module, // except when the moduleId is within the range of 0xFFF0-0xFFFF. In // this case, the moduleInfoByte structure contains the ModuleInfo // structure as defined by DAVIC with the privateDataByte field of that // structure as a loop of descriptors. // ISO 13818-6:2000 11.3.3.2 if (mId < 0xFFF0) { BIOP_ModuleInfo (v, b, len2); } else { print_databytes (v, "moduleInfoBytes: ", b, len2); // $$$ TODO Davic } b += len2; len -= len2; indent (-1); } out_NL (v); indent (-1); len2 = outBit_Sx_NL (v,"privateDataLength: ", b, 0, 16); print_databytes (v, "privat Data: ", b+2, len2); // $$$ TODO ??? // b += 2 + len2; // len -= 2 + len2; return len_org; } // EN 301 192 // 8.1.3 DownloadInfoIndication message // // The DownloadInfoIndication message contains the description of the // modules within a group as well as some general parameters of the // data carousel (such as downloadId and blockSize). Each module is // described by a number of attributes. The attributes moduleId, // moduleSize, and moduleVersion are defined as fields in the // DownloadInfoIndication message by DSM-CC (see ISO/IEC 13818-6 [5]). // Other module attributes shall be carried as descriptors as defined // below. The moduleId range of 0xFFF0-0xFFFF is reserved for DAVIC // compliant applications. The semantics of the DownloadInfoIndication // message for DVB data carousels are as follows: // // compatibilityDescriptor(): this structure shall only contain the // compatibilityDescriptorLength field of the compatibilityDescriptor() // as defined in DSM-CC (see ISO/IEC 13818-6 [5]). It shall be set to // the value of 0x0000. // // moduleInfoLength: this field defines the length in bytes of the // moduleInfo field for the described module. // // !! moduleInfoByte: these fields shall convey a list of descriptors // !! which each define one or more attributes of the described module, // !! except when the moduleId is within the range of 0xFFF0-0xFFFF. In // !! this case, the _moduleInfoByte structure_ contains the ModuleInfo // !! structure as defined by DAVIC with the privateDataByte field of that // !! structure as a loop of descriptors. // // privateDataLength: this field defines the length in bytes of the // privateDataByte field. // // privateDataByte: these fields are user defined. dvbsnoop-1.4.50/src/datacarousel/dsmcc_unm_dlcancel.c0000744000076400001440000000235710356276704016335 /* $Id: dsmcc_unm_dlcancel.c,v 1.2 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc download Cancel -- to be called from U-N-Message $Log: dsmcc_unm_dlcancel.c,v $ Revision 1.2 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/02/15 18:58:28 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) */ #include "dvbsnoop.h" #include "dsmcc_unm_dlcancel.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" /* * ISO/IEC 13818-6 * dsmcc_DownloadCancel */ int dsmcc_DownloadCancel (int v, u_char *b, u_int len) { int len_org = len; int len2; // already read dsmcc_MessageHeader (v, b, len, &dmh); outBit_Sx_NL (v,"downloadId: ", b, 0, 32); outBit_Sx_NL (v,"moduleId: ", b, 32, 16); outBit_Sx_NL (v,"blockNumber: ", b, 48, 16); outBit_Sx_NL (v,"downloadCancelReason: ", b, 64, 8); outBit_Sx_NL (v,"reserved: ", b, 72, 8); len2 = outBit_Sx_NL (v,"privateDataLength: ", b, 80, 16); b += 12; len -= 12; print_databytes (v, "private data: ", b, len); return len_org; } dvbsnoop-1.4.50/src/datacarousel/dsmcc_misc.c0000744000076400001440000002722710403124321014623 /* $Id: dsmcc_misc.c,v 1.23 2006/03/06 20:25:37 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: dsmcc_misc.c,v $ Revision 1.23 2006/03/06 20:25:37 rasc DSM-CC Carousell, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.22 2006/03/06 00:04:49 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.21 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.20 2005/12/29 02:43:37 rasc gcc fixes, man page update Revision 1.19 2004/08/07 22:10:00 rasc Bugfix: NIT cable frequency display (reported by Karsten Siebert ) Revision 1.18 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.17 2004/07/25 20:12:58 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.16 2004/04/15 03:38:50 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.15 2004/04/05 17:32:12 rasc mass typo fix adaption --> adaptation Revision 1.14 2004/02/29 20:42:55 rasc no message Revision 1.13 2004/02/24 23:03:04 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.12 2004/02/20 23:13:17 rasc BIOP: TapUse Revision 1.11 2004/02/20 22:18:38 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.10 2004/02/17 23:54:12 rasc Bug (not fixed yet): DSM-CC DII Carousel Descriptor Loop is strange Revision 1.9 2004/02/15 20:46:09 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.8 2004/02/15 18:58:27 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.7 2004/02/15 01:01:00 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.6 2004/02/14 01:24:44 rasc DSM-CC started (DSI/DII, DDB) Revision 1.5 2004/01/02 22:25:34 rasc DSM-CC MODULEs descriptors complete Revision 1.4 2004/01/02 16:40:33 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.3 2004/01/01 20:09:16 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.2 2003/12/27 14:35:00 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.1 2003/12/26 23:27:39 rasc DSM-CC UNT section */ #include "dvbsnoop.h" #include "dsmcc_misc.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/output.h" #include "misc/hexprint.h" #include "pes/pes_misc.h" static int subDescriptor (u_char *b); /* * -- dsmcc descriptor loops (name, buffer) * --- P latform_descriptors * --- T arget_descriptors * --- O perational descriptors * -- return: len */ int dsmcc_pto_descriptor_loop (char *name, u_char *b) { int loop_length; int len,i; out_NL (3); out_nl (3,"%s_descriptor_loop:",name); indent (+1); outBit_Sx_NL (6,"reserved: ", b,0,4); out (4,name); loop_length = outBit_Sx_NL (4,"_loop_length: ", b,4,12); len = loop_length; b += 2; indent (+1); while (len > 0) { i = descriptor (b, DSMCC_INT_UNT); b += i; len -= i; } out_NL (4); indent (-2); return (loop_length +2); } /* * ETSI TS 102 006 V1.2.1 (2002-10) * ISO/IEC 13818-6 * This is a special descriptor loop */ int dsmcc_CompatibilityDescriptor(u_char *b) { int len, len_descr; int count; out_nl (3,"DSMCC_Compatibility Descriptor (loop):"); indent (+1); len = outBit_Sx_NL (4,"compatibilityDescriptorLength: ", b, 0,16); len_descr = len + 2; if (len > 0) { count = outBit_Sx_NL (4,"DescriptorCount: ", b,16,16); b += 4; len -= 4; while (count-- > 0) { int subDesc_count; if (len <= 0) break; out_nl (4,"Descriptor (loop):"); indent (+1); outBit_S2x_NL (4,"descriptorType: ", b, 0, 8, (char *(*)(u_long))dsmccStr_DescriptorType ); outBit_Sx_NL (4,"descriptorLength: ", b, 8, 8); outBit_S2x_NL (4,"specifierType: ", b,16, 8, (char *(*)(u_long))dsmccStr_SpecifierType ); outBit_S2x_NL (4,"specifierData: ", b,24,24, (char *(*)(u_long))dsmccStrOUI ); outBit_Sx_NL (4,"Model: ", b,48,16); outBit_Sx_NL (4,"Version: ", b,64,16); subDesc_count = outBit_Sx_NL (4,"SubDescriptorCount: ", b,80, 8); b += 11; len -= 11; while (subDesc_count > 0) { int i; if (len <= 0) break; out_nl (5,"SubDescriptor (loop):"); indent (+1); i = subDescriptor (b); indent (-1); b += i; len -= i; } indent (-1); } } // len > 0 indent (-1); return len_descr; } static int subDescriptor (u_char *b) { int len; outBit_Sx_NL (5,"SubDescriptorType: ", b, 0, 8); len = outBit_Sx_NL (5,"SubDescriptorlength: ",b, 8, 8); print_databytes (4,"Additional Information:", b+2, len); return len + 2; } /* * ISO/IEC 13818-6 * dsmccMessageHeader() * returns some header info in DSM_MSG_HD struct * (msg_len is len after read header incl. adaptation field) */ int dsmcc_MessageHeader (int v, u_char *b, int len, DSMCC_MSG_HD *d) { u_char *b_start = b; int adapt_len; int pdiscr; d->dsmccType = 0; d->messageId = 0; d->transaction_id = 0; d->msg_len = 0; out_nl (v, "DSM-CC Message Header:"); indent (+1); pdiscr = outBit_Sx_NL (v,"protocolDiscriminator: ", b , 0, 8); // $$$ TODO table if (pdiscr != 0x11) { out_nl (v, " ==> wrong protocol discriminator (should be 0x11)"); print_databytes (4, "Message header bytes: ", b+1, len-1); return len; } d->dsmccType = outBit_S2x_NL (4,"dsmccType: ", b+1, 0, 8, (char *(*)(u_long))dsmccStr_dsmccType); d->messageId = outBit_S2x_NL (v,"messageId: ", b+2, 0, 16, (char *(*)(u_long))dsmccStr_messageID); d->transaction_id = (d->dsmccType == 0x03 && d->messageId == DownloadDataBlock) ? outBit_Sx_NL (v,"downloadId: ", b+4, 0, 32) : dsmcc_print_transactionID_32 (v, b+4); outBit_Sx_NL (v,"reserved: ", b+8, 0, 8); adapt_len = outBit_Sx_NL (v,"adaptationLength: ", b+9, 0, 8); d->msg_len = outBit_Sx_NL (v,"messageLength: ", b+10,0, 16); b += 12; // len -= 12; if (adapt_len > 0) { int x; x = dsmcc_AdaptationHeader (v, b, adapt_len); b += x; // len -= x; d->msg_len -= x; } indent (-1); return b - b_start; } /* * ISO/IEC 13818-6 * dsmccAdaptationHeader() */ int dsmcc_AdaptationHeader (int v, u_char *b, int len) { int ad_type; int len_org = len; out_nl (v, "Adaptation Header:"); ad_type = outBit_S2x_NL (4,"adaptationType: ", b, 0, 8, (char *(*)(u_long))dsmccStr_adaptationType); b++; len--; out_NL (v); indent (+1); switch (ad_type) { case 0x01: // conditional Access dsmcc_ConditionalAccess (v, b, len); break; case 0x02: // user ID dsmcc_UserID (v, b, len); break; case 0x03: // DIImsgNumber (ISO 13818-6:1998 AMD) outBit_Sx_NL (v,"DIImsgNumber: ", b, 0, 8); break; case 0x04: // pts (ATSC a91) outBit_Sx_NL (v,"reserved: ", b, 0, 16); outBit_Sx_NL (v,"byte-aligning ('0010'): ", b, 16, 4); print_xTS_field (v,"PTS", b, 20); break; default: print_databytes (v,"adaptationDataByte:", b, len); break; } indent (-1); out_NL (v); return len_org; } /* * ISO/IEC 13818-6 * dsmccConditionalAccess() */ int dsmcc_ConditionalAccess (int v, u_char *b, int len) { int len2; out_nl (v, "Conditional Acess:"); indent (+1); outBit_Sx_NL (v,"reserved: ", b , 0, 8); outBit_S2x_NL (v,"caSystemId: ", b+1, 0, 16, (char *(*)(u_long)) dvbstrCASystem_ID); len2 = outBit_Sx_NL (v,"conditionalAccessLength: ", b+3, 0, 16); print_databytes (v,"conditionaAccessDataByte:", b+5, len2); indent (-1); return (5 + len2); } /* * ISO/IEC 13818-6 * dsmccUserID () */ int dsmcc_UserID (int v, u_char *b, int len) { out_nl (v, "User ID:"); indent (+1); outBit_Sx_NL (v,"reserved: ", b , 0, 8); // print_databytes (v,"UserId:", b+1, 20); dsmcc_carousel_NSAP_address_B20 (v, "UserId: ", b+1); indent (-1); return 21; } /* * print transactionID detail * ISO/IEC 13818-6 * TS 102 812 v1.2.1 B.2.7 * split transactionID in parts and print * return: transaction_id */ u_long dsmcc_print_transactionID_32 (int v, u_char *b) { u_long t_id; t_id = outBit_Sx_NL (v,"transactionID: ", b, 0, 32); outBit_S2x_NL (v," ==> originator: ", b, 0, 2, (char *(*)(u_long)) dsmccStr_transactionID_originator); outBit_Sx_NL (v," ==> version: ", b, 2, 14); outBit_Sx_NL (v," ==> identification: ", b, 16, 15); outBit_Sx_NL (v," ==> update toggle flag: ", b, 31, 1); return t_id; // $$$ TODO look for other transaction_id usage } /* * print carousel NSAP Address * ISO/IEC 13818-6 * ETSI 301 192 9.2.1 * len = 20 Bytes */ int dsmcc_carousel_NSAP_address_B20 (int v, const char *s, u_char *b) { int afi; int type,stype; // The AFI (authority and format identifier) shall be set to 0x00. // This value is defined in ISO 8348 Annex B as NSAP addresses // reserved for private use. As such, the rest of the NSAP address // fields are available for private definition. // // The type field shall be set to 0x00 when the Carousel NSAP // address points to a U-U Object Carousel. The values in the // range 0x01 to 0x7F shall be reserved to ISO/IEC 13818-6. The // values in the range 0x80 to 0xFF shall be user private and // their use is outside the scope of this part of ISO/IEC 13818. out_nl (v,"%s (NSAP address):", s); indent (+1); afi = outBit_Sx_NL (v,"Authority and Format Identifier: ", b , 0, 8); type = outBit_Sx_NL (v,"Type: ", b+1 , 0, 8); if (afi != 0x00 || type != 0x00) { print_databytes (v,"address bytes:", b+2, 18); } else { outBit_Sx_NL (v,"carousel id: ", b+2 , 0, 32); b += 6; stype = outBit_S2x_NL (v,"specifier type: ", b, 0, 8, (char *(*)(u_long))dsmccStr_SpecifierType ); if (stype == 0x01) { outBit_S2x_NL (v,"OUI: ", b, 8, 24, (char *(*)(u_long))dsmccStrOUI ); } else { outBit_Sx_NL (v,"specifier: ", b, 8, 24); } // -- private data... dsmcc_DVB_service_location (v, b); } indent (-1); return 20; } /* * DVB Service Location * ETSI EN 3001 192 * return: len (=10) */ int dsmcc_DVB_service_location (int v, u_char *b) { outBit_Sx_NL (v,"transport_stream_ID: ", b, 0, 16); outBit_S2x_NL (v,"Original_network_id: ", b, 16, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_S2Tx_NL(v,"service_ID: ", b, 32, 16, "--> refers to PMT program_number"); outBit_Sx_NL (v,"reserved: ", b, 48, 32); return 10; } /* * carousel descriptor loop * ETSI EN 301 192 v1.3.1 8.1.3 */ int dsmcc_CarouselDescriptor_Loop (const char *s, u_char *b, int len) { int len_org = len; if (len > 0) { out_nl (4,"%s (Carousel Descriptor loop):", s); indent (+1); while (len > 0) { int x; x = descriptor (b, DSMCC_CAROUSEL); b += x; len -= x; } out_NL (4); indent (-1); } return len_org; } dvbsnoop-1.4.50/src/datacarousel/dsmcc_grpinfind.c0000744000076400001440000000444610356276704015672 /* $Id: dsmcc_grpinfind.c,v 1.3 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc GroupInfoIndication() -- (e.g. part of DSI private data) $Log: dsmcc_grpinfind.c,v $ Revision 1.3 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/03/06 22:33:11 rasc no message Revision 1.1 2004/02/24 23:14:35 rasc DSI:: DSMCC::GroupInfoIndication */ #include "dvbsnoop.h" #include "dsmcc_grpinfind.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" /* * ISO/IEC 13818-6 * EN 301 192 * dsmcc GroupInfoIndication() */ int dsmcc_GroupInfoIndication (int v, u_char *b, u_int len_org) { int len = len_org; int n_groups; int i; int len2; // -- due to some misbehavior of some service providers // -- we do a simple plausi check for group_counts_min_bytes > len i = getBits (b, 0, 0, 16); // group_counts i = i * 8 + 2; if (i > len_org) { // this is no GroupInfo print_databytes (v,"Data Bytes (non-standard):", b, len_org); return len_org; } out_nl (v,"GroupInfoIndication:"); indent (+1); n_groups = outBit_Sx_NL (v,"NumberOfGroups: ", b, 0, 16); b += 2; len -= 2; for (i=0; i < n_groups; i++) { out_NL (v); if (len <= 0) { out_nl (v, "... => strange len <= 0 and still group count > 0 (abort)"); break; } out_nl (v, "Group (%d):",i); indent (+1); outBit_Sx_NL (v,"GroupId: ", b, 0, 32); outBit_Sx_NL (v,"GroupSize: ", b, 32, 32); b += 8; len -= 8; // GroupCompatibility() len2 = dsmcc_CompatibilityDescriptor (b); b += len2; len -= len2; len2 = outBit_Sx_NL (v,"GroupInfoLength: ", b, 0, 16); // print_databytes (v, "GroupInfoBytes: ", b+2, len2); // $$$ TODO dsmcc_CarouselDescriptor_Loop ("GroupInfo", b+2, len2); b += 2+len2; len -= 2+len2; indent (-1); } // $$$ passt das hier? len2 = outBit_Sx_NL (v,"PrivateDataLength: ", b, 0, 16); print_private_data (v, b+2, len2); // $$$ What to do here? // b += 2+len2; // len -= 2+len2; indent (-1); out_NL (v); return len_org; } // EN 301 192: // 8.1.2 DownloadServerInitiate message // Supergroups in DSI dvbsnoop-1.4.50/src/datacarousel/biop.c0000744000076400001440000001024410403124321013437 /* $Id: biop.c,v 1.2 2006/03/06 20:25:37 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc BIOP LITE_TAG... -- ISO/IEC 13818-6 -- ETSI TS 101 202 -- ETSI TS 102 812 -- ATSC A95 -- ATSC A47 $Log: biop.c,v $ Revision 1.2 2006/03/06 20:25:37 rasc DSM-CC Carousell, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.1 2006/03/06 00:04:49 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... */ #include "dvbsnoop.h" #include "biop.h" #include "biop_tag_tap.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "strings/dsmcc_str.h" static u_long _ProfileBody (int v, u_char *b); /* -- dsmcc BIOP LiteOptionsProfileBody -- return: len */ u_long BIOP_LiteOptionsProfileBody (int v, u_char *b) { u_long len; // first component should be a DSM:ServiceLocation() out_nl (v, "LiteOptionsProfileBody"); indent (+1); len = _ProfileBody (v, b); indent (-1); return len; } /* -- dsmcc BIOP BIOPProfileBody -- return: len */ u_long BIOP_BIOPProfileBody (int v, u_char *b) { u_long len; // first component should be a BIOP::ObjectLocation() // second component should be a DSM::ConBinder() out_nl (v, "BIOPProfileBody"); indent (+1); len = _ProfileBody (v, b); indent (-1); return len; } /* -- dsmcc Basic BIOP/Lite ProfileBody -- return: len */ u_long _ProfileBody (int v, u_char *b) { u_char *b_org = b; u_long len; int byte_order; int N1; outBit_S2x_NL(v,"profileId_tag: ", b, 0, 32, (char *(*)(u_long)) dsmccStrIOP_ProfileID ); len = outBit_Sx_NL (v,"profile_data_length: ", b, 32, 32); byte_order = outBit_S2x_NL(v,"profile_data_byte_order: ", b, 64, 8, (char *(*)(u_long)) dsmccStrBIOP_EndianType ); if (byte_order != 0x00) { out_nl (v, "==> Error: unsupported byte endian order"); print_databytes (v,"profile_data:", b+9, len-1); return len + 8; } // -- do components N1 = outBit_Sx_NL (v,"lite_component_count: ", b, 72, 8); b += 10; out_nl (v,"LiteComponents:"); for (; N1 > 0; N1--) { int len2; indent (+1); len2 = BIOP_LiteComponent (v,b); b += len2; indent (-1); } return (u_long) (b - b_org); } /* -- dsmcc BIOP::LiteComponent -- return: len */ u_long BIOP_LiteComponent (int v, u_char *b) { u_long len; len = BIOP_TAG_dispatch (v, b); return len; } /* -- dsmcc BIOP::ObjectLocation -- return: len */ u_long BIOP_ObjectLocation (int v, u_char *b) { int len; int n2; outBit_S2x_NL(v,"component_tag: ", b, 0, 32, (char *(*)(u_long)) dsmccStrIOP_ProfileID ); len = outBit_Sx_NL (v,"component_data_length: ", b, 32, 8); outBit_Sx_NL (v,"carouselId: ", b, 40, 32); outBit_Sx_NL (v,"moduleId: ", b, 72, 16); outBit_Sx_NL (v,"version.major: ", b, 88, 8); outBit_Sx_NL (v,"version.minor: ", b, 96, 8); n2 = outBit_Sx_NL (v,"objectKey_length: ", b, 104, 8); print_databytes (v,"objectKey_data:", b+14, n2); return len + 5; } /* -- dsmcc BIOP::Name -- Similar to CosNaming::Name (which is 32bit) -- return latest kind_data in *kind (32 bit), if kind != NULL -- return: len */ int BIOP_Name (int v, u_char *b, u_long *kind) { u_char *b_org = b; u_long n2; out_nl (v,"BIOP::Name"); indent (+1); n2 = outBit_Sx_NL (v,"nameComponents_count: ", b++, 0, 8); for (; n2 > 0; n2--) { u_long n3,n4; n3 = outBit_Sx_NL (v,"id_length: ", b++, 0, 8); print_databytes (v,"id_data:", b, n3); b += n3; n4 = outBit_Sx_NL (v,"kind_length: ", b++, 0, 8); print_databytes (v,"kind_data:", b, n4); if (kind) { *kind = getBits (b, 0, 0, 32); // type aliases } b += n4; } indent (-1); return (int) (b - b_org); } dvbsnoop-1.4.50/src/datacarousel/biop_dsm.c0000744000076400001440000001136110403124321014303 /* $Id: biop_dsm.c,v 1.2 2006/03/06 20:25:37 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc (BIOP) DSM:: routines -- TS 102 812 -- TS 101 202 -- ISO 13818-6 $Log: biop_dsm.c,v $ Revision 1.2 2006/03/06 20:25:37 rasc DSM-CC Carousell, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.1 2006/03/06 00:04:49 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... */ #include "dvbsnoop.h" #include "biop_dsm.h" #include "biop_tag_tap.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" #include "strings/dsmcc_str.h" #include "strings/dvb_str.h" /* * dsmcc BIOP DSM::ConnBinder(); * TS 102 812 * return: len */ int BIOP_DSM_ConnBinder (int v, u_char *b) { int len; int n3; out_nl (v,"DSM::ConnBinder"); indent (+1); outBit_S2x_NL (v,"componentId_tag: ", b, 0, 32, (char *(*)(u_long)) dsmccStrIOP_ProfileID ); len = outBit_Sx_NL (v,"component_data_length: ", b, 32, 8); n3 = outBit_Sx_NL (v,"tap_count: ", b, 40, 8); b += 6; indent (+1); for (; n3 > 0; n3--) { int n4; n4 = BIOP_TAP (v, "DSM", b); b += n4; } indent (-1); indent (-1); out_NL (v); return len+5; } /* * dsmcc BIOP DSM::ServiceLocation (); * TS 102 812 * return: len */ int BIOP_DSM_ServiceLocation (int v, u_char *b) { int len; int sd_len; int n; u_long n5; out_nl (v,"DSM::ServiceLocation"); indent (+1); outBit_S2x_NL (v,"componentId_tag: ", b, 0, 32, (char *(*)(u_long)) dsmccStrIOP_ProfileID ); len = outBit_Sx_NL (v,"component_data_length: ", b, 32, 8); len += 4; sd_len = outBit_Sx_NL (v,"service_domain_length: ", b, 40, 8); b += 6; BIOP_DSM_ServiceDomain (v,b, sd_len); b += sd_len; n = BIOP_DSM_CosNaming_Name (v,b); b += n; n5 = outBit_Sx_NL (v,"initialContext_length: ", b, 0, 32); print_databytes (v,"InitialContext_data_byte:", b+4, n5); // b += n5; indent (-1); out_NL (v); return len; } /* * ServiceDomain Data for DSM::ServiceLocation * return: len */ int BIOP_DSM_ServiceDomain (int v, u_char *b, int len) { dsmcc_carousel_NSAP_address_B20 (v, "DSM::ServiceDomain", b); out_NL (v); return len; } /* * CosNaming::Name for DSM::ServiceLocation * (Similar to BIOP::Name, but 32bit length fields) * return: len */ int BIOP_DSM_CosNaming_Name (int v, u_char *b) { u_char *b_org = b; u_long n2; out_nl (v,"CosNaming::Name"); indent (+1); n2 = outBit_Sx_NL (v,"nameComponents_count: ", b, 0, 32); b += 4; for (; n2 > 0; n2--) { u_long n3,n4; n3 = outBit_Sx_NL (v,"id_length: ", b, 0, 32); print_databytes (v,"id_data:", b+4, n3); b += 4 + n3; n4 = outBit_Sx_NL (v,"kind_length: ", b, 0, 32); print_databytes (v,"kind_data:", b+4, n4); b += 4 + n4; } indent (-1); out_NL (v); return (int) (b - b_org); } /* * DSM::Stream::Info_T for BIOP Messages * return: len */ int BIOP_DSM_Stream_Info_T (int v, u_char *b) { int n; out_nl (v,"DSM::Stream::Info_T"); indent (+1); n = outBit_Sx_NL (v,"aDescription_length: ", b, 0, 8); print_databytes (v,"aDescription:", b+1, n); b += 1+n; outBit_Sx_NL (v,"duration.aSeconds: ", b, 0, 32); outBit_Sx_NL (v,"duration.aMicroSeconds: ", b, 32, 32); outBit_Sx_NL (v,"audio: ", b, 64, 8); outBit_Sx_NL (v,"video: ", b, 72, 8); outBit_Sx_NL (v,"data: ", b, 80, 8); indent (-1); out_NL (v); // there might be an error in all Standards document???? // saying: N2- (N3+10) on a for-loop in BIOP::StreamMessage // (the +10 should be: +12) // for BIOP::StreamEventMessage calculations are correctly described // $$$ TODO: to be checked return (1 + n + 11); } /* * DSM::Event::EventList_T for BIOP Messages * return: len */ int BIOP_DSM_Event_EventList_T (int v, u_char *b) { u_char *b_org = b; int n1; out_nl (v,"DSM::Event::EventList_T"); indent (+1); n1 = outBit_Sx_NL (v,"eventNames_count: ", b, 0, 16); b += 2; indent (+1); for (; n1 > 0; n1--) { int n2; n2 = outBit_Sx_NL (v, "eventName_length: ", b, 0, 8); print_text_UTF8 (v, "eventName_data: ", b+1, n2); b += 1 + n2; } indent (-1); indent (-1); out_NL (v); return (int) (b - b_org); } dvbsnoop-1.4.50/src/datacarousel/biop_message.c0000744000076400001440000002043210403124321015143 /* $Id: biop_message.c,v 1.3 2006/03/06 20:25:37 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc BIOP:: xxxMessage -- ISO/IEC 13818-6 -- ETSI TS 101 202 -- ETSI TS 102 812 -- ATSC A95 -- ATSC A47 Log: biop_modinfo.c,v $ */ #include "dvbsnoop.h" #include "biop.h" #include "biop_dsm.h" #include "biop_tag_tap.h" #include "iop_ior.h" #include "descriptors/descriptor.h" #include "strings/dsmcc_str.h" #include "misc/output.h" static u_long body_FileMessage (int v, u_char *b); static u_long body_DirectoryMessage (int v, u_char *b); static u_long body_StreamMessage (int v, u_char *b); static u_long body_StreamEventMessage (int v, u_char *b); static u_long body_basic_Message (int v, u_char *b); static u_long do_ServiceContentList (int v, u_char *b); /* -- dsmcc BIOP::Message -- This is the basic BIOP message handler -- Handling the Message header part and -- branching into detailed message handling is done -- by analyzing "objectKind_data" -- return: len */ u_long BIOP_Message (int v, u_char *b) { u_char *b_org = b; u_long len; int bo; int n1,n2; u_long kind; out_nl (v, "BIOP::Message"); indent (+1); outBit_S2x_NL(v,"magic: ", b, 0, 32, (char *(*)(u_long)) dsmccStrBIOP_MAGIC); outBit_Sx_NL (v,"biop_version.major: ", b, 32, 8); outBit_Sx_NL (v,"biop_version.minor: ", b, 40, 8); bo = outBit_S2x_NL (v,"byte_order: ", b, 48, 8, (char *(*)(u_long)) dsmccStrBIOP_EndianType ); if (bo != 0x00) { out_nl (v, "==> Error: unsupported byte endian order"); } outBit_Sx_NL (v,"message_type: ", b, 56, 8); //$$$ TODO ?? outBit_Sx_NL (v,"message_size: ", b, 64, 32); b += 12; n1 = outBit_Sx_NL (v,"objectKey_length: ", b, 0, 8); print_databytes (v,"objectKey_data:", b+1, n1); b += 1 + n1; n2 = outBit_Sx_NL (v,"objectKind_length: ", b, 0, 32); b += 4; kind = 0x00; if (n2 != 4) { print_databytes (v,"objectKind_data:", b, n2); } else { // -- ISO 13818-6: length == 4 bytes, use type_id aliases kind = outBit_S2x_NL (v,"objectKind_data: ", b, 0, 32, (char *(*)(u_long)) dsmccStrBIOP_TypeID_Alias ); } b += n2; out_NL (v); // -- select message processing, // -- due to "kind" aka type_id aliases // -- --> 3 character abbrev. terminated with \0 switch (kind) { case 0x64697200: // "dir" (DSM::Directory) len = body_DirectoryMessage (v, b); break; case 0x66696c00: // "fil" (DSM:File) len = body_FileMessage (v, b); break; case 0x73746500: // "ste" (DSM:StreamEvent) len = body_StreamEventMessage (v, b); break; case 0x73726700: // "srg" (DSM:ServiceGateway) len = body_DirectoryMessage (v, b); break; case 0x73747200: // "str" (BIOP::Stream) len = body_StreamMessage (v, b); break; default: // unsported BIOP (????) out_nl (v, "unsopported BIOP (please report!!):"); len = body_basic_Message (v, b); break; } b += len; out_NL (v); indent (-1); return (u_long) (b - b_org); } /* * BIOP::FileMessage * decode message body * return: len of body */ static u_long body_FileMessage (int v, u_char *b) { u_char *b_org = b; u_long nx,n2,n5; n2 = outBit_Sx_NL (v,"objectInfo_length: ", b, 0, 16); b += 2; if (n2) { // has to be >= 8 outBit64_Sx_NL (v,"DSM::File::ContentSize: ", b, 0, 64); b += 8; n2 -= 8; if (n2 > 0) { out_nl (v, "Descriptor_loop:"); indent (+1); while (n2 > 0) { int x; x = descriptor (b, DSMCC_CAROUSEL); b += x; n2 -= x; out_NL (v); } } // if n2 > 0 indent (-1); } // if n2 out_NL (v); nx = do_ServiceContentList (v, b); b += nx; outBit_Sx_NL (v,"messageBody_length: ", b, 0, 32); n5 = outBit_Sx_NL (v,"content_length: ", b, 32, 32); print_databytes(v,"content__byte:", b+8, n5); b += 8 + n5; return (u_long) (b - b_org); } /* * BIOP::DirectoryMessage * decode message body * return: len of body */ static u_long body_DirectoryMessage (int v, u_char *b) { u_char *b_org = b; int i; u_int nx,n2,n5,n7,n9; n2 = outBit_Sx_NL (v,"objectInfo_length: ", b, 0, 16); print_databytes(v,"objectInfo_data:", b+2, n2); b += 2 + n2; out_NL (v); nx = do_ServiceContentList (v, b); b += nx; outBit_Sx_NL (v,"messageBody_length: ", b, 0, 32); n5 = outBit_Sx_NL (v,"bindings_count: ", b, 32, 16); b += 6; indent (+1); for (i=0; i < n5; i++) { int n6; u_long kinddata; n6 = BIOP_Name (v, b, &kinddata); b += n6; outBit_S2x_NL (v,"BindingType: ", b, 0, 8, (char *(*)(u_long)) dsmccStrBIOP_BindingType); b += 1; n7 = IOP_IOR (v, b); b += n7; n9 = outBit_Sx_NL (v,"objectInfo_length: ", b, 0, 16); b += 2; if (n9) { if (kinddata == 0x66696c00) { // "fil" outBit64_Sx_NL (v,"DSM::File::ContentSize: ", b, 16, 64); b += 8; n9 -= 8; } if (n9 > 0) { print_databytes (v,"descriptor_bytes (PLEASE REPORT!!!):", b, n9); b += n9; // $$$ TODO: to be checked...!!! (instead of print_databytes) // // out_nl (v, "Descriptor_loop:"); // indent (+1); // while (n9 > 0) { // int x; // // x = descriptor (b, DSMCC_CAROUSEL); // b += x; // n9 -= x; // out_NL (v); // } // indent (-1); } // if n9 > 0 } // if n9 } // loop n5 indent (-1); return (u_long) (b - b_org); } /* * BIOP::StreamMessage * decode message body * return: len of body */ static u_long body_StreamMessage (int v, u_char *b) { u_char *b_org = b; u_int nx,n2,n6; n2 = outBit_Sx_NL (v,"objectInfo_length: ", b, 0, 16); b += 2; nx = BIOP_DSM_Stream_Info_T (v, b); // $$$ Warning: Standards documents may describe wrong length calculation! print_databytes (v,"ObjectInfo_byte:", b+nx, n2-nx); b += n2; nx = do_ServiceContentList (v, b); b += nx; outBit_Sx_NL (v,"messageBody_length: ", b, 0, 32); n6 = outBit_Sx_NL (v,"tap_count: ", b, 32, 8); b += 5; indent (+1); for (; n6 > 0; n6--) { int ny; ny = BIOP_TAP (v, "", b); b += ny; } indent (-1); return (u_long) (b - b_org); } /* * BIOP::StreamEventMessage * decode message body * return: len of body */ static u_long body_StreamEventMessage (int v, u_char *b) { u_char *b_org = b; u_int nx,ny,n2,n8,n4; n2 = outBit_Sx_NL (v,"objectInfo_length: ", b, 0, 16); b += 2; nx = BIOP_DSM_Stream_Info_T (v, b); ny = BIOP_DSM_Event_EventList_T (v, b+nx); print_databytes (v,"ObjectInfo_byte:", b+nx, n2-nx-ny); b += n2; nx = do_ServiceContentList (v, b); b += nx; outBit_Sx_NL (v,"messageBody_length: ", b, 0, 32); n8 = outBit_Sx_NL (v,"tap_count: ", b, 32, 8); b += 5; indent (+1); for (; n8 > 0; n8--) { int nz; nz = BIOP_TAP (v, "", b); b += nz; } indent (-1); n4 = outBit_Sx_NL (v,"eventIds_count: ", b, 0, 8); b += 1; indent (+1); for (; n4 > 0; n4--) { outBit_Sx_NL (v,"eventId: ", b, 0, 16); b += 2; } indent (-1); return (u_long) (b - b_org); } /* * BIOP::basic_Message * decode basic message body * return: len of body */ static u_long body_basic_Message (int v, u_char *b) { u_char *b_org = b; u_int nx,n2,n3; n2 = outBit_Sx_NL (v,"objectInfo_length: ", b, 0, 16); print_databytes (v,"ObjectInfo_byte:", b+2, n2); b += 2 + n2; nx = do_ServiceContentList (v, b); b += nx; n3 = outBit_Sx_NL (v,"messageBody_length: ", b, 0, 32); print_databytes (v,"MessageBody:", b+4, n3); b += 4 + n3; return (u_long) (b - b_org); } /* * some common routines parts here... * return: len */ static u_long do_ServiceContentList (int v, u_char *b) { u_char *b_org = b; int n3; n3 = outBit_Sx_NL (v,"serviceContentList_count: ", b, 0, 8); b += 1; indent (+1); for (; n3 > 0; n3--) { int n4; outBit_Sx_NL (v,"context_id: ", b, 0, 32); n4 = outBit_Sx_NL (v,"context_data_length: ", b, 32, 16); print_databytes (v,"context_data:", b+6, n4); b += 6 + n4; } indent (-1); return (u_long) (b - b_org); } dvbsnoop-1.4.50/src/datacarousel/biop_tag_tap.c0000744000076400001440000001042710403124321015141 /* $Id: biop_tag_tap.c,v 1.2 2006/03/06 20:25:37 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc BIOP/IOR/LITE Tag Dispatch -- ETSI TR 101 202 -- ETSI TS 102 812 -- ISO 13818-6 -- ATSC A95 -- ATSC A47 $Log: biop_tag_tap.c,v $ Revision 1.2 2006/03/06 20:25:37 rasc DSM-CC Carousell, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.1 2006/03/06 00:04:49 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... */ #include "dvbsnoop.h" #include "biop_tag_tap.h" #include "biop.h" #include "biop_dsm.h" #include "biop_message.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" #include "strings/dsmcc_str.h" /* * dsmcc BIOP TAG Dispatch * This is an universal DSM/BIOP/LITE dispatcher * using a id_tag prefetch to decide where to branch... * * to be called from: * IOP_IOR * LiteOptionsProfileBody * BIOPs * etc. * * return: len */ u_long BIOP_TAG_dispatch (int v, u_char *b) { u_long id_tag; u_long len; id_tag = getBits (b, 0, 0, 32); // ID_tag prefetch switch (id_tag) { case 0x42494F50: // "BIOP" // BIOP::FileMessage // BIOP::DirectoryMessage // BIOP::StreamMessage // BIOP::StreamEventMessage len = BIOP_Message (v, b); break; case 0x49534f05: // TAG_LITE_OPTIONS len = BIOP_LiteOptionsProfileBody (v, b); break; case 0x49534f06: // TAG_BIOP // BIOPProfileBody len = BIOP_BIOPProfileBody (v, b); break; case 0x49534f40: // TAG_ConnBinder // DSM::ConnBinder len = BIOP_DSM_ConnBinder (v, b); break; case 0x49534f46: // TAG_SERVICE_LOCATION len = BIOP_DSM_ServiceLocation (v, b); break; case 0x49534f50: // TAG_ObjectLocation // DSM::ConnBinder len = BIOP_ObjectLocation (v, b); break; default: // unknown !!! // $$$ TODO: we wildly guess, that there is a 32b length field! // $$$ TODO: this may break the decoding process, if not true outBit_S2x_NL (v,"profileId_tag: ", b, 0, 32, (char *(*)(u_long)) dsmccStrIOP_ProfileID ); len = outBit_Sx_NL (v,"profile_data_length: ", b, 32, 32); print_databytes (v,"unkown profile_data:", b+8, len); len += 8; break; } out_NL (v); return len; } // NOT (yet) implemented... // // case 0x49534f00: // TAG_MIN // case 0x49534f01: // TAG_CHILD // case 0x49534f02: // TAG_OPTIONS // case 0x49534f03: // TAG_LITE_MIN // case 0x49534f04: // TAG_LITE_CHILD // /* * dsmcc BIOP DSM::TAP(); * return: length */ int BIOP_TAP (int v, const char *str, u_char *b) { u_char *b_org = b; int use; int n; out_nl (v, "%s::TAP:"); indent (+1); outBit_Sx_NL (v,"id: ", b, 0, 16); use = outBit_S2x_NL(v,"use: ", b, 16, 16, (char *(*)(u_long))dsmccStrBIOP_TAP_Use ); outBit_Sx_NL (v,"association_tag: ", b, 32, 16); n = outBit_Sx_NL (v,"selector_length: ", b, 48, 8); b += 7; // -- a TAP may have a Selector() if (n >= 2) { int stype; stype = outBit_S2x_NL(v,"selector_type: ", b, 0, 16, (char *(*)(u_long))dsmccStrBIOP_TAP_SelectorType ); indent (+1); switch (stype) { case 0x0001: // MessageSelector dsmcc_print_transactionID_32 (v, b+2); outBit_S2Tx_NL (v,"timeout: ", b, 48, 32, "usec."); break; case 0x0109: // ATSC A95: TSFS_selector outBit_Sx_NL (v,"carouselId: ", b, 16, 32); outBit_S2Tx_NL (v,"DSI_timeout: ", b, 48, 32, "usec."); if (n > 10) { print_databytes (v,"URI_byte:", b+10, n-10); } break; case 0x0000: // ISO/IEC reserved default: // unknown, default print_databytes (v,"selector_data:", b+2, n-2); break; } indent (-1); } else { if (n > 0) { print_databytes (v,"selector_data:", b, n); } } b += n; indent (-1); out_NL (v); return (int) (b - b_org); } dvbsnoop-1.4.50/src/datacarousel/biop_modinfo.c0000744000076400001440000000652510402705261015170 /* $Id: biop_modinfo.c,v 1.7 2006/03/06 00:04:49 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc BIOP::ModuleInfo -- ISO/IEC 13818-6, ATSC a_47b $Log: biop_modinfo.c,v $ Revision 1.7 2006/03/06 00:04:49 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.6 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.5 2004/03/06 22:33:10 rasc no message Revision 1.4 2004/02/29 23:49:28 rasc no message Revision 1.3 2004/02/24 23:03:04 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.2 2004/02/20 23:13:17 rasc BIOP: TapUse Revision 1.1 2004/02/20 22:21:57 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... */ #include "dvbsnoop.h" #include "biop_modinfo.h" #include "biop_tag_tap.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "misc/hexprint.h" #include "strings/dsmcc_str.h" #include "strings/dvb_str.h" /* * dsmcc BIOP::ModuleInfo( * ISO/IEC 13818-6 / ATSC a_47b * return: length used */ int BIOP_ModuleInfo (int v, u_char *b, u_int len_org) { int len = len_org; int n1, i; // -- due to some misbehavior of some service providers // -- we do a simple plausi check for tap_counts_min_bytes > len i = getBits (b, 0, 96, 8); // tap_counts i = i * 7; if (i > len_org) { // this is no ModuleInfo print_databytes (v,"Data Bytes (non-standard):", b, len_org); return len_org; } out_nl (v, "BIOP::ModuleInfo:"); indent (+1); outBit_S2Tx_NL (v,"ModuleTimeOut: ", b, 0, 32, "(ms)"); outBit_S2Tx_NL (v,"BlockTimeOut: ", b, 32, 32, "(ms)"); outBit_S2Tx_NL (v,"MinBlockTime: ", b, 64, 32, "(ms)"); n1 = outBit_Sx_NL (v,"taps_count: ", b, 96, 8); b += 13, len -= 13; indent (+1); while (n1-- > 0) { int n2; // BIOP_OBJECT_USE n2 = BIOP_TAP (v, "DSM", b); b += n2; len -= n2; } indent (-1); out_NL (v); n1 = outBit_Sx_NL (v,"userInfoLength: ", b, 0, 8); // print_databytes (v,"UserInfoData:", b, n1); dsmcc_CarouselDescriptor_Loop ("userInfo", b+1, n1); b += 1+n1; len -= 1+n1; indent (-1); return len_org; } // BIOP::ModuleInfo:: // UserInfo // The userInfo field contains a loop of descriptors. These are speci .ed in the // DVB Data Broadcasting standard and/or this speci .cation.The MHP // terminal shall support the compressed_module_descriptor (tag 0x09)used // to signal that the module is transmitted in compressed form.The userInfo // .eld may also contain a caching_priority_descriptor and one or more label_ // descriptors. // DVB /This // spec. // atsc a47 // The moduleInfoBytes field shall contain the BIOP::ModuleInfo // structure. The BIOP::ModuleInfo structure provides additional // delivery parameters and the Taps that are used to broadcast the // Modules in the network. The syntax and semantics of the // BIOP::ModuleInfo structure are shown below. dvbsnoop-1.4.50/src/datacarousel/biop_servgatinf.c0000744000076400001440000000450410402705261015700 /* $Id: biop_servgatinf.c,v 1.3 2006/03/06 00:04:49 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc BIOP::ServiceGatewayInfo() -- TR 101 202 v1.2.1 4.7.5.2 $Log: biop_servgatinf.c,v $ Revision 1.3 2006/03/06 00:04:49 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.2 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/02/24 23:03:04 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() */ #include "dvbsnoop.h" #include "biop_servgatinf.h" #include "biop_tag_tap.h" #include "iop_ior.h" #include "dsmcc_misc.h" #include "descriptors/descriptor.h" #include "misc/output.h" #include "misc/hexprint.h" #include "strings/dsmcc_str.h" #include "strings/dvb_str.h" /* * dsmcc BIOP::ServiceGatewayInfo() * TR 101 202 v 1.2.1 * return: length used */ int BIOP_ServiceGatewayInfo (int v, u_char *b, u_int len) { int len_org = len; int i; int nx,n1,n2; out_nl (v, "BIOP::ServiceGatewayInfo:"); indent (+1); nx = IOP_IOR (v,b); b += nx; len -= nx; n1 = outBit_Sx_NL (v,"downloadTaps_count: ", b, 0, 8); b++; len--; for (i=0; i < n1; i++) { int n3; n3 = BIOP_TAP (v, "DSM", b); b += n3; len -= n3; } n1 = outBit_Sx_NL (v,"serviceContextList_count: ", b, 0, 8); b++; len--; for (i=0; i < n1; i++) { outBit_Sx_NL (v,"context_id: ", b, 0, 32); n2 = outBit_Sx_NL (v,"context_data_length: ", b, 32, 16); print_databytes (v,"context_data:", b+6, n2); // $$$ TODO b += 6 + n2; len -= 6 + n2; } n1 = outBit_Sx_NL (v,"userInfoLength: ", b, 0, 16); dsmcc_CarouselDescriptor_Loop ("userInfo", b+2, n1); b += 2+n1; len -= 2+n1; indent (-1); return len_org; } // BIOP::ServiceGatewayInfo():: // The user info field shall be structured as a descriptor loop. // The descriptors in this loop shall be either descriptors as // defined in the DVB Data Broadcasting Specification or private descriptors. dvbsnoop-1.4.50/src/datacarousel/iop_ior.c0000744000076400001440000000372210414526234014164 /* $Id: iop_ior.c,v 1.4 2006/04/04 17:27:56 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- dsmcc Interoperable Object Reference (IOR) -- TR 101 202 v1.2.1 4.7.5.2 -- TS 102 812 $Log: iop_ior.c,v $ Revision 1.4 2006/04/04 17:27:56 rasc no message Revision 1.3 2006/03/06 00:04:50 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.2 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/02/24 23:03:04 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() */ #include "dvbsnoop.h" #include "iop_ior.h" #include "biop_tag_tap.h" #include "dsmcc_misc.h" #include "misc/output.h" #include "strings/dsmcc_str.h" /* * dsmcc IOP::IOR () * TR 101 202 v 1.2.1 * return: length used */ int IOP_IOR (int v, u_char *b) { u_char *b_start = b; int i,x; u_long n1; out_nl (v, "IOP::IOR:"); indent (+1); n1 = outBit_Sx_NL (v,"type_id_length: ", b, 0, 32); print_text_UTF8 (v, "type_id: ", b+4, n1); b += 4+n1; // alignment gap (CDR alignment rule), should be 0xFF x = n1 % 4; if (x) { print_databytes (v,"alignment_gap:", b, 4-x); b += 4-x; } n1 = outBit_Sx_NL (v,"taggedProfiles_count: ", b, 0, 32); b += 4; for (i=0; i < n1; i++) { u_long n2; // IOP_taggedProfile n2 = IOP_taggedProfile (v, b); b += n2; } indent (-1); return b - b_start; } /* * TR 101 202 v 1.2.1 * return: len */ u_long IOP_taggedProfile (int v, u_char *b) { u_long len; // e.g. BIOPProfileBody // e.g. LiteOptionsProfileBody len = BIOP_TAG_dispatch (v,b); return len; } dvbsnoop-1.4.50/src/datacarousel/mhp_misc.c0000744000076400001440000000261010356276704014327 /* $Id: mhp_misc.c,v 1.4 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: mhp_misc.c,v $ Revision 1.4 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.3 2004/02/15 01:01:01 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.2 2004/02/12 21:21:19 rasc MHP AIT descriptors some smaller changes Revision 1.1 2004/02/10 22:57:52 rasc MHP descriptor, missing DVB descriptor done */ #include "dvbsnoop.h" #include "mhp_misc.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/output.h" /* * used in AIT and in descriptors * ETSI TS 102 812 */ int mhp_application_identifier (int v, u_char *b) { outBit_Sx_NL (v,"organisation_id: ", b, 0, 32); outBit_S2x_NL (v,"appliction_id: ", b, 32, 16, (char *(*)(u_long)) dsmccStrMHP_application_id ); return 6; } /* * used in AIT and in descriptors * ETSI TS 102 812 */ int mhp_application_profile_version (int v, u_char *b) { outBit_Sx_NL (v,"application_profile: ", b, 0, 16); outBit_Sx_NL (v,"version.major: ", b, 16, 8); outBit_Sx_NL (v,"version.minor: ", b, 24, 8); outBit_Sx_NL (v,"version.micro: ", b, 32, 8); return 5; } dvbsnoop-1.4.50/src/datacarousel/llc_snap.c0000744000076400001440000000506010356276704014325 /* $Id: llc_snap.c,v 1.6 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: llc_snap.c,v $ Revision 1.6 2006/01/02 18:23:47 rasc just update copyright and prepare for a new public tar ball Revision 1.5 2004/01/25 21:37:27 rasc bugfixes, minor changes & enhancments Revision 1.4 2004/01/01 20:09:16 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.3 2003/12/26 23:27:39 rasc DSM-CC UNT section Revision 1.2 2003/11/26 20:31:50 rasc no message Revision 1.1 2003/11/26 20:02:31 rasc LLC-SNAP */ #include "dvbsnoop.h" #include "llc_snap.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" /* -- decode LLC/SNAP -- ISO 8802, RFC 1042 -- return: len */ int llc_snap (int v, u_char *b) { int dsap, ssap, ctrl; int oui, prot; out_nl (v,"LLC/SNAP:"); indent (+1); out_nl (v,"LLC:"); dsap = outBit_Sx_NL (v," DSAP: ", b, 0, 8); ssap = outBit_Sx_NL (v," SSAP: ", b, 8, 8); ctrl = outBit_Sx_NL (v," Control: ", b,16, 8); out_nl (v,"SNAP:"); oui = outBit_S2x_NL (v," Org. Unique ID: ", b,24,24, (char *(*)(u_long))dsmccStrOUI ); prot = outBit_S2x_NL (v," Protocol Identifier: ", b,48,16, (char *(*)(u_long))dsmccStr_LLC_SNAP_prot ); indent (-1); return 8; } /* * * $$$ TODO LLC-Snap * LLCSNAP() -- This structure shall contain the datagram according to the ISO/IEC 8802-2 Logical Link Control (LLC) and ISO/IEC 8802-1a SubNetwork Attachment Point (SNAP) specifications. In LLC Type 1 operation, unacknowledged connectionless mode, the LLC header is three bytes long and consists of a one byte Destination Service Access Point (DSAP) field, a one byte Source Service Access Point (SSAP) field, a one byte Control field. The values 0xAA in the LLC header's DSAP and SSAP fields indicate that an IEEE 802.2 SNAP header follows. The Control value of 0x03 specifies an Unnumbered Information Command PDU. The SNAP header is five bytes long and consists of a three byte Organizationally Unique Identifier (OUI) field and a two byte Protocol Identifier. The SNAP OUI value 0x00-00-00 specifies the Protocol Identifier as an EtherType or routed non-OSI protocol. The SNAP OUI of 0x00-80-C2 indicates a Bridged Protocol. When the OUI is set to 0x00-00-00 then the SNAP Protocol Identifier for IP is 0x08-00. For Internet Protocol datagrams, the complete LLC/SNAP header is 0xAA-AA-03-00-00-00-08-00. */ dvbsnoop-1.4.50/src/tvanytime/0000777000076400001440000000000010630324344012006 5dvbsnoop-1.4.50/src/tvanytime/rnt.h0000744000076400001440000000043610356276776012726 /* $Id: rnt.h,v 1.4 2006/01/02 18:24:46 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __RNT_H #define __RNT_H void section_TVA_RNT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/tvanytime/cs.h0000744000076400001440000000043210356276776012524 /* $Id: cs.h,v 1.2 2006/01/02 18:24:46 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __CS_H #define __CS_H void section_TVA_CS (u_char *b, int len); #endif dvbsnoop-1.4.50/src/tvanytime/Makefile.am0000744000076400001440000000023310267013124013752 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libtvanytime.a noinst_HEADERS = \ rnt.h \ cs.h libtvanytime_a_SOURCES = \ rnt.c \ cs.c dvbsnoop-1.4.50/src/tvanytime/Makefile.in0000644000076400001440000002663710630302151013775 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libtvanytime_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/tvanytime DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libtvanytime_a_AR = $(AR) $(ARFLAGS) libtvanytime_a_LIBADD = am_libtvanytime_a_OBJECTS = rnt.$(OBJEXT) cs.$(OBJEXT) libtvanytime_a_OBJECTS = $(am_libtvanytime_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cs.Po ./$(DEPDIR)/rnt.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtvanytime_a_SOURCES) DIST_SOURCES = $(libtvanytime_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libtvanytime.a noinst_HEADERS = \ rnt.h \ cs.h libtvanytime_a_SOURCES = \ rnt.c \ cs.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tvanytime/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tvanytime/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libtvanytime.a: $(libtvanytime_a_OBJECTS) $(libtvanytime_a_DEPENDENCIES) -rm -f libtvanytime.a $(libtvanytime_a_AR) libtvanytime.a $(libtvanytime_a_OBJECTS) $(libtvanytime_a_LIBADD) $(RANLIB) libtvanytime.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rnt.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/tvanytime/rnt.c0000744000076400001440000001012610414526234012674 /* $Id: rnt.c,v 1.6 2006/04/04 17:27:56 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Resolution Notification Table (RNT) -- Resolution provider Notification Section -- TS 102 323 $Log: rnt.c,v $ Revision 1.6 2006/04/04 17:27:56 rasc no message Revision 1.5 2006/01/02 18:24:46 rasc just update copyright and prepare for a new public tar ball Revision 1.4 2005/07/18 21:11:41 rasc TVA Content Section Revision 1.3 2004/10/17 22:20:39 rasc section decoding functions renamed due to preparation of private structures Revision 1.2 2004/07/26 20:58:03 rasc RNT completed.. (TS 102 323) Revision 1.1 2004/07/25 21:13:37 rasc do not forget to commit new files - RNT resolution_authority/provider_notification_section (TS 102 323) */ #include "dvbsnoop.h" #include "rnt.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_TVA_RNT (u_char *b, int len) { /* TS 102 323 */ u_int len1,len2; u_int table_id; u_int section_length; out_nl (3,"RNT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id != 0x79) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (6,"reserved: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); outBit_Sx_NL (3,"context_id: ", b,24, 16); outBit_Sx_NL (6,"reserved_3: ", b,40, 2); outBit_Sx_NL (3,"version_number: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b,48, 8); outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); outBit_S2x_NL(3,"context_id_type: ", b,64, 8, (char *(*)(u_long))dvbstrTVA_content_id_type ); len2 = outBit_Sx_NL (3,"common_descriptor_length: ", b,72, 12); outBit_Sx_NL (6,"reserved: ", b,84, 4); b += 11; len1 = section_length - 8; // common descriptor loop out_nl (3,"Common_descriptor_loop:"); indent (+1); while (len2 > 0) { int i; i = descriptor (b, TVA_RNT); b += i; len1 -= i; len2 -= i; out_NL (4); } indent (-1); // resolution provider info loop out_nl (3,"resolution_provider_info_loop:"); indent (+1); while (len1 > 0) { int len2, len3; len2 = outBit_Sx_NL (3,"resolution_provider_info_length: ", b, 0, 12); outBit_Sx_NL (6,"reserved: ", b, 12, 4); len3 = outBit_Sx_NL (3,"resolution_provider_name_length: ", b, 16, 8); print_std_ascii (3,"resolution_provider_name: ", b+3, len3); b += len3 + 3; len1 -= len3 + 3; len2 -= len3 + 3; // resolution_provider_descriptors loop len3 = outBit_Sx_NL (3,"resolution_provider_descriptor_length: ", b, 0, 12); outBit_Sx_NL (6,"reserved: ", b, 12, 4); b += 2; len1 -= 2; len2 -= 2; out_nl (3,"resolution_provider_descriptor_loop:"); indent (+1); while (len3 > 0) { int i; i = descriptor (b, TVA_RNT); b += i; len1 -= i; len2 -= i; len3 -= i; out_NL (4); } indent (-1); // CRID_authority loop out_nl (3,"CRID_authority_loop:"); indent (+1); while (len2 > 0) { len3 = outBit_Sx_NL (3,"CRID_authority_name_length: ", b, 0, 8); print_std_ascii (3,"CRID_authority_name: ", b+1, len3); b += len3 + 1; len1 -= len3 + 1; len2 -= len3 + 1; // CRID_authority_descriptors loop len3 = outBit_Sx_NL (3,"CRID_authority_descriptors_length: ", b, 0, 12); outBit_Sx_NL (6,"reserved: ", b, 12, 4); b += 2; len1 -= 2; len2 -= 2; out_nl (3,"CRID_authority_descriptor_loop:"); indent (+1); while (len3 > 0) { int i; i = descriptor (b, TVA_RNT); b += i; len1 -= i; len2 -= i; len3 -= i; out_NL (4); } indent (-1); } indent (-1); } indent (-1); outBit_Sx_NL (5,"CRC: ", b,0,32); } // Annotation: // // $$$ TODO: RNT is untested so far !!! // need stream with RNT data dvbsnoop-1.4.50/src/tvanytime/cs.c0000744000076400001440000000346510356276776012530 /* $Id: cs.c,v 1.2 2006/01/02 18:24:46 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Container section (CS) -- TS 102 323 $Log: cs.c,v $ Revision 1.2 2006/01/02 18:24:46 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2005/07/18 21:13:05 rasc TVA Content Section */ #include "dvbsnoop.h" #include "cs.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_TVA_CS (u_char *b, int len) { /* TS 102 323 */ u_int table_id; u_int section_length; int len1; out_nl (3,"CS-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id != 0x75) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"section_length: ", b,12,12); outBit_Sx_NL (3,"container_id: ", b,24, 16); outBit_Sx_NL (6,"reserved: ", b,40, 2); outBit_Sx_NL (3,"version_number: ", b,42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b,47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b,48, 8); outBit_Sx_NL (3,"Last_section_number: ", b,56, 8); b += 8; len1 = section_length - 5; // common descriptor loop out_nl (3,"Container_data:"); indent (+1); // $$$TODO -- compression wrapper, container data print_private_data (3,b,len1); b += len1; indent (-1); outBit_Sx_NL (5,"CRC: ", b,0,32); } // Annotation: // // $$$ TODO: CS is untested so far !!! // need stream with CS data dvbsnoop-1.4.50/src/testdata/0000777000076400001440000000000010630324344011577 5dvbsnoop-1.4.50/src/testdata/test0x1d.h0000744000076400001440000000035710356274770013362 /* DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __TEST0X1D_H #define __TEST0X1D_H void section_TESTDATA (u_char *b, int len); #endif dvbsnoop-1.4.50/src/testdata/Makefile.am0000744000076400001440000000022007750013610013542 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libtestdata.a noinst_HEADERS = \ test0x1d.h libtestdata_a_SOURCES = \ test0x1d.c dvbsnoop-1.4.50/src/testdata/Makefile.in0000644000076400001440000002645510630302150013563 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libtestdata_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/testdata DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libtestdata_a_AR = $(AR) $(ARFLAGS) libtestdata_a_LIBADD = am_libtestdata_a_OBJECTS = test0x1d.$(OBJEXT) libtestdata_a_OBJECTS = $(am_libtestdata_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/test0x1d.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtestdata_a_SOURCES) DIST_SOURCES = $(libtestdata_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libtestdata.a noinst_HEADERS = \ test0x1d.h libtestdata_a_SOURCES = \ test0x1d.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/testdata/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/testdata/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libtestdata.a: $(libtestdata_a_OBJECTS) $(libtestdata_a_DEPENDENCIES) -rm -f libtestdata.a $(libtestdata_a_AR) libtestdata.a $(libtestdata_a_OBJECTS) $(libtestdata_a_LIBADD) $(RANLIB) libtestdata.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test0x1d.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/testdata/test0x1d.c0000744000076400001440000000362210356276762013356 /* $Id: test0x1d.c,v 1.10 2006/01/02 18:24:33 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- test data section -- DVB test and measurement signalling channel -- ETSI TR 101 291 $Log: test0x1d.c,v $ Revision 1.10 2006/01/02 18:24:33 rasc just update copyright and prepare for a new public tar ball Revision 1.9 2005/10/20 22:25:19 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.8 2004/10/17 22:20:39 rasc section decoding functions renamed due to preparation of private structures Revision 1.7 2004/02/20 22:18:44 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.6 2004/01/01 20:09:42 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/12/28 00:01:15 rasc some minor changes/adds... Revision 1.4 2003/12/27 22:02:45 rasc dsmcc INT UNT descriptors started Revision 1.3 2003/11/26 20:31:51 rasc no message Revision 1.2 2003/11/26 16:27:48 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.1 2003/10/29 21:00:22 rasc more PES stuff, DSM descriptors, testdata */ #include "dvbsnoop.h" #include "test0x1d.h" #include "misc/output.h" #include "misc/hexprint.h" void section_TESTDATA (u_char *b, int len) { out_nl (3,"TESTDATA-decoding...."); outBit_Sx_NL (3,"Table_ID: ", b, 0, 6); outBit_Sx_NL (3,"priority_level: ", b, 6, 2); outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); // $$$ TODO ... print_databytes(5,"Data:",b,len); } dvbsnoop-1.4.50/src/descriptors/0000777000076400001440000000000010630324345012330 5dvbsnoop-1.4.50/src/descriptors/descriptor.h0000744000076400001440000000341510356276716014614 /* $Id: descriptor.h,v 1.12 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Descriptors Section $Log: descriptor.h,v $ Revision 1.12 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.11 2004/11/03 21:00:50 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.10 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.9 2004/02/07 01:28:01 rasc MHP Application Information Table some AIT descriptors Revision 1.8 2004/01/11 21:01:31 rasc PES stream directory, PES restructured Revision 1.7 2004/01/02 22:25:35 rasc DSM-CC MODULEs descriptors complete Revision 1.6 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/11/26 19:55:32 rasc no message Revision 1.4 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #ifndef __DESCRIPTOR_H #define __DESCRIPTOR_H // Descriptor tag space/scope... typedef enum { MPEG, DVB_SI, DSMCC_STREAM, DSMCC_CAROUSEL, DSMCC_INT_UNT, MHP_AIT, TVA_RNT } DTAG_SCOPE; int descriptor (u_char *b, DTAG_SCOPE s); void descriptor_any (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/dvb_descriptor.h0000744000076400001440000001311210402705264015425 /* $Id: dvb_descriptor.h,v 1.16 2006/03/06 00:04:52 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- DVB Descriptors ETSI 300 468 $Log: dvb_descriptor.h,v $ Revision 1.16 2006/03/06 00:04:52 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.15 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.14 2005/12/22 16:21:50 rasc Update and new descriptors EN 300 468 v1.7.1 Revision 1.13 2005/11/08 23:15:24 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.12 2005/01/17 19:41:22 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.11 2004/07/25 20:12:58 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.10 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.9 2004/04/05 17:32:13 rasc mass typo fix adaption --> adaptation Revision 1.8 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.7 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.6 2003/12/27 18:17:17 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.5 2003/11/26 23:54:47 rasc -- bugfixes on Linkage descriptor Revision 1.4 2003/11/26 19:55:32 rasc no message Revision 1.3 2003/10/25 19:11:49 rasc no message Revision 1.2 2003/10/19 21:05:53 rasc - some datacarousell stuff started Revision 1.1 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #ifndef _DVB_DESCRIPTOR_H #define _DVB_DESCRIPTOR_H int descriptorDVB (u_char *b); void descriptorDVB_NetName (u_char *b); void descriptorDVB_ServList (u_char *b); void descriptorDVB_Stuffing (u_char *b); void descriptorDVB_SatDelivSys (u_char *b); void descriptorDVB_CableDelivSys (u_char *b); void descriptorDVB_VBI_Data (u_char *b); void descriptorDVB_VBI_Teletext (u_char *b); void descriptorDVB_BouquetName (u_char *b); void descriptorDVB_Service (u_char *b); void descriptorDVB_CountryAvail (u_char *b); void descriptorDVB_Linkage (u_char *b); void sub_descriptorDVB_Linkage0x08 (u_char *b, int len); void sub_descriptorDVB_Linkage0x09 (u_char *b, int len); void sub_descriptorDVB_Linkage0x0B (u_char *b, int len); void sub_descriptorDVB_Linkage0x0C (u_char *b, int len); void descriptorDVB_NVOD_Reference (u_char *b); void descriptorDVB_TimeShiftedService (u_char *b); void descriptorDVB_ShortEvent (u_char *b); void descriptorDVB_ExtendedEvent (u_char *b); void descriptorDVB_TimeShiftedEvent (u_char *b); void descriptorDVB_Component (u_char *b); void descriptorDVB_Mosaic (u_char *b); void descriptorDVB_StreamIdent (u_char *b); void descriptorDVB_CAIdentifier (u_char *b); void descriptorDVB_Content(u_char *b); void descriptorDVB_ParentalRating(u_char *b); void descriptorDVB_Teletext (u_char *b); void descriptorDVB_Telephone(u_char *b); void descriptorDVB_LocalTimeOffset (u_char *b); void descriptorDVB_Subtitling(u_char *b); void descriptorDVB_TerrestDelivSys (u_char *b); void descriptorDVB_MultilingNetworkName (u_char *b); void descriptorDVB_MultilingBouquetName (u_char *b); void descriptorDVB_MultilingServiceName (u_char *b); void descriptorDVB_MultilingComponent (u_char *b); void descriptorDVB_PrivateDataSpecifier (u_char *b); void descriptorDVB_ServiceMove (u_char *b); void descriptorDVB_FrequencyList (u_char *b); void descriptorDVB_ShortSmoothingBuffer(u_char *b); void descriptorDVB_PartialTransportStream(u_char *b); void descriptorDVB_DataBroadcast (u_char *b); void descriptorDVB_Scrambling(u_char *b); void descriptorDVB_DataBroadcastID(u_char *b); void descriptorDVB_TransportStream(u_char *b); void descriptorDVB_DSNG(u_char *b); void descriptorDVB_PDC(u_char *b); void descriptorDVB_AC3(u_char *b); void descriptorDVB_AncillaryData(u_char *b); void descriptorDVB_CellList(u_char *b); void descriptorDVB_CellFrequencyLink(u_char *b); void descriptorDVB_AnnouncementSupport(u_char *b); void descriptorDVB_ApplicationSignalling(u_char *b); void descriptorDVB_AdaptationFieldData(u_char *b); void descriptorDVB_ServiceIdentifier(u_char *b); void descriptorDVB_ServiceAvailability(u_char *b); // TV ANYTIME TS 102 323 void descriptorDVB_DefaultAuthority (u_char *b); void descriptorDVB_RelatedContent(u_char *b); void descriptorDVB_TVA_ID(u_char *b); void descriptorDVB_ContentIdentifier(u_char *b); // EN 301 192 v1.4.1 MPE_FEC void descriptorDVB_TimesliceFecIdentifier(u_char *b); void descriptorDVB_ECM_RepetitionRate(u_char *b); // EN 300 468 v1.7.1 void descriptorDVB_S2SatelliteDeliverySystem(u_char *b); void descriptorDVB_Enhanced_AC3(u_char *b); void descriptorDVB_DTS_Audio (u_char *b); void descriptorDVB_AAC (u_char *b); void descriptorDVB_Extension (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/mpeg_descriptor.h0000744000076400001440000000757210356276716015634 /* $Id: mpeg_descriptor.h,v 1.13 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- MPEG Descriptors ISO/IEC 13818-2 $Log: mpeg_descriptor.h,v $ Revision 1.13 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.12 2005/11/10 23:34:37 rasc Some H.222.1 AMD 4+5 update Revision 1.11 2004/08/12 22:57:18 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.10 2004/08/01 21:33:08 rasc minor TVA stuff (TS 102 323) Revision 1.9 2004/07/25 20:12:58 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.8 2004/01/15 21:27:22 rasc DSM-CC stream descriptors Revision 1.7 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.6 2004/01/01 20:09:20 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/11/26 19:55:32 rasc no message Revision 1.4 2003/11/26 16:27:45 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.3 2003/10/27 22:43:49 rasc carousel info descriptor and more Revision 1.2 2003/10/17 18:16:54 rasc - started more work on newer ISO 13818 descriptors - some reorg work started Revision 1.1 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #ifndef _MPEG_DESCRIPTOR_H #define _MPEG_DESCRIPTOR_H int descriptorMPEG (u_char *b); void descriptorMPEG_VideoStream (u_char *b); void descriptorMPEG_AudioStream (u_char *b); void descriptorMPEG_Hierarchy (u_char *b); void descriptorMPEG_Registration (u_char *b); void descriptorMPEG_DataStreamAlignment (u_char *b); void descriptorMPEG_TargetBackgroundGrid (u_char *b); void descriptorMPEG_VideoWindow (u_char *b); void descriptorMPEG_CA (u_char *b); void descriptorMPEG_ISO639_Lang (u_char *b); void descriptorMPEG_SystemClock (u_char *b); void descriptorMPEG_MultiplexBufUtil (u_char *b); void descriptorMPEG_Copyright (u_char *b); void descriptorMPEG_MaxBitrate (u_char *b); void descriptorMPEG_PrivateDataIndicator (u_char *b); void descriptorMPEG_SmoothingBuf (u_char *b); void descriptorMPEG_STD (u_char *b); void descriptorMPEG_IBP (u_char *b); /* 13818-6 , TR 102 006 */ void descriptorMPEG_Carousel_Identifier (u_char *b); void descriptorMPEG_Association_tag (u_char *b); void descriptorMPEG_Deferred_Association_tags (u_char *b); /* 13818-6 Stream descriptors */ void descriptorMPEG_NPT_reference (u_char *b); void descriptorMPEG_NPT_endpoint (u_char *b); void descriptorMPEG_stream_mode (u_char *b); void descriptorMPEG_stream_event (u_char *b); /* MPEG4 */ void descriptorMPEG_MPEG4_video (u_char *b); void descriptorMPEG_MPEG4_audio (u_char *b); void descriptorMPEG_IOD (u_char *b); void descriptorMPEG_SL (u_char *b); void descriptorMPEG_FMC (u_char *b); void descriptorMPEG_External_ES_ID (u_char *b); void descriptorMPEG_MuxCode (u_char *b); void descriptorMPEG_FMXBufferSize (u_char *b); void descriptorMPEG_MultiplexBuffer (u_char *b); void descriptorMPEG_ContentLabeling (u_char *b); /* TV ANYTIME, TS 102 323 */ void descriptorMPEG_TVA_metadata_pointer (u_char *b); void descriptorMPEG_TVA_metadata (u_char *b); void descriptorMPEG_TVA_metadata_STD (u_char *b); /* H.222.0 AMD3 */ void descriptorMPEG_AVC_video (u_char *b); void descriptorMPEG_IPMP (u_char *b); void descriptorMPEG_AVC_timing_and_HRD (u_char *b); /* H.222.0 AMD4 */ void descriptorMPEG_MPEG2_AAC_audio (u_char *b); void descriptorMPEG_FlexMuxTiming (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/dsmcc_carousel_descriptor.h0000744000076400001440000000555310402705264017652 /* $Id: dsmcc_carousel_descriptor.h,v 1.16 2006/03/06 00:04:52 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space DSM-CC -- DSM-CC Carousel Descriptors $Log: dsmcc_carousel_descriptor.h,v $ Revision 1.16 2006/03/06 00:04:52 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.15 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.14 2004/02/17 23:54:13 rasc Bug (not fixed yet): DSM-CC DII Carousel Descriptor Loop is strange Revision 1.13 2004/02/15 01:01:03 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.12 2004/02/07 01:28:01 rasc MHP Application Information Table some AIT descriptors Revision 1.11 2004/01/22 22:58:29 rasc deleting modul (again?) somehow obsolete module re-appeared??? (or I forgot something) Revision 1.10 2004/01/11 21:01:31 rasc PES stream directory, PES restructured Revision 1.9 2004/01/03 00:30:06 rasc DSM-CC STREAM descriptors module (started) Revision 1.8 2004/01/02 22:25:35 rasc DSM-CC MODULEs descriptors complete Revision 1.7 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.6 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/12/27 18:17:17 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.4 2003/11/26 19:55:32 rasc no message Revision 1.3 2003/10/26 23:00:39 rasc fix Revision 1.2 2003/10/26 21:36:19 rasc private DSM-CC descriptor Tags started, INT-Section completed.. Revision 1.1 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #ifndef __DSMCC_CAROUSEL_DESCRIPTOR_H #define __DSMCC_CAROUSEL_DESCRIPTOR_H int descriptorDSMCC_CAROUSEL (u_char *b); void descriptorDSMCC_type (u_char *b); void descriptorDSMCC_name (u_char *b); void descriptorDSMCC_info (u_char *b); void descriptorDSMCC_module_link (u_char *b); void descriptorDSMCC_crc32 (u_char *b); void descriptorDSMCC_location (u_char *b); void descriptorDSMCC_est_download_time (u_char *b); void descriptorDSMCC_group_link (u_char *b); void descriptorDSMCC_compressed_module (u_char *b); void descriptorDSMCC_subgroup_association (u_char *b); void descriptorDSMCC_MHP_label (u_char *b); void descriptorDSMCC_MHP_caching_priority (u_char *b); void descriptorDSMCC_MHP_content_type (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/dsmcc_int_unt_descriptor.h0000744000076400001440000000564010402705264017512 /* $Id: dsmcc_int_unt_descriptor.h,v 1.14 2006/03/06 00:04:52 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space DSM-CC INT, UNT, ... -- DSM-CC INT/UNT Descriptors $Log: dsmcc_int_unt_descriptor.h,v $ Revision 1.14 2006/03/06 00:04:52 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.13 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.12 2005/01/17 19:41:22 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.11 2004/01/03 00:30:06 rasc DSM-CC STREAM descriptors module (started) Revision 1.10 2004/01/02 22:25:35 rasc DSM-CC MODULEs descriptors complete Revision 1.9 2004/01/02 02:18:34 rasc more DSM-CC INT/UNT descriptors Revision 1.8 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.7 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.6 2003/12/29 22:14:53 rasc more dsm-cc INT UNT descriptors Revision 1.5 2003/12/28 00:01:14 rasc some minor changes/adds... Revision 1.4 2003/12/27 22:02:43 rasc dsmcc INT UNT descriptors started Revision 1.3 2003/12/27 18:17:17 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.2 2003/11/26 19:55:32 rasc no message Revision 1.1 2003/10/29 20:56:18 rasc more PES stuff, DSM descriptors, testdata */ #ifndef __DSM_INT_UNT_DESCRIPTOR_H #define __DSM_INT_UNT_DESCRIPTOR_H int descriptorDSMCC_INT_UNT (u_char *b); void descriptorDSMCC_scheduling (u_char *b); void descriptorDSMCC_update (u_char *b); void descriptorDSMCC_ssu_location (u_char *b); void descriptorDSMCC_message(u_char *b); void descriptorDSMCC_ssu_event_name (u_char *b); void descriptorDSMCC_target_smartcard (u_char *b); void descriptorDSMCC_target_MAC_address (u_char *b); void descriptorDSMCC_target_serial_number (u_char *b); void descriptorDSMCC_target_IP_address (u_char *b); void descriptorDSMCC_target_IPv6_address (u_char *b); void descriptorDSMCC_ssu_subgroup_association (u_char *b); void descriptorDSMCC_IP_MAC_platform_name (u_char *b); void descriptorDSMCC_IP_MAC_platform_provider_name (u_char *b); void descriptorDSMCC_target_MAC_address_range (u_char *b); void descriptorDSMCC_target_IP_slash (u_char *b); void descriptorDSMCC_target_IP_source_slash (u_char *b); void descriptorDSMCC_target_IPv6_slash (u_char *b); void descriptorDSMCC_target_IPv6_source_slash (u_char *b); void descriptorDSMCC_IP_MAC_StreamLocation (u_char *b); void descriptorDSMCC_ISP_access_mode (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/mhp_ait_descriptor.h0000744000076400001440000000417710402705264016306 /* $Id: mhp_ait_descriptor.h,v 1.7 2006/03/06 00:04:52 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space MHP AIT -- MHP AIT Descriptors $Log: mhp_ait_descriptor.h,v $ Revision 1.7 2006/03/06 00:04:52 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.6 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.5 2004/02/12 21:21:20 rasc MHP AIT descriptors some smaller changes Revision 1.4 2004/02/11 20:27:32 rasc MHP AIT descriptors... Revision 1.3 2004/02/10 22:57:54 rasc MHP descriptor, missing DVB descriptor done Revision 1.2 2004/02/09 21:24:58 rasc AIT descriptors minor redesign on output routines Revision 1.1 2004/02/07 01:28:01 rasc MHP Application Information Table some AIT descriptors */ #ifndef __MHP_AIT_DESCRIPTOR_H #define __MHP_AIT_DESCRIPTOR_H int descriptorMHP_AIT (u_char *b); void descriptorMHP_AIT_application (u_char *b); void descriptorMHP_AIT_application_name (u_char *b); void descriptorMHP_AIT_transport_protocol (u_char *b); void descriptorMHP_AIT_dvb_j_application (u_char *b); void descriptorMHP_AIT_dvb_j_application_location (u_char *b); void descriptorMHP_AIT_external_application_authorisation (u_char *b); void descriptorMHP_AIT_dvb_html_application (u_char *b); void descriptorMHP_AIT_dvb_html_application_location (u_char *b); void descriptorMHP_AIT_dvb_html_application_boundary (u_char *b); void descriptorMHP_AIT_application_icons (u_char *b); void descriptorMHP_AIT_pre_fetch (u_char *b); void descriptorMHP_AIT_DII_location (u_char *b); void descriptorMHP_AIT_delegated_application (u_char *b); void descriptorMHP_AIT_plug_in (u_char *b); void descriptorMHP_AIT_application_storage (u_char *b); void descriptorMHP_AIT_ip_signalling (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/tva_rnt_descriptor.h0000744000076400001440000000140110356276716016342 /* $Id: tva_rnt_descriptor.h,v 1.2 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space TS 102 323 TV-Anytime -- RNT Descriptors $Log: tva_rnt_descriptor.h,v $ Revision 1.2 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 */ #ifndef __TVA_RNT_DESCRIPTOR_H #define __TVA_RNT_DESCRIPTOR_H int descriptorTVA (u_char *b); void descriptorTVA_RAR_over_DVB_stream (u_char *b); void descriptorTVA_RAR_over_IP_stream (u_char *b); void descriptorTVA_RNT_scan (u_char *b); #endif dvbsnoop-1.4.50/src/descriptors/descriptor_misc.h0000744000076400001440000000161610402705264015613 /* $Id: descriptor_misc.h,v 1.3 2006/03/06 00:04:52 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Descriptors misc. routines, helpers, etc. $Log: descriptor_misc.h,v $ Revision 1.3 2006/03/06 00:04:52 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.2 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/01/18 00:30:48 rasc no message */ #ifndef _DESCRIPTOR_MISC_H #define _DESCRIPTOR_MISC_H void out_nl_calc_NPT (int v, unsigned long long npt); #endif dvbsnoop-1.4.50/src/descriptors/Makefile.am0000744000076400001440000000075610104775660014317 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libdescriptors.a noinst_HEADERS = \ descriptor.h \ dvb_descriptor.h \ mpeg_descriptor.h \ dsmcc_carousel_descriptor.h \ dsmcc_int_unt_descriptor.h \ mhp_ait_descriptor.h \ tva_rnt_descriptor.h \ descriptor_misc.h libdescriptors_a_SOURCES = \ descriptor.c \ dvb_descriptor.c \ mpeg_descriptor.c \ dsmcc_carousel_descriptor.c \ dsmcc_int_unt_descriptor.c \ mhp_ait_descriptor.c \ tva_rnt_descriptor.c \ descriptor_misc.c dvbsnoop-1.4.50/src/descriptors/Makefile.in0000644000076400001440000003150510630302137014310 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libdescriptors_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/descriptors DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libdescriptors_a_AR = $(AR) $(ARFLAGS) libdescriptors_a_LIBADD = am_libdescriptors_a_OBJECTS = descriptor.$(OBJEXT) \ dvb_descriptor.$(OBJEXT) mpeg_descriptor.$(OBJEXT) \ dsmcc_carousel_descriptor.$(OBJEXT) \ dsmcc_int_unt_descriptor.$(OBJEXT) \ mhp_ait_descriptor.$(OBJEXT) tva_rnt_descriptor.$(OBJEXT) \ descriptor_misc.$(OBJEXT) libdescriptors_a_OBJECTS = $(am_libdescriptors_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/descriptor.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/descriptor_misc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_carousel_descriptor.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dsmcc_int_unt_descriptor.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dvb_descriptor.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mhp_ait_descriptor.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/mpeg_descriptor.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/tva_rnt_descriptor.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libdescriptors_a_SOURCES) DIST_SOURCES = $(libdescriptors_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libdescriptors.a noinst_HEADERS = \ descriptor.h \ dvb_descriptor.h \ mpeg_descriptor.h \ dsmcc_carousel_descriptor.h \ dsmcc_int_unt_descriptor.h \ mhp_ait_descriptor.h \ tva_rnt_descriptor.h \ descriptor_misc.h libdescriptors_a_SOURCES = \ descriptor.c \ dvb_descriptor.c \ mpeg_descriptor.c \ dsmcc_carousel_descriptor.c \ dsmcc_int_unt_descriptor.c \ mhp_ait_descriptor.c \ tva_rnt_descriptor.c \ descriptor_misc.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/descriptors/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/descriptors/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libdescriptors.a: $(libdescriptors_a_OBJECTS) $(libdescriptors_a_DEPENDENCIES) -rm -f libdescriptors.a $(libdescriptors_a_AR) libdescriptors.a $(libdescriptors_a_OBJECTS) $(libdescriptors_a_LIBADD) $(RANLIB) libdescriptors.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/descriptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/descriptor_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_carousel_descriptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_int_unt_descriptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dvb_descriptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mhp_ait_descriptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg_descriptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tva_rnt_descriptor.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/descriptors/descriptor.c0000744000076400001440000001113610373750007014573 /* $Id: descriptor.c,v 1.31 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Descriptors $Log: descriptor.c,v $ Revision 1.31 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.30 2006/01/02 18:23:57 rasc just update copyright and prepare for a new public tar ball Revision 1.29 2004/11/03 21:00:50 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.28 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.27 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.26 2004/07/26 20:58:03 rasc RNT completed.. (TS 102 323) Revision 1.25 2004/07/25 20:12:58 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.24 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.23 2004/02/07 01:28:01 rasc MHP Application Information Table some AIT descriptors Revision 1.22 2004/01/25 21:37:27 rasc bugfixes, minor changes & enhancments Revision 1.21 2004/01/12 23:05:24 rasc no message Revision 1.20 2004/01/11 21:01:31 rasc PES stream directory, PES restructured Revision 1.19 2004/01/03 00:30:06 rasc DSM-CC STREAM descriptors module (started) Revision 1.18 2004/01/02 22:59:58 rasc DSM-CC modules renaming... Revision 1.17 2004/01/02 22:25:35 rasc DSM-CC MODULEs descriptors complete Revision 1.16 2004/01/02 16:40:34 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.15 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.14 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.13 2003/12/29 22:14:53 rasc more dsm-cc INT UNT descriptors Revision 1.12 2003/10/24 22:45:04 rasc code reorg... Revision 1.11 2003/10/24 22:17:14 rasc code reorg... Revision 1.10 2003/10/13 23:27:35 rasc Bugfix, verbose < 4 segfaulted, tnx to 'mws' for reporting. Revision 1.9 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? Revision 1.8 2003/06/24 23:51:03 rasc bugfixes and enhancements Revision 1.7 2003/05/03 02:51:08 obi skip descriptors with length == 0 Revision 1.6 2003/03/17 16:15:11 obi fixed infinite loop thanks to Johannes Stezenbach Revision 1.5 2002/09/29 13:01:35 wjoost kleiner Fehler */ #include "dvbsnoop.h" #include "descriptor.h" #include "mpeg_descriptor.h" #include "dvb_descriptor.h" #include "dsmcc_carousel_descriptor.h" #include "dsmcc_int_unt_descriptor.h" #include "mhp_ait_descriptor.h" #include "tva_rnt_descriptor.h" #include "misc/hexprint.h" #include "misc/output.h" /* determine descriptor type and print it... return byte length */ int descriptor (u_char *b, DTAG_SCOPE scope) { int len; int id; id = (int)b[0]; len = ((int)b[1]) + 2; // total length // nothing to print here? // well, I guess all descriptors need a verbosity >=4... if (getVerboseLevel() < 4) return len; indent (+1); switch (scope) { case DSMCC_STREAM: descriptorMPEG (b); break; case DSMCC_CAROUSEL: descriptorDSMCC_CAROUSEL (b); break; case DSMCC_INT_UNT: // EN 301 192, TS 102 006 if (id < 0x40) descriptorDSMCC_INT_UNT (b); else descriptorDVB (b); break; case MHP_AIT: descriptorMHP_AIT (b); break; case TVA_RNT: // TS 102 323 if (id < 0x40) descriptorMPEG (b); else descriptorTVA (b); break; case MPEG: case DVB_SI: default: if (id < 0x40) descriptorMPEG (b); else descriptorDVB (b); break; } indent (-1); return len; // (descriptor total length) } /* Any descriptor (Basic Descriptor output) ETSI 300 468 // ISO 13818-1 */ void descriptor_any (u_char *b) { int len; // tag = b[0]; len = b[1]; print_databytes (4,"Descriptor-data:", b+2, len); } dvbsnoop-1.4.50/src/descriptors/dvb_descriptor.c0000744000076400001440000024165110373750007015435 /* $Id: dvb_descriptor.c,v 1.50 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- DVB Descriptors ETSI 300 468 -- EN/ISO/TR document references in comments may habe been changed -- during updates of documents by ETSI. $Log: dvb_descriptor.c,v $ Revision 1.50 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.49 2005/12/29 02:43:38 rasc gcc fixes, man page update Revision 1.48 2005/12/22 16:21:50 rasc Update and new descriptors EN 300 468 v1.7.1 Revision 1.47 2005/11/23 23:06:08 rasc ISO13818-2 MPEG2 sequence header Revision 1.46 2005/11/16 20:12:18 rasc bugfix Revision 1.45 2005/11/10 00:05:44 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.44 2005/11/08 23:15:24 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.43 2005/10/25 18:41:40 rasc minor code rewrite Revision 1.42 2005/10/20 22:25:05 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.41 2005/01/17 19:41:22 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.40 2004/11/03 21:00:50 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.39 2004/08/27 23:25:52 rasc - Update: changes due to EN 300 468 v1.6.1 - Bugfix: Multilingual component descriptor (tnx to Karsten Siebert) Revision 1.38 2004/08/25 19:51:09 rasc - Update: EN 300 468 v1.6.1 Terrestrial delivery system descriptor Revision 1.37 2004/08/24 21:30:22 rasc more Metadata Revision 1.36 2004/08/22 18:36:45 rasc - Bugfix: multilang service descriptor fix (tnx to Karsten Siebert) - New: MetaData Section (Basic) (H.222.0 AMD1) Revision 1.35 2004/08/07 22:10:00 rasc Bugfix: NIT cable frequency display (reported by Karsten Siebert ) Revision 1.34 2004/08/01 21:33:08 rasc minor TVA stuff (TS 102 323) Revision 1.33 2004/07/25 20:12:58 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.32 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.31 2004/04/15 03:38:50 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.30 2004/04/05 17:32:13 rasc mass typo fix adaption --> adaptation Revision 1.29 2004/02/10 22:57:54 rasc MHP descriptor, missing DVB descriptor done Revision 1.28 2004/02/09 22:56:59 rasc Bugfix VBI Data descriptor Revision 1.27 2004/02/09 21:24:57 rasc AIT descriptors minor redesign on output routines Revision 1.26 2004/01/02 16:40:34 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.25 2004/01/01 20:35:26 rasc PES program stream map, minor descriptor cleanup Revision 1.24 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.23 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.22 2003/12/27 22:02:43 rasc dsmcc INT UNT descriptors started Revision 1.21 2003/12/27 14:35:00 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.20 2003/12/26 23:27:39 rasc DSM-CC UNT section Revision 1.19 2003/11/26 23:54:47 rasc -- bugfixes on Linkage descriptor Revision 1.18 2003/11/26 16:27:45 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.17 2003/11/24 23:52:16 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.16 2003/11/09 20:48:34 rasc pes data packet (DSM-CC) Revision 1.15 2003/11/07 16:33:32 rasc no message Revision 1.14 2003/11/01 21:40:27 rasc some broadcast/linkage descriptor stuff Revision 1.13 2003/10/29 20:54:56 rasc more PES stuff, DSM descriptors, testdata Revision 1.12 2003/10/26 21:36:19 rasc private DSM-CC descriptor Tags started, INT-Section completed.. Revision 1.11 2003/10/26 19:06:27 rasc no message Revision 1.10 2003/10/25 19:11:49 rasc no message Revision 1.9 2003/10/24 22:45:04 rasc code reorg... Revision 1.8 2003/10/24 22:17:17 rasc code reorg... Revision 1.7 2003/10/21 21:31:29 rasc no message Revision 1.6 2003/10/21 19:54:43 rasc no message Revision 1.5 2003/10/19 22:31:38 rasc - some datacarousell stuff started Revision 1.4 2003/10/19 22:22:57 rasc - some datacarousell stuff started Revision 1.3 2003/10/19 21:05:53 rasc - some datacarousell stuff started Revision 1.2 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.1 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #include "dvbsnoop.h" #include "descriptor.h" #include "dvb_descriptor.h" #include "private/userdefs.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" /* determine descriptor type and print it... EN 300 468: descriptor_tag: The descriptor tag is an 8-bit field which identifies each descriptor. Those values with MPEG-2 normative meaning are described in ISO/IEC 13818-1 [1]. return byte length */ int descriptorDVB (u_char *b) { int len; int tag; out_NL (4); tag = outBit_S2x_NL (4,"DVB-DescriptorTag: ", b, 0, 8, (char *(*)(u_long))dvbstrDVBDescriptorTAG); len = outBit_Sx_NL (4,"descriptor_length: ", b, 8, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor printhex_buf (9, b,len+2); switch (tag) { case 0x40: descriptorDVB_NetName (b); break; case 0x41: descriptorDVB_ServList (b); break; case 0x42: descriptorDVB_Stuffing (b); break; case 0x43: descriptorDVB_SatDelivSys (b); break; case 0x44: descriptorDVB_CableDelivSys (b); break; case 0x45: descriptorDVB_VBI_Data (b); break; case 0x46: descriptorDVB_VBI_Teletext (b); break; case 0x47: descriptorDVB_BouquetName (b); break; case 0x48: descriptorDVB_Service (b); break; case 0x49: descriptorDVB_CountryAvail (b); break; case 0x4A: descriptorDVB_Linkage (b); break; case 0x4B: descriptorDVB_NVOD_Reference (b); break; case 0x4C: descriptorDVB_TimeShiftedService (b); break; case 0x4D: descriptorDVB_ShortEvent (b); break; case 0x4E: descriptorDVB_ExtendedEvent (b); break; case 0x4F: descriptorDVB_TimeShiftedEvent(b); break; case 0x50: descriptorDVB_Component(b); break; case 0x51: descriptorDVB_Mosaic(b); break; case 0x52: descriptorDVB_StreamIdent (b); break; case 0x53: descriptorDVB_CAIdentifier (b); break; case 0x54: descriptorDVB_Content (b); break; case 0x55: descriptorDVB_ParentalRating(b); break; case 0x56: descriptorDVB_Teletext (b); break; case 0x57: descriptorDVB_Telephone (b); break; case 0x58: descriptorDVB_LocalTimeOffset (b); break; case 0x59: descriptorDVB_Subtitling (b); break; case 0x5A: descriptorDVB_TerrestDelivSys (b); break; case 0x5B: descriptorDVB_MultilingNetworkName (b); break; case 0x5C: descriptorDVB_MultilingBouquetName (b); break; case 0x5D: descriptorDVB_MultilingServiceName (b); break; case 0x5E: descriptorDVB_MultilingComponent (b); break; case 0x5F: descriptorDVB_PrivateDataSpecifier (b); break; case 0x60: descriptorDVB_ServiceMove (b); break; case 0x61: descriptorDVB_ShortSmoothingBuffer (b); break; case 0x62: descriptorDVB_FrequencyList (b); break; case 0x63: descriptorDVB_PartialTransportStream(b); break; case 0x64: descriptorDVB_DataBroadcast(b); break; case 0x65: descriptorDVB_Scrambling(b); break; case 0x66: descriptorDVB_DataBroadcastID(b); break; case 0x67: descriptorDVB_TransportStream(b); break; case 0x68: descriptorDVB_DSNG(b); break; case 0x69: descriptorDVB_PDC(b); break; case 0x6A: descriptorDVB_AC3(b); break; case 0x6B: descriptorDVB_AncillaryData(b); break; case 0x6C: descriptorDVB_CellList(b); break; case 0x6D: descriptorDVB_CellFrequencyLink(b); break; case 0x6E: descriptorDVB_AnnouncementSupport(b); break; case 0x6F: descriptorDVB_ApplicationSignalling(b); break; case 0x70: descriptorDVB_AdaptationFieldData(b); break; case 0x71: descriptorDVB_ServiceIdentifier(b); break; case 0x72: descriptorDVB_ServiceAvailability(b); break; // TV ANYTIME TS 102 323 case 0x73: descriptorDVB_DefaultAuthority(b); break; case 0x74: descriptorDVB_RelatedContent(b); break; case 0x75: descriptorDVB_TVA_ID(b); break; case 0x76: descriptorDVB_ContentIdentifier(b); break; // EN 301 192 v1.4.1 MPE_FEC case 0x77: descriptorDVB_TimesliceFecIdentifier(b); break; case 0x78: descriptorDVB_ECM_RepetitionRate(b); break; // EN 300 468 v1.7.1 case 0x79: descriptorDVB_S2SatelliteDeliverySystem(b); break; case 0x7A: descriptorDVB_Enhanced_AC3(b); break; case 0x7B: descriptorDVB_DTS_Audio(b); break; case 0x7C: descriptorDVB_AAC(b); break; case 0x7D: descriptor_any(b); break; // $$$ TODO: currently reserved case 0x7E: descriptor_any(b); break; // $$$ TODO: currently reserved case 0x7F: descriptorDVB_Extension(b); break; default: if (tag < 0x80) { out_nl (0," ----> ERROR: unimplemented descriptor (dvb context), Report!"); } descriptor_PRIVATE (b, DVB_SI); break; } return len+2; // (descriptor total length) } /* --------------------------------------------------------------- well known DVB descriptors --------------------------------------------------------------- */ /* 0x40 NetName descriptor (network name descriptor) EN 300 468 -- checked v1.6.1 */ void descriptorDVB_NetName (u_char *b) { int len; // tag = b[0]; len = b[1]; print_text_468A (4, "Network_name: ", b+2,len); } /* 0x41 Service List Descriptor EN 300 468 -- adapted v1.6.1 */ void descriptorDVB_ServList (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; indent (+1); while (len > 0) { int stype; stype = b[2]; // prefetch service_type == (b, 16,8) outBit_Sx (4,"service_ID: ", b, 0, 16); if (stype != 0x04) { // 0x04 = NVOD out (4, "[ --> refers to PMT program_number]"); } out_NL (4); outBit_S2x_NL (4,"service_type: ", b, 16, 8, (char *(*)(u_long)) dvbstrService_TYPE ); b += 3; len -= 3; out_NL (4); } indent (-1); } /* 0x42 Stuffing descriptor ETSI EN 300 468 */ void descriptorDVB_Stuffing (u_char *b) { descriptor_any (b); } /* 0x43 SatDelivSys descriptor (Satellite delivery system descriptor) EN 300 468 -- adapted v1.6.1 -- adapted v1.7.1 */ void descriptorDVB_SatDelivSys (u_char *b) { u_long frequency; u_int orbital_position; u_int west_east_flag; u_int polarisation; // u_int modulation; // v1.6.1 u_int roll_off; // v1.7.1 replaces mod. u_int modulation_system; // v1.7.1 replaces mod. u_int modulation_type; // v1.7.1 replaces mod. u_long symbol_rate; u_int FEC_inner; char *s; // tag = b[0]; // len = b[1]; frequency = getBits (b, 0, 16, 32); orbital_position = getBits (b, 0, 48, 16); west_east_flag = getBits (b, 0, 64, 1); polarisation = getBits (b, 0, 65, 2); roll_off = getBits (b, 0, 67, 2); modulation_system = getBits (b, 0, 69, 1); modulation_type = getBits (b, 0, 70, 2); symbol_rate = getBits (b, 0, 72, 28); FEC_inner = getBits (b, 0, 100, 4); out_nl (4,"Frequency: %lu (= %3lx.%05lx GHz)",frequency, frequency >> 20, frequency & 0x000FFFFF ); out_nl (4,"Orbital_position: %u (= %3x.%01x)",orbital_position, orbital_position >> 4, orbital_position & 0x000F); out_S2B_NL (4,"West_East_flag: ",west_east_flag, dvbstrWEST_EAST_FLAG(west_east_flag)); out_S2B_NL (4,"Polarisation: ",polarisation, dvbstrPolarisation_FLAG(polarisation)); s = (modulation_system == 0) ? "DVB-S" : "DVB-S2"; out_S2B_NL (4,"Kind: ", modulation_system, s); if (modulation_system) { out_S2B_NL (4,"Roll Off Faktor: ", roll_off, dvbstrRollOffSAT_FLAG(roll_off)); } else { out_SB_NL (4,"fixed ('00'): ",roll_off); } out_S2B_NL (4,"Modulation_type: ",modulation_type, dvbstrModulationSAT_FLAG(modulation_type)); out_nl (4,"Symbol_rate: %u (= %3x.%04x)",symbol_rate, symbol_rate >> 16, symbol_rate & 0x0000FFFF ); out_S2B_NL (4,"FEC_inner: ",FEC_inner, dvbstrFECinner_SCHEME (FEC_inner)); } /* 0x44 CableDelivSys descriptor (Cable delivery system descriptor) EN 300 468 -- adapted v1.6.1 */ void descriptorDVB_CableDelivSys (u_char *b) { /* ETSI 300 468 6.2.xx */ typedef struct _descCDS { u_int descriptor_tag; u_int descriptor_length; u_long frequency; u_int FEC_outer; u_int reserved_1; u_int modulation; u_long symbol_rate; u_int FEC_inner; } descCDS; descCDS d; //int i; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.frequency = getBits (b, 0, 16, 32); d.reserved_1 = getBits (b, 0, 48, 12); d.FEC_outer = getBits (b, 0, 60, 4); d.modulation = getBits (b, 0, 64, 8); d.symbol_rate = getBits (b, 0, 72, 28); d.FEC_inner = getBits (b, 0, 100, 4); out_nl (4,"Frequency: %lu (= %3lx.%04lx MHz)",d.frequency, d.frequency >> 16, d.frequency & 0x0000FFFF ); out_S2B_NL (4,"FEC_outer: ",d.FEC_outer, dvbstrFECouter_SCHEME (d.FEC_outer)); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_S2B_NL (4,"Modulation (Cable): ",d.modulation, dvbstrModulationCable_FLAG(d.modulation)); out_nl (4," Symbol_rate: %u (= %4x.%04x)",d.symbol_rate, d.symbol_rate >> 16, d.symbol_rate & 0x0000FFFF ); out_S2B_NL (4,"FEC_inner: ",d.FEC_inner, dvbstrFECinner_SCHEME (d.FEC_inner)); } /* 0x45 VBI Data descriptor ETSI EN 300 468 2.2.42 -- checked v1.6.1 */ void descriptorDVB_VBI_Data (u_char *b) { int len1; // dtag = b[0]; len1 = b[1]; b += 2; indent (+1); while (len1 > 0) { int ds_id; int len2; out_NL (4); ds_id = outBit_S2x_NL (4,"Data_service_id: ", b, 0, 8, (char *(*)(u_long)) dvbstrDataService_ID); len2 = outBit_Sx_NL (4,"Data_service_descriptor_length: ", b, 8, 8); b += 2; len1 -= 2; if ((ds_id >= 1 && ds_id <= 7) && (ds_id != 3) ) { indent (+1); while (len2 > 0) { out_NL (4); outBit_Sx_NL (6,"reserved_1: ", b, 0, 2); outBit_Sx_NL (4,"field_parity: ", b, 2, 1); outBit_Sx_NL (4,"line_offset: ", b, 3, 5); b++; len2--; len1--; } indent (-1); } else { print_databytes (6,"Reserved Data:", b,len2); b += len2; len1 -= len2; } } indent (-1); } /* 0x46 VBI teletext descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_VBI_Teletext (u_char *b) { descriptorDVB_Teletext (b); } /* 0x47 Bouquet Name descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_BouquetName (u_char *b) { int len; // tag = b[0]; len = b[1]; print_text_468A (4, "BouquetName: ", b+2,len); } /* 0x48 Service descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_Service (u_char *b) { int len2; // tag = b[0]; // len = = b[1]; outBit_S2x_NL(4,"service_type: ", b, 16, 8, (char *(*)(u_long)) dvbstrService_TYPE ); len2 = outBit_Sx_NL (4,"service_provider_name_length: ", b, 24, 8); b += 4; print_text_468A (4,"service_provider_name: ", b,len2); b += len2; len2 = outBit_Sx_NL (4,"service_name_length: ", b, 0, 8); b += 1; print_text_468A (4, "Service_name: ", b,len2); } /* 0x49 Country Availibility descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_CountryAvail (u_char *b) { int len; // tag = b[0]; len = b[1]; outBit_Sx_NL (4,"country_availability_flag: ", b, 16, 1); outBit_Sx_NL (6,"reserved: ", b, 17, 7); b += 3; len -= 1; indent (+1); while (len > 0) { u_char country_code[4]; strncpy ((char *)country_code, (char *)b, 3); // 24 bit *(country_code+3) = '\0'; b += 3; len -= 3; out_nl (4,"country_code: %3.3s",country_code); } indent (-1); } /* 0x4A Linkage descriptor */ void descriptorDVB_Linkage (u_char *b) { /* ETSI 300 468 6.2.xx */ typedef struct _descLinkage { u_int descriptor_tag; u_int descriptor_length; u_int transport_stream_id; u_int original_network_id; u_int service_id; u_int linkage_type; } descLinkage; descLinkage d; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.transport_stream_id = getBits (b, 0, 16, 16); d.original_network_id = getBits (b, 0, 32, 16); d.service_id = getBits (b, 0, 48, 16); d.linkage_type = getBits (b, 0, 64, 8); out_SW_NL (4,"transport_stream_ID: ",d.transport_stream_id); out_S2W_NL (4,"original_network_ID: ",d.original_network_id, dvbstrOriginalNetwork_ID(d.original_network_id)); out_S2W_NL (4,"service_ID: ",d.service_id, " --> refers to PMT program_number"); out_S2B_NL (4,"linkage_type: ",d.linkage_type, dvbstrLinkage_TYPE (d.linkage_type)); len = d.descriptor_length - 7; b += 7 + 2; indent (+1); if (d.linkage_type == 0x08) { /* EN 300 468 */ sub_descriptorDVB_Linkage0x08 (b, len); } else if (d.linkage_type == 0x09) { /* TR 102 006 DSM-CC */ sub_descriptorDVB_Linkage0x09 (b, len); } else if (d.linkage_type == 0x0A) { /* TR 102 006 DSM-CC */ /* SSU SCAN Linkage */ outBit_S2x_NL (4,"Table_type: ", b, 0, 8, (char *(*)(u_long))dsmccStrLinkage0CTable_TYPE ); } else if (d.linkage_type == 0x0B) { /* EN 301 192 DSM-CC */ sub_descriptorDVB_Linkage0x0B (b, len); } else if (d.linkage_type == 0x0C) { /* EN 301 192 DSM-CC */ sub_descriptorDVB_Linkage0x0C (b, len); } else { print_private_data (4, b,len); } indent (-1); } /* * DVB Linkage Subdescriptor 0x08 */ void sub_descriptorDVB_Linkage0x08 (u_char *b, int len) { /* ETSI 300 468 6.2.xx */ typedef struct _descLinkage0x08 { u_int handover_type; u_int reserved_1; u_int origin_type; u_int network_id; u_int initial_service_id; } descLinkage0x08; descLinkage0x08 d; d.handover_type = getBits (b, 0, 0, 4); d.reserved_1 = getBits (b, 0, 4, 3); d.origin_type = getBits (b, 0, 7, 1); b += 1; len -= 1; out_S2B_NL (4,"Handover_type: ",d.handover_type, dvbstrHandover_TYPE(d.handover_type)); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_S2B_NL (4,"Origin_type: ",d.origin_type, dvbstrOrigin_TYPE(d.origin_type)); if ( d.handover_type == 0x01 || d.handover_type == 0x02 || d.handover_type == 0x03) { d.network_id = getBits (b, 0, 0, 16); out_S2W_NL (4,"Network_ID: ",d.network_id, dvbstrNetworkIdent_ID(d.network_id)); b += 1; len -= 1; } if (d.origin_type == 0x00) { d.initial_service_id = getBits (b, 0, 0, 16); out_SW_NL (4,"Initial_service_ID: ",d.initial_service_id); b += 1; len -= 1; } if (len > 0) { print_private_data (4, b,len); } } /* * DVB Linkage Subdescriptor 0x09 */ void sub_descriptorDVB_Linkage0x09 (u_char *b, int len) { /* ETSI TR 102 006 6.1 */ int OUI_data_length; u_long OUI; int selector_length; OUI_data_length = outBit_Sx_NL (4,"OUI_data_length: ", b,0,8); b++; len --; while (OUI_data_length > 0) { OUI = outBit_S2x_NL (4,"OUI: ", b, 0,24, (char *(*)(u_long))dsmccStrOUI ); b += 3; OUI_data_length -= 3; len -= 3; // the following is special to Premiere DSM-CC to prevent segfaults // Premiere seems to set short OUI_data_length if (OUI_data_length <= 0) continue; selector_length = outBit_Sx_NL (4,"selector_length: ", b, 0, 8); print_databytes (4,"Selector Bytes:", b+1,selector_length); b += (selector_length +1); // +1 = length byte OUI_data_length -= (selector_length +1); len -= (selector_length +1); } if (len > 0) { print_private_data (4, b,len); } } /* * -- as defined as private data for DSM-CC * -- in EN 301 192 */ void sub_descriptorDVB_Linkage0x0B (u_char *b, int len) /* $$$ TODO */ { typedef struct _descLinkage0x0B { u_int platform_id_data_length; // inner Loop 1 u_long platform_id; u_int platform_name_loop_length; // inner Loop 2 u_char ISO639_2_language_code[4]; u_int platform_name_length; } descLinkage0x0B; descLinkage0x0B d; int len_loop1; d.platform_id_data_length = b[0]; out_SB_NL (4,"Platform_ID_data_length: ",d.platform_id_data_length); len_loop1 = d.platform_id_data_length; b++; len--; indent (+1); while (len_loop1 > 0) { int len_loop2; d.platform_id = getBits (b, 0, 0, 24); d.platform_name_loop_length = getBits (b, 0, 24, 8); b += 4; len -= 4; out_S2T_NL (4,"Platform_id: ",d.platform_id, dsmccStrPlatform_ID (d.platform_id)); out_SB_NL (4,"Platform_name_loop_length: ",d.platform_name_loop_length); len_loop1 -= 4; len_loop2 = d.platform_name_loop_length; indent (+1); while (len_loop2 > 0) { getISO639_3 (d.ISO639_2_language_code, b); out_nl (4," ISO639_language_code: %3.3s", d.ISO639_2_language_code); d.platform_name_length = getBits (b, 0, 24, 8); print_text_468A (4, "Platform_name: ", b+4,d.platform_name_length); b += d.platform_name_length + 4; len -= d.platform_name_length + 4; len_loop2 -= d.platform_name_length + 4; out_NL (4); } indent (-1); len_loop1 -= d.platform_name_loop_length; } indent (-1); print_private_data (4, b,len); } void sub_descriptorDVB_Linkage0x0C (u_char *b, int len) { u_int table_id; u_int bouquet_id; table_id = getBits (b, 0, 0, 8); out_S2W_NL (4,"Table_id: ",table_id, dsmccStrLinkage0CTable_TYPE(table_id)); if (table_id == 2) { bouquet_id = getBits (b, 0, 8, 16); out_S2W_NL (4,"Bouquet_id: ",bouquet_id, dvbstrBouquetTable_ID (bouquet_id)); } } /* 0x4B NVOD Reference descriptor ETSI EN 300 468 6.2.xx --- checked v1.6.1 */ void descriptorDVB_NVOD_Reference (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; indent (+1); while (len > 0) { // $$$ TODO this part is re-usable outBit_Sx_NL (4,"transport_stream_ID: ", b, 0, 16); outBit_S2x_NL (4,"original_network_id: ", b, 16, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_S2Tx_NL(4,"service_ID: ", b, 32, 16, " --> refers to PMT program_number"); len -= 6; b += 6; out_NL (4); } indent (-1); } /* 0x4C Time Shifted Service descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_TimeShiftedService (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (4,"reference_service_ID: ", b, 16, 16); } /* 0x4D Short Event descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_ShortEvent (u_char *b) { int len2; u_char ISO639_2_language_code[4]; // tag = b[0]; // len = b[1]; getISO639_3 (ISO639_2_language_code, b+2); out_nl (4," ISO639_2_language_code: %3.3s", ISO639_2_language_code); b+= 5; len2 = outBit_Sx_NL (4,"event_name_length: ", b, 0, 8); b += 1; print_text_468A (4, "event_name: ", b,len2); b += len2; len2 = outBit_Sx_NL (4,"text_length: ", b, 0, 8); b += 1; print_text_468A (4, "text_char: ", b,len2); } /* 0x4E Extended Event descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_ExtendedEvent (u_char *b) { typedef struct _descExtendedEvent { u_int descriptor_tag; u_int descriptor_length; u_int descriptor_number; u_int last_descriptor_number; u_char ISO639_2_language_code[4]; u_int length_of_items; // N Ext. Events List u_int text_length; // N4 char text char } descExtendedEvent; typedef struct _descExtendedEvent2 { u_int item_description_length; // N2 descriptors u_int item_length; // N3 chars } descExtendedEvent2; descExtendedEvent d; descExtendedEvent2 d2; int len1, lenB; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.descriptor_number = getBits (b, 0, 16, 4); d.last_descriptor_number = getBits (b, 0, 20, 4); getISO639_3 (d.ISO639_2_language_code, b+3); d.length_of_items = getBits (b, 0, 48, 8); out_SB_NL (4,"descriptor_number: ",d.descriptor_number); out_SB_NL (4,"last_descriptor_number: ",d.last_descriptor_number); out_nl (4,"ISO639_2_language_code: %3.3s", d.ISO639_2_language_code); out_SB_NL (5,"length_of_items: ",d.length_of_items); b += 7; lenB = d.descriptor_length - 5; len1 = d.length_of_items; indent (+1); while (len1 > 0) { d2.item_description_length = getBits (b, 0, 0, 8); out_NL (4); out_SB_NL (5,"item_description_length: ",d2.item_description_length); print_text_468A (4, "item_description: ", b+1, d2.item_description_length); b += 1 + d2.item_description_length; d2.item_length = getBits (b, 0, 0, 8); out_SB_NL (5,"item_length: ",d2.item_length); print_text_468A (4, "item: ", b+1, d2.item_length); b += 1 + d2.item_length; len1 -= (2 + d2.item_description_length + d2.item_length); lenB -= (2 + d2.item_description_length + d2.item_length); } out_NL (4); indent (-1); d.text_length = getBits (b, 0, 0, 8); b += 1; lenB -= 1; out_SB_NL (5,"text_length: ",d.text_length); print_text_468A (4, "text: ", b,d.text_length); } /* 0x4F Time Shifted Event descriptor ETSI EN 300 468 6.2.xx --- checked v1.6.1 */ void descriptorDVB_TimeShiftedEvent (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (4,"reference_service_id: ", b, 16, 16); outBit_Sx_NL (4,"reference_event_id: ", b, 32, 16); } /* 0x50 Component descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_Component (u_char *b) { typedef struct _descComponent { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_int stream_content; u_int component_type; u_int component_tag; u_char ISO639_2_language_code[4]; // N2 char Text } descComponent; descComponent d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 4); d.stream_content = getBits (b, 0, 20, 4); d.component_type = getBits (b, 0, 24, 8); d.component_tag = getBits (b, 0, 32, 8); getISO639_3 (d.ISO639_2_language_code, b+5); out_SB_NL (6,"reserved: ",d.reserved_1); out_SB_NL (4,"stream_content: ",d.stream_content); out_SB_NL (4,"component_type: ",d.component_type); out_nl (4," == Content&Component: (= %s)", dvbstrStreamContent_Component_TYPE( (d.stream_content << 8) | d.component_type ) ); out_SB_NL (4,"component_tag: ",d.component_tag); out_nl (4,"ISO639_language_code: %3.3s", d.ISO639_2_language_code); print_text_468A (4, "component-description: ", b+8,d.descriptor_length - 6); } /* 0x51 Mosaic descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_Mosaic (u_char *b) { typedef struct _descMosaic { u_int descriptor_tag; u_int descriptor_length; u_int mosaic_entry_point; u_int number_of_horizontal_elementary_cells; u_int reserved_1; u_int number_of_vertical_elementary_cells; // N desc Mosaic2 } descMosaic; typedef struct _descMosaic2 { u_int logical_cell_id; u_int reserved_1; u_int logical_cell_presentation_info; u_int elementary_cell_field_length; // N2 desc Mosaic3 u_int cell_linkage_info; // conditional data !! (cell_linkage_info) u_int bouquet_id; u_int original_network_id; u_int transport_stream_id; u_int service_id; u_int event_id; } descMosaic2; typedef struct _descMosaic3 { u_int reserved_1; u_int elementary_cell_id; } descMosaic3; descMosaic d; descMosaic2 d2; descMosaic3 d3; int len1,len2; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.mosaic_entry_point = getBits (b, 0, 16, 1); d.number_of_horizontal_elementary_cells = getBits (b, 0, 17, 3); d.reserved_1 = getBits (b, 0, 20, 1); d.number_of_vertical_elementary_cells = getBits (b, 0, 21, 3); out_SB_NL (4,"Mosaic_entry_point: ",d.mosaic_entry_point); out_nl (4,"Number_of_horizontal_elementary_cells: %u (= %d cells)", d.number_of_horizontal_elementary_cells, d.number_of_horizontal_elementary_cells + 1); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_nl (4," Number_of_vertical_elementary_cells: %u (= %d cells)", d.number_of_vertical_elementary_cells, d.number_of_vertical_elementary_cells + 1); len1 = d.descriptor_length - 1; b += 3; indent(+1); while (len1 > 0) { d2.logical_cell_id = getBits (b, 0, 0, 6); d2.reserved_1 = getBits (b, 0, 6, 7); d2.logical_cell_presentation_info = getBits (b, 0, 13, 3); d2.elementary_cell_field_length = getBits (b, 0, 16, 8); out_NL (4); out_SB_NL (4,"Logical_cell_ID: ",d2.logical_cell_id); out_SB_NL (6,"reserved_1: ",d2.reserved_1); out_S2B_NL (4,"Logical_cell_presentation_info: ", d2.logical_cell_presentation_info, dvbstrLogCellPresInfo_TYPE(d2.logical_cell_presentation_info) ); out_SB_NL (5,"Elementary_cell_field_length: ", d2.elementary_cell_field_length); b += 3; len2 = d2.elementary_cell_field_length; len1 -= (len2 + 3); indent (+1); while (len2 > 0) { d3.reserved_1 = getBits (b, 0, 0, 2); d3.elementary_cell_id = getBits (b, 0, 2, 6); len2 -= 1; b += 1; out_NL (4); out_SB_NL (6,"reserved_1: ",d3.reserved_1); out_SB_NL (4,"Elementary_cell_ID: ",d3.elementary_cell_id); } //len2 indent (-1); d2.cell_linkage_info = getBits (b, 0, 0, 8); b += 1; len1 -= 1; out_S2B_NL (4,"Cell_linkage_info: ", d2.cell_linkage_info, dvbstrCellLinkageInfo_TYPE (d2.cell_linkage_info)); /* conditional fields!! */ switch (d2.cell_linkage_info) { case 0x01: d2.bouquet_id = getBits (b, 0, 0, 16); b += 2; len1 -= 2; out_S2W_NL (4,"bouquet_ID: ",d2.bouquet_id,dvbstrBouquetTable_ID(d2.bouquet_id)); break; case 0x02: case 0x03: case 0x04: d2.transport_stream_id = getBits (b, 0, 0, 16); d2.original_network_id = getBits (b, 0, 16, 16); d2.service_id = getBits (b, 0, 32, 16); b += 6; len1 -= 6; out_SW_NL (4,"transport_stream_ID: ",d2.transport_stream_id); out_S2W_NL (4,"original_network_ID: ",d2.original_network_id, dvbstrOriginalNetwork_ID(d2.original_network_id)); out_S2W_NL (4,"service_ID: ",d2.service_id, " --> refers to PMT program_number"); if (d2.cell_linkage_info == 0x03) out_nl (4," --> Service referce to mosaic service"); if (d2.cell_linkage_info == 0x04) { out_nl (4," --> Service referce to event"); d2.event_id = getBits (b, 0, 0, 16); b += 2; len1 -= 2; out_SW_NL (4,"Event_ID: ",d2.event_id); } break; } // switch } // while len1 indent(-1); } /* 0x52 Stream Identifier descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_StreamIdent (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (4,"component_tag: ", b, 16, 8); } /* 0x53 CA Identifier descriptor ETSI EN 300 468 6.2.xx -- checked v1.6.1 */ void descriptorDVB_CAIdentifier (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; indent (+1); while (len > 0) { outBit_S2x_NL (4,"CA_system_ID: ", b, 0, 16, (char *(*)(u_long)) dvbstrCASystem_ID ); b += 2; len -= 2; } indent (-1); } /* 0x54 Content descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_Content (u_char *b) { typedef struct _descContent { u_int descriptor_tag; u_int descriptor_length; } descContent; typedef struct _descContent2 { u_int content_nibble_level_1; u_int content_nibble_level_2; u_int user_nibble_1; u_int user_nibble_2; } descContent2; descContent d; descContent2 d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; len = d.descriptor_length; b += 2; indent (+1); while ( len > 0) { d2.content_nibble_level_1 = getBits (b,0, 0,4); d2.content_nibble_level_2 = getBits (b,0, 4,4); d2.user_nibble_1 = getBits (b,0, 8,4); d2.user_nibble_2 = getBits (b,0,12,4); b += 2; len -= 2; out_SB_NL (4,"Content_nibble_level_1: ", d2.content_nibble_level_1); out_SB_NL (4,"Content_nibble_level_2: ", d2.content_nibble_level_2); out_nl (4," [= %s]", dvbstrContentNibble_TYPE ( (d2.content_nibble_level_1 << 8) | d2.content_nibble_level_2) ); out_SB_NL (4,"User_nibble_1: ", d2.user_nibble_1); out_SB_NL (4,"User_nibble_2: ", d2.user_nibble_2); out_NL (4); } indent (-1); } /* 0x55 Parental Rating descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_ParentalRating (u_char *b) { typedef struct _descParentalRating { u_int descriptor_tag; u_int descriptor_length; } descParentalRating; typedef struct _descParentalRating2 { char country_code[4]; u_int rating; } descParentalRating2; descParentalRating d; descParentalRating2 d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; len = d.descriptor_length; b += 2; indent (+1); while (len > 0) { strncpy (d2.country_code, (char *)b, 3); d2.rating = getBits (b,0,24,8); b += 4; len -= 4; out_nl (4,"Country_code: %3.3s", d2.country_code); out_S2B_NL (4,"Rating: ", d2.rating, dvbstrParentalRating_TYPE (d2.rating)); out_NL (4); } indent (-1); } /* -- 0x56 Teletext descriptor */ void descriptorDVB_Teletext (u_char *b) { /* ETSI EN 300 468 6.2.xx */ typedef struct _descTeletext { u_int descriptor_tag; u_int descriptor_length; // N TeleTextList desc } descTeletext; typedef struct _descTeletextList { u_char ISO_639_language_code[4]; u_int teletext_type; u_int teletext_magazine_number; u_int teletext_page_number; } descTeletextList; descTeletext d; descTeletextList d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; len = d.descriptor_length; b += 2; indent (+1); while ( len > 0) { getISO639_3 (d2.ISO_639_language_code, b); d2.teletext_type = getBits (b,0,24,5); d2.teletext_magazine_number = getBits (b,0,29,3); d2.teletext_page_number = getBits (b,0,32,8); b += 5; len -= 5; out_nl (4,"ISO639_language_code: %3.3s", d2.ISO_639_language_code); out_S2B_NL (4,"Teletext_type: ", d2.teletext_type, dvbstrTeletext_TYPE (d2.teletext_type)); out_SB_NL (4,"Teletext_magazine_number: ",d2.teletext_magazine_number); out_SB_NL (4,"Teletext_page_number: ",d2.teletext_page_number); out_NL (4); } indent (-1); } /* 0x57 Telephone descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_Telephone (u_char *b) { u_int country_prefix_len; u_int internat_area_code_len; u_int operator_code_len; u_int national_area_code_len; u_int core_number_len; // descriptor_tag = b[0]; // len = b[1]; outBit_Sx_NL (6,"reserved_1: ", b, 16, 2); outBit_Sx_NL (4,"foreign_availability: ", b, 18, 1); outBit_Sx_NL (4,"connection_type: ", b, 19, 5); outBit_Sx_NL (6,"reserved_2: ", b, 24, 1); country_prefix_len = outBit_Sx_NL (4,"country_prefix_length: ", b, 25, 2); internat_area_code_len= outBit_Sx_NL (4,"international_area_code_length: ", b, 27, 3); operator_code_len = outBit_Sx_NL (4,"operator_code_length: ", b, 30, 2); outBit_Sx_NL (6,"reserved_3: ", b, 32, 1); national_area_code_len= outBit_Sx_NL (4,"national_area_code_length: ",b, 33, 3); core_number_len = outBit_Sx_NL (4,"core_number_length: ", b, 36, 4); b += 5; out (4,"country_prefix: "); printasciiline_buf (4, b, country_prefix_len); b += country_prefix_len; out (4,"international_area_code_prefix: "); printasciiline_buf (4, b, internat_area_code_len); b += internat_area_code_len; out (4,"operator_code: "); printasciiline_buf (4, b, operator_code_len); b += operator_code_len; out (4,"national_area_code: "); printasciiline_buf (4, b, national_area_code_len); b += national_area_code_len; out (4,"core_number: "); printasciiline_buf (4, b, core_number_len); b += core_number_len; } /* 0x58 Local Time Offset descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_LocalTimeOffset (u_char *b) { typedef struct _descLocalTimeOffset { u_int descriptor_tag; u_int descriptor_length; // N Descriptor } descLocalTimeOffset; typedef struct _descLocalTimeOffset2 { char country_code[4]; u_int country_region_id; u_int reserved_1; u_int local_time_offset_polarity; u_int local_time_offset; u_int time_of_change_MJD; u_int time_of_change_UTC; u_int next_time_offset; } descLocalTimeOffset2; descLocalTimeOffset d; descLocalTimeOffset2 d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; len = d.descriptor_length; b += 2; indent (+1); while (len > 0) { strncpy (d2.country_code, (char *)b, 3); d2.country_region_id = getBits (b, 0, 24, 6); d2.reserved_1 = getBits (b, 0, 30, 1); d2.local_time_offset_polarity = getBits (b, 0, 31, 1); d2.local_time_offset = getBits (b, 0, 32, 16); d2.time_of_change_MJD = getBits (b, 0, 48, 16); d2.time_of_change_UTC = getBits (b, 0, 64, 24); d2.next_time_offset = getBits (b, 0, 88, 16); len -= 13; b += 13; out_nl (4,"Country_code: %3.3s", d2.country_code); out_SB_NL (4,"Country_region_ID: ",d2.country_region_id); out_SB_NL (6,"reserved_1: ",d2.reserved_1); out_nl (4,"local_time_offset_polarity: %u [= %s to UTC]", d2.local_time_offset_polarity, (d2.local_time_offset_polarity) ? "minus" : "plus"); out_nl (4,"Local_time_offset: %02x:%02x", d2.local_time_offset >> 8, d2.local_time_offset & 0xFF); out (4,"Time_of_change: "); print_time40 (4, d2.time_of_change_MJD,d2.time_of_change_UTC); out_NL (4); out_nl (4,"Next_time_offset: %02x:%02x ", d2.next_time_offset >> 8, d2.next_time_offset & 0xFF); out_NL(4); } indent (-1); } /* 0x59 Subtitling descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_Subtitling (u_char *b) { typedef struct _descSubTitling { u_int descriptor_tag; u_int descriptor_length; } descSubTitling; typedef struct _descSubTitling2 { u_char ISO_639_language_code[4]; u_int subtitling_type; u_int composition_page_id; u_int ancillary_page_id; } descSubTitling2; descSubTitling d; descSubTitling2 d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; len = d.descriptor_length; b += 2; indent (+1); while ( len > 0) { getISO639_3 (d2.ISO_639_language_code, b); d2.subtitling_type = getBits (b,0,24, 8); d2.composition_page_id = getBits (b,0,32,16); d2.ancillary_page_id = getBits (b,0,48,16); b += 8; len -= 8; out_nl (4," ISO639_language_code: %3.3s", d2.ISO_639_language_code); out_S2B_NL (4,"Subtitling_type: ", d2.subtitling_type, dvbstrStreamContent_Component_TYPE ( (0x03 << 8) | d2.subtitling_type)); out_SW_NL (4,"Composition_page_id: ",d2.composition_page_id); out_SW_NL (4,"Ancillary_page_id: ",d2.ancillary_page_id); out_NL (4); } indent (-1); } /* 0x5A TerrestDelivSys descriptor (Terrestrial delivery system descriptor) ETSI 300 468 6.2.xx -- 2004-08-28 update auf EN 300 468 1.6.1 (routine rewritten) */ void descriptorDVB_TerrestDelivSys (u_char *b) { u_long cfreq; // tag = b[0]; // len = b[1]; cfreq = getBits (b, 0, 16, 32); // frequency is in 10 Hz steps == * 10 out_nl (4,"Center frequency: 0x%08x (= %lu.%03lu kHz)",cfreq, cfreq / 100, cfreq % 100 ); outBit_S2x_NL (4,"Bandwidth: ", b, 48, 3, (char *(*)(u_long)) dvbstrTerrBandwidth_SCHEME ); outBit_S2x_NL (4,"priority: ", b, 51, 1, (char *(*)(u_long)) dvbstrTerrPriority ); outBit_S2x_NL (4,"Time_Slicing_indicator: ", b, 52, 1, (char *(*)(u_long)) dvbstrTerrTimeSlicingIndicator ); outBit_S2x_NL (4,"MPE-FEC_indicator: ", b, 53, 1, (char *(*)(u_long)) dvbstrTerrMPE_FEC_Indicator ); outBit_Sx_NL (6,"reserved_1: ", b, 54, 2); outBit_S2x_NL (4,"Constellation: ", b, 56, 2, (char *(*)(u_long)) dvbstrTerrConstellation_FLAG ); outBit_S2x_NL (4,"Hierarchy information: ", b, 58, 3, (char *(*)(u_long)) dvbstrTerrHierarchy_FLAG ); outBit_S2x_NL (4,"Code_rate_HP_stream: ", b, 61, 3, (char *(*)(u_long)) dvbstrTerrCodeRate_FLAG ); outBit_S2x_NL (4,"Code_rate_LP_stream: ", b, 64, 3, (char *(*)(u_long)) dvbstrTerrCodeRate_FLAG ); outBit_S2x_NL (4,"Guard_interval: ", b, 67, 2, (char *(*)(u_long)) dvbstrTerrGuardInterval_FLAG ); outBit_S2x_NL (4,"Transmission_mode: ", b, 69, 2, (char *(*)(u_long)) dvbstrTerrTransmissionMode_FLAG ); outBit_Sx_NL (4,"Other_frequency_flag: ", b, 71, 1); outBit_Sx_NL (6,"reserved_2: ", b, 72, 32); } /* 0x5B Multilingual Network Name descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_MultilingNetworkName (u_char *b) { typedef struct _descMultiNetName { u_int descriptor_tag; u_int descriptor_length; // N .. List2 } descMultiNetName; typedef struct _descMultiNetName2 { u_char ISO639_2_language_code[4]; u_int network_name_length; // N2 .. char } descMultiNetName2; descMultiNetName d; descMultiNetName2 d2; int len1; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; b += 2; len1 = d.descriptor_length; indent (+1); while (len1 > 0 ) { getISO639_3 (d2.ISO639_2_language_code, b); d2.network_name_length = getBits (b, 0, 24, 8); out_nl (4,"ISO639_2_language_code: %3.3s", d2.ISO639_2_language_code); out_SB_NL (5,"Network_name_length: ",d2.network_name_length); print_text_468A (4, "Network_name: ", b+4,d2.network_name_length); len1 -= (4 + d2.network_name_length); b += 4 + d2.network_name_length; out_NL (4); } indent (-1); } /* 0x5C Multilingual Bouquet Name descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_MultilingBouquetName (u_char *b) { typedef struct _descMultiBouqName { u_int descriptor_tag; u_int descriptor_length; // N .. List2 } descMultiBouqName; typedef struct _descMultiBouqName2 { u_char ISO639_2_language_code[4]; u_int bouquet_name_length; // N2 .. char } descMultiBouqName2; descMultiBouqName d; descMultiBouqName2 d2; int len1; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; b += 2; len1 = d.descriptor_length; indent (+1); while (len1 > 0 ) { getISO639_3 (d2.ISO639_2_language_code, b); d2.bouquet_name_length = getBits (b, 0, 24, 8); out_nl (4,"ISO639_2_language_code: %3.3s", d2.ISO639_2_language_code); out_SB_NL (5,"Bouquet_name_length: ",d2.bouquet_name_length); print_text_468A (4, "Bouquet_name: ", b+4,d2.bouquet_name_length); len1 -= (4 + d2.bouquet_name_length); b += 4 + d2.bouquet_name_length; out_NL (4); } indent (-1); } /* 0x5D Multilingual Service Name descriptor ETSI EN 300 468 6.2.xx -- 2004-08-22 Bugfix, rewrite */ void descriptorDVB_MultilingServiceName (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; indent (+1); while (len > 0 ) { int len2; u_char ISO639_2_language_code[4]; getISO639_3 (ISO639_2_language_code, b); out_nl (4,"ISO639_2_language_code: %3.3s", ISO639_2_language_code); len2 = outBit_Sx_NL (5,"Service_provider_name_length: ", b, 24, 8); print_text_468A (4, "Service_provider_name: ", b+4,len2); b += 4 + len2; len -= 4 + len2; len2 = outBit_Sx_NL (5,"Service_name_length: ", b, 0, 8); print_text_468A (4, "Service_name: ", b+1,len2); b += 1 + len2; len -= 1 + len2; out_NL (4); } indent (-1); } /* 0x5E Multilingual Component descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_MultilingComponent (u_char *b) { typedef struct _descMultiComponent { u_int descriptor_tag; u_int descriptor_length; u_int component_tag; // N .. List2 } descMultiComponent; typedef struct _descMultiComponent2 { u_char ISO639_2_language_code[4]; u_int text_description_length; // N2 .. char } descMultiComponent2; descMultiComponent d; descMultiComponent2 d2; int len1; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.component_tag = b[2]; out_SB_NL (4,"Component_tag: ",d.component_tag); b += 3; len1 = d.descriptor_length - 1; indent (+1); while (len1 > 0 ) { getISO639_3 (d2.ISO639_2_language_code, b); d2.text_description_length = getBits (b, 0, 24, 8); out_nl (4,"ISO639_2_language_code: %3.3s", d2.ISO639_2_language_code); out_SB_NL (5,"Text_description_length: ",d2.text_description_length); print_text_468A (4, "Text_description: ", b+4,d2.text_description_length); len1 -= (4 + d2.text_description_length); b += 4 + d2.text_description_length; out_NL (4); } indent (-1); } /* 0x5F Private Data Specifier descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_PrivateDataSpecifier (u_char *b) { typedef struct _descPrivDataSpec { u_int descriptor_tag; u_int descriptor_length; u_long private_data_specifier; } descPrivDataSpec; descPrivDataSpec d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.private_data_specifier = getBits (b, 0, 16, 32); out_S2L_NL (4,"PrivateDataSpecifier: ",d.private_data_specifier, dvbstrPrivateDataSpecifier_ID( d.private_data_specifier) ); } /* 0x60 Service Move descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_ServiceMove (u_char *b) { // tag = b[0]; // len = b[1]; outBit_S2x_NL (4,"New_original_network_ID: ", b, 16, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID ); outBit_Sx_NL (4,"New_transport_stream_ID: ", b, 32, 16); outBit_Sx_NL (4,"Service_ID: ", b, 48, 16); } /* 0x61 Short Smoothing Buffer descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_ShortSmoothingBuffer (u_char *b) { u_int len; // tag = b[0]; len = b[1]; outBit_S2x_NL (4,"sb_size: ", b, 16, 2, (char *(*)(u_long)) dvbstrShortSmoothingBufSize_TYPE ); outBit_S2x_NL (4,"sb_leak_rate: ", b, 18, 6, (char *(*)(u_long)) dvbstrShortSmoothingBufLeakRate_TYPE ); print_databytes (6,"reserved:", b+3, len-1); } /* 0x62 Frequency List descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_FrequencyList (u_char *b) { typedef struct _descFreqList { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_int coding_type; } descFreqList; typedef struct _descFreqList2 { u_long centre_frequency; } descFreqList2; descFreqList d; descFreqList2 d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 6); d.coding_type = getBits (b, 0, 22, 2); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_S2B_NL (4,"coding_type: ",d.coding_type, dvbstrDelivSysCoding_TYPE(d.coding_type)); b += 3; len = d.descriptor_length - 1; indent (+1); while (len > 0) { d2.centre_frequency = getBits (b, 0, 0, 32); out (4,"Centre_frequency: %08lx ",d2.centre_frequency); switch (d.coding_type) { case 0x01: out_nl (4,"(= %3lx.%05lx GHz)", d2.centre_frequency >> 20, d2.centre_frequency & 0x000FFFFF ); break; case 0x02: out_nl (4,"(= %3lx.%04lx MHz)", d2.centre_frequency >> 16, d2.centre_frequency & 0x0000FFFF ); break; case 0x03: // frequency is in 10 Hz steps == * 10 out_nl (4,"(= %lu.%03lu kHz)", d2.centre_frequency / 100, d2.centre_frequency % 100 ); break; } len -= 4; b += 4; } indent (-1); } /* 0x63 Partial Transport Stream Descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_PartialTransportStream (u_char *b) { typedef struct _descPartTranspStream { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_long peak_rate; u_int reserved_2; u_long minimum_overall_smoothing_rate; u_int reserved_3; u_int maximum_overall_smoothing_buffer; } descPartTranspStream; descPartTranspStream d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 2); d.peak_rate = getBits (b, 0, 18, 22); d.reserved_2 = getBits (b, 0, 40, 2); d.minimum_overall_smoothing_rate= getBits (b, 0, 42, 22); d.reserved_3 = getBits (b, 0, 64, 2); d.maximum_overall_smoothing_buffer= getBits (b, 0, 66, 14); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_nl (4,"peak_rate: 0x%06lx (= %lu bits/sec)", d.peak_rate,d.peak_rate/400); out_SB_NL (6,"reserved_2: ",d.reserved_2); out_nl (4,"minimum_overall_smoothing_rate: 0x%06lx (= %lu bits/sec)", d.minimum_overall_smoothing_rate, d.minimum_overall_smoothing_rate/400); out_SB_NL (6,"reserved_3: ",d.reserved_3); out_nl (4,"maximum_overall_smoothing_buffer: 0x%04x (= %lu bits/sec)", d.maximum_overall_smoothing_buffer, d.maximum_overall_smoothing_buffer/400); } /* 0x64 DataBroadcast descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_DataBroadcast (u_char *b) { typedef struct _descDataBroadcast { u_int descriptor_tag; u_int descriptor_length; u_int data_broadcast_id; u_int component_tag; int selector_length; // N bytes u_char ISO639_2_language_code[4]; u_int text_length; // N2 char } descDataBroadcast; descDataBroadcast d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.data_broadcast_id = getBits (b, 0, 16, 16); d.component_tag = getBits (b, 0, 32, 8); d.selector_length = getBits (b, 0, 40, 8); b += 6; out_S2W_NL (4,"Data_broadcast_ID: ",d.data_broadcast_id, dvbstrDataBroadcast_ID(d.data_broadcast_id)); out_SB_NL (4,"Component_tag: ",d.component_tag); out_SB_NL (5,"Selector_length: ",d.selector_length); indent (+1); if (d.data_broadcast_id == 0x0005) { /* -- EN 301 192 Multi-protocol-encapsulation! */ typedef struct _descMultiProtEncaps { u_int MAC_address_range; u_int MAC_ip_mapping_flag; u_int alignment_indicator; u_int reserved; u_int max_sections_per_datagram; } descMultiProtEncaps; descMultiProtEncaps e; out_nl (4,"Multi_Protocol_Encapsulation [EN 301 192]:"); e.MAC_address_range = getBits (b, 0, 0, 3); e.MAC_ip_mapping_flag = getBits (b, 0, 3, 1); e.alignment_indicator = getBits (b, 0, 4, 1); e.reserved = getBits (b, 0, 5, 3); e.max_sections_per_datagram = getBits (b, 0, 8, 8); out_S2B_NL (5,"MAC_address_range: ",e.MAC_address_range, dsmccStrMultiProtEncapsMACAddrRangeField (e.MAC_address_range) ); out_SB_NL (5,"MAC_ip_mapping_flag: ",e.MAC_ip_mapping_flag); out_S2B_NL (5,"alignment_indicator: ",e.alignment_indicator, (e.alignment_indicator) ?"32 bit": "8 bit"); out_SB_NL (6,"reserved: ",e.reserved); out_SB_NL (5,"max_sections_per_datagram: ",e.max_sections_per_datagram); } else if (d.data_broadcast_id == 0x0006) { /* -- EN 301 192 8.3.1 */ typedef struct _descDATA_CAROUSEL_INFO { u_int carousel_type_id; u_int reserved_1; u_long transaction_id; u_long timeout_value_DSI; u_long timeout_value_DII; u_int reserved_2; u_long leak_rate; } descDATA_CAROUSEL_INFO; descDATA_CAROUSEL_INFO c; out_nl (4,"Data_Carousel_info:"); c.carousel_type_id = getBits (b, 0, 0, 2); c.reserved_1 = getBits (b, 0, 2, 6); c.transaction_id = getBits (b, 0, 8, 32); c.timeout_value_DSI = getBits (b, 0, 40, 32); c.timeout_value_DII = getBits (b, 0, 72, 32); c.reserved_2 = getBits (b, 0,104, 2); c.leak_rate = getBits (b, 0,106, 22); out_S2B_NL (5,"carousel_type_id: ",c.carousel_type_id, dsmccStrCarouselType_ID (c.carousel_type_id) ); out_SB_NL (6,"reserved_1: ",c.reserved_1); out_SL_NL (5,"transaction_id: ",c.transaction_id); out_SL_NL (5,"timeout_value_DSI: ",c.timeout_value_DSI); out_SL_NL (5,"timeout_value_DII: ",c.timeout_value_DII); out_SB_NL (6,"reserved_2: ",c.reserved_2); out_SL_NL (5,"leak_rate: ",c.leak_rate); } else if (d.data_broadcast_id == 0x0007) { /* -- EN 301 192 9.3.2 */ typedef struct _descOBJECT_CAROUSEL_INFO { u_int carousel_type_id; u_int reserved_1; u_long transaction_id; u_long timeout_value_DSI; u_long timeout_value_DII; u_int reserved_2; u_long leak_rate; // -- } descOBJECT_CAROUSEL_INFO; descOBJECT_CAROUSEL_INFO c; u_char *b1; int len1; out_nl (4,"Object_Carousel_Info:"); c.carousel_type_id = getBits (b, 0, 0, 2); c.reserved_1 = getBits (b, 0, 2, 6); c.transaction_id = getBits (b, 0, 8, 32); c.timeout_value_DSI = getBits (b, 0, 40, 32); c.timeout_value_DII = getBits (b, 0, 72, 32); c.reserved_2 = getBits (b, 0,104, 2); c.leak_rate = getBits (b, 0,106, 22); out_S2B_NL (5,"carousel_type_id: ",c.carousel_type_id, dsmccStrCarouselType_ID (c.carousel_type_id) ); out_SB_NL (6,"reserved_1: ",c.reserved_1); out_SL_NL (5,"transaction_id: ",c.transaction_id); out_SL_NL (5,"timeout_value_DSI: ",c.timeout_value_DSI); out_SL_NL (5,"timeout_value_DII: ",c.timeout_value_DII); out_SB_NL (6,"reserved_2: ",c.reserved_2); out_SL_NL (5,"leak_rate: ",c.leak_rate); b1 = b + 16; len1 = d.selector_length - 16; while (len1 > 0) { u_char ISO639_2_language_code[4]; int object_name_length; getISO639_3 (ISO639_2_language_code, b1); object_name_length = getBits (b1, 0, 24, 8); out_nl (5,"ISO639_2_language_code: %3.3s", ISO639_2_language_code); out_SB_NL (5,"object_name_length: ",object_name_length); print_text_468A (5, "object_name: ", b1+4,object_name_length); b1 += (4 + object_name_length); len1 -= (4 + object_name_length); } /* $$$ TODO what is 0x0008 */ } else if (d.data_broadcast_id == 0x0009) { /* -- EN 301 192 10.2.1 */ typedef struct _descHIGH_PROT_ASYNC_DATA_INFO { u_int higher_protocol_id; u_int reserved; // private data } descHIGH_PROT_ASYNC_DATA_INFO; descHIGH_PROT_ASYNC_DATA_INFO c; out_nl (4,"higher_protocol_asynchronous_data_info:"); c.higher_protocol_id = getBits (b, 0, 0, 4); c.reserved = getBits (b, 0, 4, 4); out_S2B_NL (5,"higher_protocol_id: ",c.higher_protocol_id, dsmccStrHigherProtocol_ID (c.higher_protocol_id) ); out_SB_NL (6,"reserved: ",c.reserved); print_private_data (5, b+1, d.selector_length-1); } else if (d.data_broadcast_id == 0x000A) { /* TR 102 006 */ typedef struct _descSUI { int OUI_data_length; u_long OUI; u_int updt_type; int selector_length2; } descSUI; descSUI s; int len2; out_nl (4,"Software_update_info:"); s.OUI_data_length = outBit_Sx_NL (4,"OUI_data_length: ", b,0,8); b++; while (s.OUI_data_length > 0) { outBit_S2x_NL (4,"OUI: ", b,0,24, (char *(*)(u_long))dsmccStrOUI); outBit_Sx_NL (6,"reserved: ", b,24, 4); s.updt_type = outBit_S2x_NL (4,"update_type: ",b,28, 4, (char *(*)(u_long))dsmccStrUpdateType_ID); outBit_Sx_NL (6,"reserved: ", b,32, 2); outBit_Sx_NL (4,"update_versioning_flag: ", b,34, 1); outBit_Sx (4,"update_version: ", b,35, 5); if (s.updt_type == 0x02 || s.updt_type == 0x03) { out (4, " [--> refers to UNT version number]"); } out_NL (4); s.selector_length2 = outBit_Sx_NL (4,"selector_length: ", b,40, 8); b += 6; s.OUI_data_length -= 6; print_databytes (4,"Selector bytes:", b,s.selector_length2); b += s.selector_length2; s.OUI_data_length -= s.selector_length2; } len2 = d.selector_length - s.OUI_data_length -1; if (len2 > 0) { print_private_data (4, b,len2); } } else { // 0x0002 == asynchronous Data Streaming // 0x0003 == indicate a synchronous data stream // 0x0004 == synchronised data streams // ... print_databytes (4,"Selector bytes:", b, d.selector_length); } indent (-1); b += d.selector_length; getISO639_3 (d.ISO639_2_language_code, b); d.text_length = getBits (b, 0, 24, 8); out_nl (4,"ISO639_2_language_code: %3.3s", d.ISO639_2_language_code); out_SB_NL (5,"Text_length: ",d.text_length); print_text_468A (4, "Text: ", b+4,d.text_length); } /* 0x65 Scrambling descriptor ETSI EN 300 468 -- updated 1.7.1 (maybe prior) */ void descriptorDVB_Scrambling (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (4,"scrambling_mode: ", b, 16, 8); } /* 0x66 Data Broadcast ID descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_DataBroadcastID (u_char *b) { typedef struct _descDataBroadcastID { u_int descriptor_tag; u_int descriptor_length; u_int data_broadcast_id; // N ... id_selector bytes } descDataBroadcastID; descDataBroadcastID d; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.data_broadcast_id = getBits (b, 0, 16, 16); b+=4; len = d.descriptor_length -2; out_S2W_NL (4,"Data_broadcast_ID: ",d.data_broadcast_id, dvbstrDataBroadcast_ID(d.data_broadcast_id)); // $$$ ID selector bytes may depend on databroadcast_id // $$$ do further more selection here // $$$ EN 301 192 Stuff TODO if (d.data_broadcast_id == 0x000A) { // TR 102 006 Software update S.12 int OUI_data_len; int i; out_nl (4,"system_software_update_info [TR 102 006]:"); OUI_data_len = outBit_Sx_NL (4,"OUI_data_length: ", b, 0, 8); b++; len--; i = OUI_data_len; while (i > 0) { int len2; out_NL (5); indent (+1); outBit_S2x_NL(5,"OUI: ", b, 0,24, (char *(*)(u_long))dsmccStrOUI ); outBit_Sx_NL (6,"reserved_1: ", b,24, 4); outBit_S2x_NL(5,"update_type: ", b,28, 4, (char *(*)(u_long)) dsmccStrUpdateType_ID ); outBit_Sx_NL (6,"reserved_2: ", b,32, 2); outBit_Sx_NL (5,"update_versioning_flag: ", b,34, 1); outBit_Sx_NL (5,"update_version: ", b,35, 5); len2 = outBit_Sx_NL (5,"selector_length: ", b,40, 8); b += 6; len -= 6; i -= 6; print_databytes (5,"Selector bytes:", b, len2); b += len2; len -= len2; i -= len2; indent (-1); } print_private_data (5, b, len); } else if (d.data_broadcast_id == 0x000B) { // -- EN 301 192 PSI Signalling IP/MAC Notification Table { typedef struct _descIPMAC_NOTIF_TABLE { int platform_id_data_length; // inner loop u_long platform_id; u_int action_type; u_int reserved; u_int INT_versioning_flag; u_int INT_version; } descIPMAC_NOTIF_TABLE; descIPMAC_NOTIF_TABLE d; int len2; out_nl (4,"IP/MAC Notification [EN 301 192]:"); d.platform_id_data_length = getBits (b, 0, 0, 8); out_SW_NL (5,"Platform_id_data_length: ",d.platform_id_data_length); b++; len--; len2 = d.platform_id_data_length; indent (+1); while (len2 > 0) { out_NL (5); d.platform_id = getBits (b, 0, 0, 24); d.action_type = getBits (b, 0, 24, 8); d.reserved = getBits (b, 0, 32, 2); d.INT_versioning_flag = getBits (b, 0, 34, 1); d.INT_version = getBits (b, 0, 35, 5); b += 5; len -= 5; len2 -= 5; out_S2T_NL (5,"Platform_id: ",d.platform_id, dsmccStrPlatform_ID (d.platform_id)); out_S2B_NL (5,"Action_type: ",d.action_type, dsmccStrAction_Type(d.action_type)); out_SB_NL (5,"reserved: ",d.reserved); out_SB_NL (5,"INT_versioning_flag: ",d.INT_versioning_flag); out_SB_NL (5,"INT_version: ",d.INT_version); } indent (-1); print_private_data (5, b, len); } } else { print_databytes(4,"ID_selector_bytes:", b, len); } } /* 0x67 Transport Stream descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_TransportStream (u_char *b) { u_int len; // tag = b[0]; len = b[1]; print_databytes (4,"transport_stream_bytes:", b+2, len); } /* 0x68 DSNG descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_DSNG (u_char *b) { u_int len; // tag = b[0]; len = b[1]; print_databytes (4,"DSNG_bytes:", b+2, len); } /* 0x69 PDC descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_PDC (u_char *b) { u_long programme_identification_label; // ... splits in u_int day; u_int month; u_int hour; u_int minute; // tag = b[0]; // lenh = b[1]; outBit_Sx_NL (6,"reserved: ", b, 16, 4); programme_identification_label = getBits (b, 0, 20, 20); day = getBits (b,0,20,5); month = getBits (b,0,25,4); hour = getBits (b,0,29,5); minute = getBits (b,0,34,6); out (4,"Programme_identification_label: 0x%05lx ", programme_identification_label); out (4,"[= month=%d day=%d hour=%d min=%d]", month, day, hour, minute); out_NL (4); } /* 0x6A AC-3 descriptor ETSI EN 300 468 ANNEX E -- updated */ void descriptorDVB_AC3 (u_char *b) { u_int len; u_int comp_type_flag; u_int bsid_flag; u_int mainid_flag; u_int asvc_flag; // tag = b[0]; len = b[1]; comp_type_flag= outBit_Sx_NL (4,"component_type_flag: ",b,16, 1); bsid_flag = outBit_Sx_NL (4,"bsid_flag: ", b, 17, 1); mainid_flag = outBit_Sx_NL (4,"mainid_flag: ", b, 18, 1); asvc_flag = outBit_Sx_NL (4,"asvc_flag: ", b, 19, 1); outBit_Sx_NL (4,"reserved: ", b, 20, 4); b += 3; len -= 1; if (comp_type_flag) { outBit_S2x_NL (4,"component_type: ", b++, 0, 8, (char *(*)(u_long)) dvbstrDVB_AC3_ComponentType ); len--; } if (bsid_flag) { outBit_Sx_NL (4,"bsid: ", b++, 0, 8); len--; } if (mainid_flag) { outBit_Sx_NL (4,"mainid: ", b++, 0, 8); len--; } if (asvc_flag) { outBit_Sx_NL (4,"asvc: ", b++, 0, 8); len--; } print_databytes (4,"Additional_info:", b, len); } /* 0x6B Ancillary Data descriptor ETSI EN 300 468 v1.6.1 -- updated EN 300 468 v1.7.1 */ void descriptorDVB_AncillaryData (u_char *b) { u_int adi; // tag = b[0]; // len = b[1]; adi = outBit_Sx_NL (4,"Ancillary_data_identifier: ", b, 16, 8); // $$$ the following should normally in dvbStrAncillaryData...() indent (+1); if (adi & 0x01) out_nl (4,"[= DVD-Video Ancillary Data]"); if (adi & 0x02) out_nl (4,"[= Extended Ancillary Data]"); if (adi & 0x04) out_nl (4,"[= Announcement Switching Data]"); if (adi & 0x08) out_nl (4,"[= DAB Ancillary Data]"); if (adi & 0x10) out_nl (4,"[= Scale Factor Error Check]"); if (adi & 0x20) out_nl (4,"[= MPEG-4 ancillary data]"); if (adi & 0x40) out_nl (4,"[= RDS via UECP]"); if (adi & 0x80) out_nl (4,"[= reserved ]"); indent (-1); } /* 0x6C Cell List descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_CellList (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; len -= 0; while (len > 0) { int len2; out_nl (4,"Cell:"); indent (+1); outBit_Sx_NL (4,"cell_id: ", b, 0,16); outBit_S2x_NL (4,"cell_latitude: ", b,16,16, (char *(*)(u_long)) str_cell_latitude); outBit_S2x_NL (4,"cell_longitude: ", b,32,16, (char *(*)(u_long)) str_cell_longitude); outBit_S2x_NL (4,"cell_extend_of_latitude: ", b,48,12, (char *(*)(u_long)) str_cell_latitude); outBit_S2x_NL (4,"cell_extend_of_longitude: ", b,60,12, (char *(*)(u_long)) str_cell_longitude); len2 = outBit_Sx_NL (4,"subcell_info_loop_length: ", b,72, 8); b += 10; len -= 10; while ( len2 > 0) { out_nl (4,"Sub-Cell:"); indent (+1); outBit_Sx_NL (4,"cell_id_extension: ", b, 0, 8); outBit_S2x_NL (4,"sub_cell_latitude: ", b, 8,16, (char *(*)(u_long)) str_cell_latitude); outBit_S2x_NL (4,"sub_cell_longitude: ", b,24,16, (char *(*)(u_long)) str_cell_longitude); outBit_S2x_NL (4,"sub_cell_extend_of_latitude: ",b,40,12, (char *(*)(u_long)) str_cell_latitude); outBit_S2x_NL (4,"cell_extend_of_longitude: ", b,52,12, (char *(*)(u_long)) str_cell_longitude); indent (-1); b += 8; len -= 8; len2 -= 8; } indent (-1); } } /* 0x6D Cell Frequency Link descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_CellFrequencyLink (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; len -= 0; while (len > 0) { int len2; u_long frequency; out_nl (4,"Cell:"); indent (+1); outBit_Sx_NL (4,"cell_id: ", b, 0,16); frequency = getBits (b, 0, 16, 32); // frequency is in 10 Hz steps == * 10 out_nl (4,"Center frequency: 0x%08x (= %lu.%03lu kHz)", frequency, frequency / 100, frequency % 100 ); len2 = outBit_Sx_NL (4,"subcell_info_loop_length: ", b,48, 8); b += 7; len -= 7; while (len2 > 0) { u_long frequency2; out_nl (4,"Sub-Cell:"); indent (+1); outBit_Sx_NL (4,"cell_id_extension: ", b, 0, 8); frequency2 = getBits (b, 0, 8, 32); // frequency is in 10 Hz steps == * 10 out_nl (4,"Transposer frequency: 0x%08x (= %lu.%03lu kHz)", frequency2, frequency2 / 100, frequency2 % 100 ); b += 5; len -= 5; len2 -= 5; indent (-1); } indent (-1); } } /* 0x6E Announcement Support descriptor ETSI EN 300 468 6.2.xx */ void descriptorDVB_AnnouncementSupport (u_char *b) { typedef struct _descAnnouncementSupport { u_int descriptor_tag; u_int descriptor_length; u_int announcement_support_indicator; // N .. Announcement 2 } descAnnouncementSupport; typedef struct _descAnnouncementSupport2 { u_int announcement_type; u_int reserved_1; u_int reference_type; // conditional data u_int original_network_id; u_int transport_stream_id; u_int service_id; u_int component_tag; } descAnnouncementSupport2; descAnnouncementSupport d; descAnnouncementSupport2 d2; int len; int i; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.announcement_support_indicator = getBits (b, 0, 16, 16); b += 4; len = d.descriptor_length - 4; out_SW_NL (4,"Announcement_support_indicator: ", d.announcement_support_indicator); i = d.announcement_support_indicator; // $$$ should be in dvbstr...() indent (+1); if (i & 0x01) out_nl (4,"[= Emergency alarm]"); if (i & 0x02) out_nl (4,"[= Road Traffic Flash]"); if (i & 0x04) out_nl (4,"[= Public Transport Flash]"); if (i & 0x08) out_nl (4,"[= Warning message]"); if (i & 0x10) out_nl (4,"[= News flash]"); if (i & 0x20) out_nl (4,"[= Weather flash]"); if (i & 0x40) out_nl (4,"[= Event announcement]"); if (i & 0x80) out_nl (4,"[= Personal call]"); if (i & 0xFF00) out_nl (4,"[= reserved ]"); indent (-1); out_NL (4); indent (+1); while (len > 0) { d2.announcement_type = getBits (b, 0, 0, 4); d2.reserved_1 = getBits (b, 0, 4, 1); d2.reference_type = getBits (b, 0, 5, 3); b += 1; len -= 1; out_S2B_NL (4,"Announcement_type: ",d2.announcement_type, dvbstrAnnouncement_TYPE (d2.announcement_type) ); out_SB_NL (6,"reserved_1: ",d2.reserved_1); out_S2B_NL (4,"reference_type: ",d2.reference_type, dvbstrAnnouncementReference_TYPE (d2.reference_type) ); i = d2.reference_type; if (i == 1 || i == 2 || i == 3) { d2.original_network_id = getBits (b, 0, 0, 16); d2.transport_stream_id = getBits (b, 0, 16, 16); d2.service_id = getBits (b, 0, 32, 16); d2.component_tag = getBits (b, 0, 48, 8); b += 7; len -= 7; out_S2W_NL (4,"original_network_ID: ",d2.original_network_id, dvbstrOriginalNetwork_ID(d2.original_network_id)); out_SW_NL (4,"transport_stream_ID: ",d2.transport_stream_id); out_SW_NL (4,"service_ID: ",d2.service_id); out_SB_NL (4,"component_tag: ",d2.component_tag); } // if } // while indent (-1); } /* 0x6F Application Signalling descriptor ETSI EN 300 468 6.2.x */ void descriptorDVB_ApplicationSignalling (u_char *b) { typedef struct _descApplSignalling { u_int descriptor_tag; u_int descriptor_length; // N AppSignalling2 } descApplSignalling; typedef struct _descApplSignalling2 { u_int application_type; // 16 u_int reserved; // 3 u_int AIT_version_nr; // 5 } descApplSignalling2; descApplSignalling d; descApplSignalling2 d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; b += 2; len = d.descriptor_length - 0; while ( len > 0) { d2.application_type = getBits (b, 0, 0, 16); d2.reserved = getBits (b, 0,16, 3); d2.AIT_version_nr = getBits (b, 0,19, 5); out_SW_NL (4,"Application type: ",d2.application_type); // $$$ TODO Application type text out_SB_NL (6,"reserved: ",d2.reserved); out_SB_NL (4,"AIT version nr.: ",d2.AIT_version_nr); b += 3; len -= 3; } } /* 0x70 Adaptation Field Data descriptor ETSI EN 300 468 6.2.x */ void descriptorDVB_AdaptationFieldData (u_char *b) { typedef struct _descAdaptationFieldData { u_int descriptor_tag; u_int descriptor_length; u_int adaptationFieldDataIdentifier; // ? .. } descAdaptationFieldData; descAdaptationFieldData d; int len; int i; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.adaptationFieldDataIdentifier = getBits (b, 0, 16, 8); b += 3; len = d.descriptor_length - 1; out_SB_NL (4,"Adaptation field data identifier: ", d.adaptationFieldDataIdentifier); indent (+1); i = d.adaptationFieldDataIdentifier; if (i & 0x01) out_nl (4,"[= announcement switching data field]"); if (i & 0xFE) out_nl (4,"[= reserved]"); indent (-1); } /* 0x71 Service Identifier descriptor ETSI EN 300 468 6.2.x ETSI TS 102 812 v1.2.1 10.12 */ void descriptorDVB_ServiceIdentifier (u_char *b) { int len; // tag = b[0]; len = b[1]; print_text_468A (4, "textual_service_identifier: ", b+2, len); } /* 0x72 Service Availability descriptor ETSI EN 300 468 6.2.x */ void descriptorDVB_ServiceAvailability (u_char *b) { typedef struct _descServiceAvailability { u_int descriptor_tag; u_int descriptor_length; u_int availability_flag_1; u_int reserved_7; // 0..N cell_ids } descServiceAvailability; descServiceAvailability d; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.availability_flag_1 = getBits (b, 0, 16, 1); d.reserved_7 = getBits (b, 0, 16, 7); b += 3; len = d.descriptor_length - 1; out_SB_NL (4,"Availability flag: ", d.availability_flag_1); out_SB_NL (6,"reserved_1: ",d.reserved_7); indent (+1); while ( len > 0) { u_int cellid = getBits (b, 0, 0, 16); b += 2; len -= 2; out_S2B_NL (4,"Cell-ID: ",cellid, "[identifies terrestrial cell]"); } indent (-1); } /* 0x73 Default Authority descriptor ETSI TS 102 323 */ void descriptorDVB_DefaultAuthority (u_char *b) { int len; // tag = b[0]; len = b[1]; print_databytes (4, "Default_authority: ", b+2, len); // a DNS name } /* 0x74 Related Content descriptor ETSI TS 102 323 */ void descriptorDVB_RelatedContent (u_char *b) { // -- related content descriptor seems to be empty // -- (TS 102 323 v1.1.1, p10.3) descriptor_any (b); } /* 0x75 TVA ID descriptor ETSI TS 102 323 */ void descriptorDVB_TVA_ID (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; while (len > 0) { outBit_Sx_NL (4,"TVA_id: ", b, 0, 16); outBit_Sx_NL (6,"reserved: ", b, 16, 5); outBit_S2x_NL (4,"running_status: ", b, 21, 3, (char *(*)(u_long)) dvbstrTVA_RunningStatus ); b += 3; len -= 3; out_NL (4); } } /* 0x76 Content Identifier descriptor ETSI TS 102 323 */ void descriptorDVB_ContentIdentifier (u_char *b) { int len; // tag = b[0]; len = b[1]; b += 2; while (len > 0) { int cloc; outBit_S2x_NL (4,"crid_type: ", b, 0, 6, (char *(*)(u_long)) dvbstrTVA_crid_type ); cloc = outBit_S2x_NL (4,"crid_location: ", b, 6, 2, (char *(*)(u_long)) dvbstrTVA_crid_location ); b++; len--; if (cloc == 0x00) { int clen; clen = outBit_Sx_NL (4,"crid_len: ", b, 0, 8); print_databytes (4, "crid_bytes: ", b+1, clen); b += clen+1; len -= clen+1; } if (cloc == 0x01) { outBit_Sx_NL (4,"crid_ref: ", b, 0, 16); b += 2; len -= 2; } out_NL (4); } } /* 0x77 time_slice_fec_identifier descriptor ETSI EN 301 192 1.4.1 */ void descriptorDVB_TimesliceFecIdentifier (u_char *b) { int len; int tslice, mpe_fec; int frame_size; int mbd, tslice_fec_id; // tag = b[0]; len = b[1]; // -- prefetch value tslice_fec_id = getBits (b, 0, 36, 4); tslice = outBit_S2x_NL (4,"time_slicing: ", b,16, 1, (char *(*)(u_long)) dvbstrTimeSlice_bit_used ); mpe_fec = outBit_S2x_NL (4,"mpe_fec: ", b,17, 2, (char *(*)(u_long)) dvbstrMPE_FEC_algo ); outBit_Sx_NL (6,"reserved: ", b,19, 2); frame_size = outBit_Sx_NL (4,"frame_size: ", b,21, 3); if (tslice_fec_id == 0) { if (tslice) out_nl (4," ==> max burst size: %s", dvbstrMPE_FEC_max_burst_size (frame_size) ); if (mpe_fec) out_nl (4," ==> MPE-FEC frame rows: %s", dvbstrMPE_FEC_frame_rows (frame_size) ); } else { out_nl (4," ==> not defined "); } mbd = outBit_Sx (4,"max_burst_duration: ", b,24,8); if (tslice_fec_id == 0) { if (tslice) out_nl (4," [= %ld msec]",(mbd+1)*20); else out_nl (4," [= reserved]"); } else { out_nl (4," [not defined]"); } if (tslice_fec_id == 0) { outBit_S2x_NL (4,"max_average_rate: ", b,32, 4, (char *(*)(u_long)) dvbstrMPE_FEC_max_average_rate ); } else { outBit_Sx (4,"max_average_rate: ", b,32, 4); out_nl (4," [= not defined]"); } outBit_Sx_NL (4,"time_slice_fec_id: ", b,36, 4); b += 5; len -= 3; print_databytes (4,"id_selector_bytes:", b,len); } /* 0x78 ECM RepetitionRate descriptor ETSI EN 301 192 1.4.1 */ void descriptorDVB_ECM_RepetitionRate (u_char *b) { int len; // tag = b[0]; len = b[1]; outBit_S2x_NL (4,"CA_systemID: ", b,16,16, (char *(*)(u_long)) dvbstrCASystem_ID ); outBit_S2Tx_NL (4,"ECM_repetition_rate: ", b,32,16,"msec."); b += 6; len -= 4; print_private_data (4, b, len); } /* 0x79 S2 Satellite Delivery System Descriptor ETSI EN 301 192 1.7.1 */ void descriptorDVB_S2SatelliteDeliverySystem(u_char *b) { u_int sss; u_int misf; // tag = b[0]; // len = b[1]; b +=2; sss = outBit_Sx_NL (4,"scrambling_sequence_selector: ", b, 0, 1); misf = outBit_Sx_NL (4,"multiple_input_stream_flag: ", b, 1, 1); outBit_Sx_NL (4,"backwards_compatibility_indicator: ", b, 2, 1); outBit_Sx_NL (4,"reserved_future_use: ", b, 3, 5); b +=1; if (sss) { outBit_Sx_NL (4,"reserved: ", b, 0, 6); outBit_Sx_NL (4,"scrambling_sequence_index: ", b, 6,18); // $$$ TODO b += 3; } if (misf) { outBit_Sx_NL (4,"input_stream_identifier: ", b, 0, 8); // $$$TODO EN 302 307 b += 1; } } /* 0x7A Enhanced AC-3 descriptor ETSI EN 300 468 v.1.7.1 ANNEX D */ void descriptorDVB_Enhanced_AC3 (u_char *b) { u_int len; u_int comp_type_flag; u_int bsid_flag; u_int mainid_flag; u_int asvc_flag; u_int substream1_flag; u_int substream2_flag; u_int substream3_flag; // tag = b[0]; len = b[1]; comp_type_flag = outBit_Sx_NL (4,"component_type_flag: ", b, 16, 1); bsid_flag = outBit_Sx_NL (4,"bsid_flag: ", b, 17, 1); mainid_flag = outBit_Sx_NL (4,"mainid_flag: ", b, 18, 1); asvc_flag = outBit_Sx_NL (4,"asvc_flag: ", b, 19, 1); outBit_Sx_NL (4,"mixinfoexists: ", b, 20, 1); substream1_flag = outBit_Sx_NL (4,"substream1_flag: ", b, 21, 1); substream2_flag = outBit_Sx_NL (4,"substream2_flag: ", b, 22, 1); substream3_flag = outBit_Sx_NL (4,"substream3_flag: ", b, 23, 1); b += 3; len -= 1; if (comp_type_flag) { outBit_S2x_NL (4,"component_type: ",b++, 0, 8, (char *(*)(u_long)) dvbstrDVB_AC3_ComponentType ); len--; } if (bsid_flag) { outBit_Sx_NL (4,"bsid: ", b++, 0, 8); len--; } if (mainid_flag) { outBit_Sx_NL (4,"mainid: ", b++, 0, 8); len--; } if (asvc_flag) { outBit_Sx_NL (4,"asvc: ", b++, 0, 8); len--; } if (substream1_flag) { outBit_Sx_NL (4,"substream1: ", b++, 0, 8); // $$$ TODO len--; } if (substream2_flag) { outBit_Sx_NL (4,"substream2: ", b++, 0, 8); // $$$ TODO len--; } if (substream3_flag) { outBit_Sx_NL (4,"substream3: ", b++, 0, 8); // $$$ TODO len--; } print_databytes (4,"additional_info:", b, len); } /* 0x7B DTS_Audio descriptor ETSI EN 300 468 v.1.7.1 ANNEX G */ void descriptorDVB_DTS_Audio (u_char *b) { u_int len; // tag = b[0]; len = b[1]; outBit_S2x_NL(4,"sample_rate_code: ", b, 16, 4, (char *(*)(u_long)) dvbstrDVB_DTS_Audio_SampleRateCode ); outBit_S2x_NL(4,"bit_rate_code: ", b, 20, 6, (char *(*)(u_long)) dvbstrDVB_DTS_Audio_BitRate ); outBit_Sx_NL (4,"nblks: ", b, 26, 7); outBit_Sx_NL (4,"fsize: ", b, 33, 14); outBit_S2x_NL(4,"surround_mode: ", b, 47, 6, (char *(*)(u_long)) dvbstrDVB_DTS_Audio_SurroundMode ); outBit_Sx_NL (4,"lfe_flag: ", b, 53, 1); outBit_S2x_NL(4,"extended_surround_flag: ", b, 54, 2, (char *(*)(u_long)) dvbstrDVB_DTS_Audio_ExtendedSurroundFlag ); print_databytes (4,"additional_info:", b+7, len-6); } /* 0x7C AAC descriptor ETSI EN 300 468 v.1.7.1 ANNEX H */ void descriptorDVB_AAC (u_char *b) { u_int len; u_int atf; // tag = b[0]; len = b[1]; outBit_Sx_NL (4,"profile_and_level: ", b, 16, 8); atf = outBit_Sx_NL (4,"AAC_type_flag: ", b, 24, 1); outBit_Sx_NL (4,"reserved: ", b, 25, 7); b += 4; len -= 2; if (atf) { outBit_Sx_NL (4,"AAC_type: ", b, 0, 8); b++; len--; } print_databytes (4,"additional_info:", b, len); } // 0x7D -- reserved // 0x7E -- reserved /* 0x7F Extension descriptor ETSI EN 300 468 v.1.7.1 */ void descriptorDVB_Extension (u_char *b) { u_int len; u_int ext_tag; // tag = b[0]; len = b[1]; ext_tag = outBit_Sx_NL (4,"descriptor_tag_extension: ", b, 16, 8); switch (ext_tag) { // case xx: // break; default: print_databytes (4,"selector_bytes:", b+3, len-1); break; } } dvbsnoop-1.4.50/src/descriptors/mpeg_descriptor.c0000744000076400001440000011137110373750007015605 /* $Id: mpeg_descriptor.c,v 1.29 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- MPEG Descriptors ISO/IEC 13818-1/6 -- all descriptors are returning their length used in buffer $Log: mpeg_descriptor.c,v $ Revision 1.29 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.28 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.27 2005/11/10 23:34:37 rasc Some H.222.1 AMD 4+5 update Revision 1.26 2004/11/03 21:00:52 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.25 2004/08/13 11:05:29 rasc Metadata_STD_descriptor Revision 1.24 2004/08/12 22:57:18 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.23 2004/08/01 21:33:08 rasc minor TVA stuff (TS 102 323) Revision 1.22 2004/07/26 20:58:03 rasc RNT completed.. (TS 102 323) Revision 1.21 2004/07/25 20:12:58 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.20 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.19 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.18 2004/02/24 23:03:05 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.17 2004/02/20 22:18:39 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.16 2004/01/17 23:06:08 rasc minor stuff, some restructs in output Revision 1.15 2004/01/15 21:27:22 rasc DSM-CC stream descriptors Revision 1.14 2004/01/12 23:05:25 rasc no message Revision 1.13 2004/01/02 16:40:34 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.12 2004/01/01 20:35:26 rasc PES program stream map, minor descriptor cleanup Revision 1.11 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.10 2004/01/01 20:09:20 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.9 2003/11/26 16:27:45 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.8 2003/10/27 22:43:49 rasc carousel info descriptor and more Revision 1.7 2003/10/26 19:06:27 rasc no message Revision 1.6 2003/10/25 19:11:49 rasc no message Revision 1.5 2003/10/24 22:45:04 rasc code reorg... Revision 1.4 2003/10/24 22:17:17 rasc code reorg... Revision 1.3 2003/10/17 18:16:54 rasc - started more work on newer ISO 13818 descriptors - some reorg work started Revision 1.2 2003/09/09 05:12:45 obi print format identifier of registration descriptor in ascii. looks quite strange but is nice to see :) Revision 1.1 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #include "dvbsnoop.h" #include "descriptor.h" #include "mpeg_descriptor.h" #include "descriptor_misc.h" #include "private/userdefs.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" #include "misc/pid_mem.h" /* determine MPEG descriptor type and print it... return byte length 2004-08-11 updated H.222.0 AMD1 */ int descriptorMPEG (u_char *b) { int len; int tag; out_NL (4); tag = outBit_S2x_NL (4,"MPEG-DescriptorTag: ", b, 0, 8, (char *(*)(u_long))dvbstrMPEGDescriptorTAG); len = outBit_Sx_NL (4,"descriptor_length: ", b, 8, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor printhex_buf (9, b,len+2); switch (tag) { case 0x02: descriptorMPEG_VideoStream (b); break; case 0x03: descriptorMPEG_AudioStream (b); break; case 0x04: descriptorMPEG_Hierarchy (b); break; case 0x05: descriptorMPEG_Registration (b); break; case 0x06: descriptorMPEG_DataStreamAlignment (b); break; case 0x07: descriptorMPEG_TargetBackgroundGrid (b); break; case 0x08: descriptorMPEG_VideoWindow (b); break; case 0x09: descriptorMPEG_CA (b); break; case 0x0A: descriptorMPEG_ISO639_Lang (b); break; case 0x0B: descriptorMPEG_SystemClock (b); break; case 0x0C: descriptorMPEG_MultiplexBufUtil (b); break; case 0x0D: descriptorMPEG_Copyright (b); break; case 0x0E: descriptorMPEG_MaxBitrate (b); break; case 0x0F: descriptorMPEG_PrivateDataIndicator (b); break; case 0x10: descriptorMPEG_SmoothingBuf (b); break; case 0x11: descriptorMPEG_STD (b); break; case 0x12: descriptorMPEG_IBP (b); break; /* 0x13 - 0x1A DSM-CC ISO13818-6, TR 102 006 */ case 0x13: descriptorMPEG_Carousel_Identifier (b); break; case 0x14: descriptorMPEG_Association_tag (b); break; case 0x15: descriptorMPEG_Deferred_Association_tags (b); break; /* DSM-CC stream descriptors */ // case 0x16: reserved.... case 0x17: descriptorMPEG_NPT_reference (b); break; case 0x18: descriptorMPEG_NPT_endpoint (b); break; case 0x19: descriptorMPEG_stream_mode (b); break; case 0x1A: descriptorMPEG_stream_event (b); break; /* MPEG 4 */ case 0x1B: descriptorMPEG_MPEG4_video (b); break; case 0x1C: descriptorMPEG_MPEG4_audio (b); break; case 0x1D: descriptorMPEG_IOD (b); break; case 0x1E: descriptorMPEG_SL (b); break; case 0x1F: descriptorMPEG_FMC (b); break; case 0x20: descriptorMPEG_External_ES_ID (b); break; case 0x21: descriptorMPEG_MuxCode (b); break; case 0x22: descriptorMPEG_FMXBufferSize (b); break; case 0x23: descriptorMPEG_MultiplexBuffer (b); break; case 0x24: descriptorMPEG_ContentLabeling(b); break; /* TV ANYTIME, TS 102 323 */ case 0x25: descriptorMPEG_TVA_metadata_pointer (b); break; case 0x26: descriptorMPEG_TVA_metadata (b); break; case 0x27: descriptorMPEG_TVA_metadata_STD (b); break; /* H.222.0 AMD 3 */ case 0x28: descriptorMPEG_AVC_video (b); break; case 0x29: descriptorMPEG_IPMP (b); break; case 0x2A: descriptorMPEG_AVC_timing_and_HRD (b); break; /* H.222.0 Corr 4 */ case 0x2B: descriptorMPEG_MPEG2_AAC_audio (b); break; case 0x2C: descriptorMPEG_FlexMuxTiming (b); break; default: if (tag < 0x80) { out_nl (0," ----> ERROR: unimplemented descriptor (mpeg context), Report!"); } descriptor_PRIVATE (b,MPEG); break; } return len+2; // (descriptor total length) } /* --------------------------------------------------------------- well known MPEG descriptors --------------------------------------------------------------- */ /* 0x02 VideoStream descriptor ISO 13818-1 2.6.xx */ void descriptorMPEG_VideoStream (u_char *b) { typedef struct _descVidStream { u_int descriptor_tag; u_int descriptor_length; u_int multiple_frame_rate_flag; u_int frame_rate_code; u_int MPEG_1_only_flag; u_int constrained_parameter_flag; u_int still_picture_flag; // if MPEG_1_only_flag == 1 u_int profile_and_level_indication; u_int chroma_format; u_int frame_rate_extension_flag; u_int reserved_1; } descVidStream; descVidStream d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.multiple_frame_rate_flag = getBits (b, 0, 16, 1); d.frame_rate_code = getBits (b, 0, 17, 4); d.MPEG_1_only_flag = getBits (b, 0, 21, 1); d.constrained_parameter_flag = getBits (b, 0, 22, 1); d.still_picture_flag = getBits (b, 0, 23, 1); out_SB_NL (4,"multiple_frame_rate_flag: ",d.multiple_frame_rate_flag); out_SW_NL (4,"frame_rate_code: ",d.frame_rate_code); out_SB_NL (4,"MPEG_1_only_flag: ",d.MPEG_1_only_flag); out_SB_NL (4,"constrained_parameter_flag: ",d.constrained_parameter_flag); out_SB_NL (4,"still_picture_flag: ",d.still_picture_flag); if (d.MPEG_1_only_flag == 1) { d.profile_and_level_indication = getBits (b, 0, 24, 8); d.chroma_format = getBits (b, 0, 32, 2); d.frame_rate_extension_flag = getBits (b, 0, 34, 1); d.reserved_1 = getBits (b, 0, 35, 5); out_SB_NL (4,"profile_and_level_indication: ",d.profile_and_level_indication); out_SB_NL (4,"chroma_format: ",d.chroma_format); out_SB_NL (4,"frame_rate_extension_flag: ",d.frame_rate_extension_flag); out_SB_NL (6,"reserved_1: ",d.reserved_1); } } /* 0x03 AudioStream descriptor ISO 13818-1 2.6.4 */ void descriptorMPEG_AudioStream (u_char *b) { typedef struct _descAudioStream { u_int descriptor_tag; u_int descriptor_length; u_int free_format_flag; u_int ID; u_int layer; u_int variable_rate_audio_indicator; u_int reserved_1; } descAudioStream; descAudioStream d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.free_format_flag = getBits (b, 0, 16, 1); d.ID = getBits (b, 0, 17, 1); d.layer = getBits (b, 0, 18, 2); d.variable_rate_audio_indicator = getBits (b, 0, 20, 1); d.reserved_1 = getBits (b, 0, 21, 3); out_SB_NL (4,"free_format_flag: ",d.free_format_flag); out_SB_NL (4,"ID: ",d.ID); out_SB_NL (4,"layer: ",d.layer); out_SB_NL (4,"variable_rate_audio_indicator: ",d.variable_rate_audio_indicator); out_SB_NL (6,"reserved_1: ",d.reserved_1); } /* 0x04 Hierarchy descriptor ISO 13818-1 2.6.6 */ void descriptorMPEG_Hierarchy (u_char *b) { typedef struct _descHierarchy { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_int hierarchy_type; u_int reserved_2; u_int hierarchy_layer_index; u_int reserved_3; u_int hierarchy_embedded_layer_index; u_int reserved_4; u_int hierarchy_channel; } descHierarchy; descHierarchy d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 4); d.hierarchy_type = getBits (b, 0, 20, 4); d.reserved_2 = getBits (b, 0, 24, 2); d.hierarchy_layer_index = getBits (b, 0, 26, 6); d.reserved_3 = getBits (b, 0, 32, 2); d.hierarchy_embedded_layer_index = getBits (b, 0, 34, 6); d.reserved_4 = getBits (b, 0, 40, 2); d.hierarchy_channel = getBits (b, 0, 42, 6); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_S2B_NL (4,"hierarchy_type: ",d.hierarchy_type, dvbstrHierarchy_TYPE(d.hierarchy_type)); out_SB_NL (6,"reserved_2: ",d.reserved_2); out_SB_NL (4,"hierarchy_layer_index: ",d.hierarchy_layer_index); out_SB_NL (6,"reserved_3: ",d.reserved_3); out_SB_NL (4,"hierarchy_embedded_layer_index: ",d.hierarchy_embedded_layer_index); out_SB_NL (6,"reserved_4: ",d.reserved_4); out_SB_NL (4,"hierarchy_channel: ",d.hierarchy_channel); } /* 0x05 Registration descriptor ISO 13818-1 2.6.8 */ void descriptorMPEG_Registration (u_char *b) { typedef struct _descRegistration { u_int descriptor_tag; u_int descriptor_length; u_long format_identifier; // N add. info } descRegistration; descRegistration d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.format_identifier = getBits (b, 0, 16, 32); out_S2L_NL (4,"format_identifier: ",d.format_identifier,"see: SC29"); indent(+1); printasciiline_buf (4, b+2, 4); indent(-1); print_databytes (4,"add. info:", b+6, d.descriptor_length -4); } /* 0x06 DataStreamAlignment descriptor ISO 13818-1 2.6.11 */ void descriptorMPEG_DataStreamAlignment (u_char *b) { typedef struct _descDataStreamAlignment { u_int descriptor_tag; u_int descriptor_length; u_int alignment_type; } descDataStreamAlignment; descDataStreamAlignment d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.alignment_type = b[2]; out_SB_NL (4,"alignment_type: ",d.alignment_type); out (4," as VideoStream: (= %s)", dvbstrDataStreamVIDEOAlignment_TYPE(d.alignment_type)); out (4," as AudioStream: (= %s)", dvbstrDataStreamAUDIOAlignment_TYPE(d.alignment_type)); out_NL (4); } /* 0x07 Target Background Grid descriptor ISO 13818-1 2.6.12 */ void descriptorMPEG_TargetBackgroundGrid (u_char *b) { typedef struct _descTBGG { u_int descriptor_tag; u_int descriptor_length; u_int horizontal_size; u_int vertical_size; u_int aspect_ratio_information; } descTBGG; descTBGG d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.horizontal_size = getBits (b, 0, 16, 14); d.vertical_size = getBits (b, 0, 30, 14); d.aspect_ratio_information = getBits (b, 0, 44, 4); out_S2W_NL (4,"horizontal_size: ",d.horizontal_size,"pixel"); out_S2W_NL (4,"vertical_size: ",d.vertical_size,"pixel"); out_S2B_NL (4,"aspect_ratio_information: ", d.aspect_ratio_information, dvbstrAspectRatioInfo_FLAG(d.aspect_ratio_information)); } /* 0x08 Video Window descriptor ISO 13818-1 2.6.14 */ void descriptorMPEG_VideoWindow (u_char *b) { typedef struct _descVidWin { u_int descriptor_tag; u_int descriptor_length; u_int horizontal_offset; u_int vertical_offset; u_int window_priority; } descVidWin; descVidWin d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.horizontal_offset = getBits (b, 0, 16, 14); d.vertical_offset = getBits (b, 0, 30, 14); d.window_priority = getBits (b, 0, 44, 4); out_S2W_NL (4,"horizontal_offset: ",d.horizontal_offset,"pixel"); out_S2W_NL (4,"vertical_offset: ",d.vertical_offset,"pixel"); out_S2B_NL (4,"window_priority: ",d.window_priority,"(15 = highest)"); } /* 0x09 CA descriptor (condition access) */ void descriptorMPEG_CA (u_char *b) { /* IS13818-1 2.6.1 */ typedef struct _descCA { u_int descriptor_tag; u_int descriptor_length; u_int CA_system_ID; u_int reserved; u_int CA_PID; // private data bytes } descCA; descCA d; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.CA_system_ID = getBits (b, 0, 16, 16); d.reserved = getBits (b, 0, 32, 3); d.CA_PID = getBits (b, 0, 35, 13); store_PidToMem (d.CA_PID); out_S2W_NL (4,"CA_system_ID: ",d.CA_system_ID, dvbstrCASystem_ID(d.CA_system_ID)); out_SB_NL (6,"reserved: ",d.reserved); out_SW_NL (4,"CA_PID: ",d.CA_PID); len = d.descriptor_length-4; if (len > 0) { print_private_data (4, b+6,len); } } /* -- 0x0A ISO 639 Language descriptor */ void descriptorMPEG_ISO639_Lang (u_char *b) { /* ISO 13818-1 2.6.19 */ typedef struct _descISO639 { u_int descriptor_tag; u_int descriptor_length; // N ISO639 desc } descISO639; typedef struct _descISO639List { u_char ISO_639_language_code[4]; u_int audio_type; } descISO639List; descISO639 d; descISO639List d2; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; len = d.descriptor_length; b += 2; indent (+1); while ( len > 0) { getISO639_3 (d2.ISO_639_language_code, b); d2.audio_type = getBits (b,0,24,8); b += 4; len -= 4; out_nl (4,"ISO639_language_code: %3.3s", d2.ISO_639_language_code); out_S2B_NL (4,"Audio_type: ", d2.audio_type, dvbstrAudio_TYPE (d2.audio_type)); out_NL(4); } indent (-1); } /* 0x0B System Clock descriptor ISO 13818-1 2.6.xx */ void descriptorMPEG_SystemClock (u_char *b) { typedef struct _descSysClock { u_int descriptor_tag; u_int descriptor_length; u_int external_clock_reference_indicator; u_int reserved_1; u_int clock_accuracy_integer; u_int clock_accuracy_exponent; u_int reserved_2; } descSysClock; descSysClock d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.external_clock_reference_indicator = getBits (b, 0, 16, 1); d.reserved_1 = getBits (b, 0, 17, 1); d.clock_accuracy_integer = getBits (b, 0, 18, 6); d.clock_accuracy_exponent = getBits (b, 0, 24, 3); d.reserved_2 = getBits (b, 0, 27, 5); out_SB_NL (4,"external_clock_reference_indicatior: ", d.external_clock_reference_indicator); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_SB_NL (4,"clock_accuracy_integer: ",d.clock_accuracy_integer); out_SB_NL (4,"clock_accuracy_exponent: ",d.clock_accuracy_exponent); out_nl (4," == : %u * 10^(-%u) ", d.clock_accuracy_integer,d.clock_accuracy_exponent); out_SB_NL (6,"reserved_2: ",d.reserved_2); } /* 0x0C Multiplex Buffer Utilization descriptor ISO 13818-1 2.6.xx */ void descriptorMPEG_MultiplexBufUtil (u_char *b) { typedef struct _descMBU { u_int descriptor_tag; u_int descriptor_length; u_int bound_valid_flag; u_int LTW_offset_lower_bound; u_int reserved_1; u_int LTW_offset_upper_bound; } descMBU; descMBU d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.bound_valid_flag = getBits (b, 0, 16, 1); d.LTW_offset_lower_bound = getBits (b, 0, 17, 15); d.reserved_1 = getBits (b, 0, 32, 1); d.LTW_offset_upper_bound = getBits (b, 0, 33, 15); out_SB_NL (4,"bound_valid_flag: ",d.bound_valid_flag); out_S2W_NL (4,"LTW_offset_lower_bound: ",d.LTW_offset_lower_bound, "(27 MHz/300 clock periods)"); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_S2W_NL (4,"LTW_offset_upper_bound: ",d.LTW_offset_upper_bound, "(27 MHz/300 clock periods)"); } /* 0x0D Copyright descriptor ISO 13818-1 2.6.xx */ void descriptorMPEG_Copyright (u_char *b) { typedef struct _descCopyright { u_int descriptor_tag; u_int descriptor_length; u_long copyright_identifier; // add. info } descCopyright; descCopyright d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.copyright_identifier = getBits (b, 0, 16, 32); out_S2L_NL (4,"copyright_identifier: ",d.copyright_identifier,"see: SC29"); print_databytes (4,"add. info:", b+6, d.descriptor_length -4); } /* 0x0E Maximum Bitrate descriptor ISO 13818-1 2.6.xx */ void descriptorMPEG_MaxBitrate (u_char *b) { typedef struct _descMaxBitrate { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_long maximum_bitrate; } descMaxBitrate; descMaxBitrate d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 2); d.maximum_bitrate = getBits (b, 0, 18, 22); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_nl (4,"maximum_bitrate: %lu (0x%08lx) (= %lu Bytes/sec)", d.maximum_bitrate, d.maximum_bitrate, d.maximum_bitrate * 50); } /* 0x0F Private Data Indicator descriptor ISO 13818-1 2.6.x */ void descriptorMPEG_PrivateDataIndicator (u_char *b) { descriptor_any (b); } /* 0x10 Smoothing Buffer descriptor ISO 13818-1 2.6.30 */ void descriptorMPEG_SmoothingBuf (u_char *b) { typedef struct _descSmoothingBuf { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_long sb_leak_rate; u_int reserved_2; u_long sb_size; } descSmoothingBuf; descSmoothingBuf d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 2); d.sb_leak_rate = getBits (b, 0, 18, 22); d.reserved_2 = getBits (b, 0, 40, 2); d.sb_size = getBits (b, 0, 42, 22); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_nl (4,"sb_leak_rate: %lu (= %lu bits/sec)", d.sb_leak_rate,d.sb_leak_rate/400); out_SB_NL (6,"reserved_2: ",d.reserved_2); out_nl (4,"sb_size: %lu bytes", d.sb_size); } /* 0x11 STD descriptor ISO 13818-1 2.6.32 */ void descriptorMPEG_STD (u_char *b) { typedef struct _descSTD { u_int descriptor_tag; u_int descriptor_length; u_int reserved_1; u_int leak_valid_flag; } descSTD; descSTD d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.reserved_1 = getBits (b, 0, 16, 7); d.leak_valid_flag = getBits (b, 0, 23, 1); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_SB_NL (4,"leak_valid_flag: ",d.leak_valid_flag); } /* 0x12 IBP descriptor ISO 13818-1 2.6.34 */ void descriptorMPEG_IBP (u_char *b) { typedef struct _descIBP { u_int descriptor_tag; u_int descriptor_length; u_int closed_gop_flag; u_int identical_gop_flag; u_int max_gop_length; } descIBP; descIBP d; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.closed_gop_flag = getBits (b, 0, 16, 1); d.identical_gop_flag = getBits (b, 0, 17, 1); d.max_gop_length = getBits (b, 0, 18, 14); out_SB_NL (4,"Closed_gop_flag: ",d.closed_gop_flag); out_SB_NL (4,"Identical_gop_flag: ",d.identical_gop_flag); out_SW_NL (4,"Max_gop_length: ",d.max_gop_length); } /* * ------------------------------------------------------------ * * -- DSM-CC Descriptors ISO 13818-6 TR 102 006 * */ /* 0x13 Carousel Identifier descriptor ISO 13818-6 / TR 102 006 */ void descriptorMPEG_Carousel_Identifier (u_char *b) { typedef struct _descCarouselIdentifier { u_int descriptor_tag; u_int descriptor_length; u_long carousel_id; u_int format_id; // -- optional // FormatSpecifier u_int module_version; u_int module_id; u_int block_size; u_int module_size; u_long CompressionMethod; u_int original_size; u_long timeout; u_int object_key_length; // N... u_int object_key_data; // private data } descCarouselIdentifier; descCarouselIdentifier d; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.carousel_id = getBits (b, 0, 16, 32); d.format_id = getBits (b, 0, 48, 8); b += 7; len = d.descriptor_length - 5; out_SL_NL (4,"Carousel_id: ",d.carousel_id); out_SB_NL (4,"format_id: ",d.format_id); /* $$$$ ??? */ indent (+1); if (d.format_id == 0x01) { // -- TR 101 202 4.7.xx // -- FormatSpecifier d.module_version = getBits (b, 0, 0, 8); d.module_id = getBits (b, 0, 8, 16); d.block_size = getBits (b, 0, 24, 16); d.module_size = getBits (b, 0, 40, 32); d.CompressionMethod = getBits (b, 0, 72, 8); d.original_size = getBits (b, 0, 80, 32); d.timeout = getBits (b, 0,112, 8); d.object_key_length = getBits (b, 0,120, 8); b += 16; len -= 16; out_SB_NL (4,"Module_version: ",d.module_version); /* $$$$ Tables? */ out_SW_NL (4,"Module_id: ",d.module_version); out_SW_NL (4,"Block_size: ",d.block_size); out_SL_NL (4,"Module_size: ",d.module_size); out_SB_NL (4,"Compression_method: ",d.CompressionMethod); out_SL_NL (4,"Original_size: ",d.original_size); out_SB_NL (4,"Timeout: ",d.timeout); out_SB_NL (4,"Object_key_length: ",d.object_key_length); print_databytes (4,"Object_key_data:", b, d.object_key_length); b += d.object_key_length; len -= d.object_key_length; } indent (-1); print_private_data (4, b, len); } /* 0x14 association tag descriptor ISO 13818-6 / TR 102 006 */ void descriptorMPEG_Association_tag (u_char *b) { typedef struct _descAssociationTag { u_int descriptor_tag; u_int descriptor_length; u_int association_tag; u_int use; u_int selector_length; // -- optional // selector_length; u_long transaction_id; u_long timeout; // -- optional // selector_length; // -- optional // selector_length; // selector_bytes; } descAssociationTag; descAssociationTag d; int len; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.association_tag = getBits (b, 0, 16, 16); d.use = getBits (b, 0, 32, 16); d.selector_length = getBits (b, 0, 40, 8); /* normally in the opt branches... */ b += 7; len = d.descriptor_length - 5; out_SW_NL (4,"Association_tag: ",d.association_tag); /* $$$$ Tables? */ out_SW_NL (4,"Use: ",d.use); out_SB_NL (4,"Selector_length: ",d.selector_length); if (d.use == 0x0000) { d.transaction_id = getBits (b, 0, 0, 32); d.timeout = getBits (b, 0, 32, 32); b += 8; len -= 8; out_SL_NL (4,"Transaction_ID: ",d.transaction_id); out_SL_NL (4,"Timeout: ",d.timeout); } else if (d.use == 0x0001) { /* selector length == 0x00; */ } else { print_databytes (4,"Selector bytes:", b, d.selector_length); } print_private_data (4, b, len); } /* 0x15 deferred association tag descriptor ISO 13818-6 / TR 102 006 */ void descriptorMPEG_Deferred_Association_tags (u_char *b) { typedef struct _descDefAssocTags { u_int descriptor_tag; u_int descriptor_length; u_int association_tags_loop_length; // association tag loop u_int association_tag; u_int transport_stream_id; u_int program_number; u_int org_network_id; // private bytes } descDefAssocTags; descDefAssocTags d; int len,i; d.descriptor_tag = b[0]; d.descriptor_length = b[1]; d.association_tags_loop_length = getBits (b, 0, 16, 8); b += 3; len = d.descriptor_length - 1; out_SW_NL (4,"Association_tags_loop_length: ",d.association_tags_loop_length); /* -- association tags */ out_nl (4,"Association tag loop:"); indent (+1); for (i=0; i < d.association_tags_loop_length; ) { d.association_tag = getBits (b, 0, i, 16); out_SW_NL (4,"Association_tag: ",d.association_tag); i += 2; } indent (-1); b += d.association_tags_loop_length; len -= d.association_tags_loop_length; d.transport_stream_id = getBits (b, 0, 0, 16); d.program_number = getBits (b, 0, 16, 16); d.org_network_id = getBits (b, 0, 32, 16); b += 6; len -= 6; out_SW_NL (4,"Transport_stream_ID: ",d.transport_stream_id); out_SW_NL (4,"Program_number: ",d.program_number); out_S2W_NL (4,"Original_network_ID: ",d.org_network_id, dvbstrOriginalNetwork_ID(d.org_network_id)); print_private_data (4, b, len); } /* * ------------------------------------------------------------ * * -- DSM-CC STREAM Descriptors ISO 13818-6 * */ /* 0x17 DSMCC NPT-reference descriptor ISO 13818-6 */ void descriptorMPEG_NPT_reference (u_char *b) { // descriptor_tag = b[0]; // descriptor_length = b[1]; outBit_S2x_NL(4,"postDiscontinuityIndicator: ", b,16, 1, (char *(*)(u_long)) dsmccStr_postDiscontinuityIndicator); outBit_Sx_NL (4,"contentId: ", b,17, 7); outBit_Sx_NL (6,"reserved: ", b,24, 7); outBit64_Sx (4,"STC_Reference: ", b,31,33); out_nl (4," [= ref/300 * 90 kHz]"); outBit_Sx_NL (6,"reserved: ", b,64,31); outBit64_Sx_NL (4,"NPT_Reference: ", b,75,33); outBit_Sx_NL (4,"scaleNumerator: ", b,108,16); outBit_Sx_NL (4,"scaleDenominator: ", b,124,16); } /* 0x18 DSMCC NPT-endpoint descriptor ISO 13818-6 */ void descriptorMPEG_NPT_endpoint (u_char *b) { unsigned long long t; // descriptor_tag = b[0]; // descriptor_length = b[1]; outBit_Sx_NL (6,"reserved: ", b,16,15); t = outBit64_Sx (4,"startNPT: ", b,31,33); out_nl_calc_NPT (4,t); outBit_Sx_NL (6,"reserved: ", b,64,15); t = outBit64_Sx (4,"stopNPT: ", b,79,33); out_nl_calc_NPT (4,t); } /* 0x19 DSMCC stream_mode descriptor ISO 13818-6 */ void descriptorMPEG_stream_mode (u_char *b) { // descriptor_tag = b[0]; // descriptor_length = b[1]; outBit_S2x_NL(4,"streamMode: ", b,16, 8, (char *(*)(u_long)) dsmccStr_streamMode); outBit_Sx_NL (6,"reserved: ", b,24, 8); } /* 0x1A DSMCC stream_event descriptor ISO 13818-6 */ void descriptorMPEG_stream_event (u_char *b) { unsigned long long t; int len; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"eventId: ", b,16,16); outBit_Sx_NL (6,"reserved: ", b,32,31); t = outBit64_Sx (4,"eventNPT: ", b,63,33); out_nl_calc_NPT (4,t); b += 12; len -= 10; print_private_data (4, b, len); } /* * ------------------------------------------------------------ * * -- MPEG4 Descriptors ISO 13818-1 * */ /* 0x1B MPEG4 video descriptor ISO 13818-1 */ void descriptorMPEG_MPEG4_video (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"MPEG4 visual profile and level: ", b,16,8); /* $$$ Table */ } /* 0x1C MPEG4 audio descriptor ISO 13818-1 */ void descriptorMPEG_MPEG4_audio (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"MPEG4 audio profile and level: ", b,16,8); /* $$$ Table */ } /* 0x1D IOD - InitialObjectDescriptor ISO 13818-1 */ void descriptorMPEG_IOD (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"Scope_of_IOD: ", b,16,8); outBit_Sx_NL (4,"IOD_label: ", b,24,8); outBit_Sx_NL (4,"InitialObjectDescriptor: ", b,32,8); // $$$ TODO defined in subclause 8.6.3.1 of ISO/IEC 14496-1 } /* 0x1E SL descriptor ISO 13818-1 */ void descriptorMPEG_SL (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"ES_ID: ", b,16,16); } /* 0x1F FMC descriptor ISO 13818-1 */ void descriptorMPEG_FMC (u_char *b) { int descriptor_length; // d.descriptor_tag = b[0]; descriptor_length = b[1]; b += 2; while (descriptor_length > 0 ) { outBit_Sx_NL (4,"ES_ID: ", b, 0,16); outBit_Sx_NL (4,"FlexMuxChannel: ", b,16, 8); b += 3; descriptor_length -= 3; } } /* 0x20 External SL descriptor ISO 13818-1 */ void descriptorMPEG_External_ES_ID (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"ES_ID: ", b,16,16); } /* 0x21 MuxCode descriptor ISO 13818-1 */ void descriptorMPEG_MuxCode (u_char *b) { int len; // tag = b[0]; len = b[1]; print_databytes (4,"MuxCodeTableEntry", b+2, len); // $$$ TODO // $$$ TODO defined in subclause 11.2.4.3 of ISO/IEC 14496-1. // Muxcode_descriptor () { // descriptor_tag 8 uimsbf // descriptor_length 8 uimsbf // for (i = 0; i < N; i++) { // MuxCodeTableEntry () // } // } } /* 0x22 FMX Buffer Size descriptor ISO 13818-1 */ void descriptorMPEG_FMXBufferSize (u_char *b) { int len; // tag = b[0]; len = b[1]; indent (+1); printhex_buf (4, b+2, len); // $$$ TODO indent (-1); // $$$ TODO defined in subclause 11.2 of ISO/IEC 14496-1. // FmxBufferSize_descriptor () { // descriptor_tag 8 uimsbf // descriptor_length 8 uimsbf // DefaultFlexMuxBufferDescriptor() // for (i=0; i= 3) && (ctbi <= 7)) { u_int len2; len2 = outBit_Sx_NL (4,"time_base_association_data_length: ", b, 0, 8); print_databytes (6,"reserved:", b+1, len2); b += len2 + 1; len -= len2 + 1; } print_private_data (4, b, len); } /* 0x25 TVA metadata pointer descriptor TS 102 323 TV ANYTIME */ void descriptorMPEG_TVA_metadata_pointer (u_char *b) { int len; // tag = b[0]; len = b[1]; indent (+1); printhex_buf (4, b+2, len); // $$$ TODO TS 102 323, where defined? indent (-1); } /* 0x26 TVA metadata descriptor TS 102 323 TV ANYTIME */ void descriptorMPEG_TVA_metadata (u_char *b) { int len; // tag = b[0]; len = b[1]; indent (+1); printhex_buf (4, b+2, len); // $$$ TODO TS 102 323, where defined? indent (-1); } /* 0x27 TVA metadata STD descriptor ISO/IEC 13818-1:2000/DAM-1:2001(E) */ void descriptorMPEG_TVA_metadata_STD (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (6,"reserved: ", b, 16, 2); outBit_S2Tx_NL (4,"metadata_input_leak_rate: ", b, 18, 22,"(x 400 bit/s)"); outBit_Sx_NL (6,"reserved: ", b, 40, 2); outBit_S2Tx_NL (4,"metadata_buffer_size: ", b, 42, 22,"(x 1024 bytes)"); outBit_Sx_NL (6,"reserved: ", b, 64, 2); outBit_S2Tx_NL (4,"metadata_output_leak_rate: ", b, 66, 22,"(x 400 bit/s)"); } /* 0x28 AVC video descriptor H.222.0 AMD 3 */ void descriptorMPEG_AVC_video (u_char *b) { int len; // tag = b[0]; len = b[1]; indent (+1); printhex_buf (4, b+2, len); // $$$ TODO indent (-1); } /* 0x29 IPMP descriptor H.222.0 AMD 3 */ void descriptorMPEG_IPMP (u_char *b) { int len; // tag = b[0]; len = b[1]; indent (+1); printhex_buf (4, b+2, len); // $$$ TODO indent (-1); } /* 0x2A AVC_timing_and_HRD descriptor H.222.0 AMD 3 */ void descriptorMPEG_AVC_timing_and_HRD (u_char *b) { int len; // tag = b[0]; len = b[1]; indent (+1); printhex_buf (4, b+2, len); // $$$ TODO indent (-1); } /* 0x2B MPEG-2_AAC_audio descriptor H.222.0 AMD 4 ISO/IEC 13818-1:2000/Amd.5:2005 (E) */ void descriptorMPEG_MPEG2_AAC_audio (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"MPEG-2_AAC_profile: ", b, 16, 8); // $$$ TODO: ISO/IEC 13818-7:2004 subclause 7.1 Table 31. outBit_Sx_NL (4,"MPEG-2_AAC_channel_configuration: ", b, 24, 8); // $$$ TODO: ISO/IEC 13818-7:2004 subclause 8.9 Table 42 outBit_Sx_NL (4,"MPEG-2_AAC_additional_information: ", b, 32, 8); // $$$ TODO: ISO/IEC 13818-7:2004 is embedded in the AAC bitstream according to Table Amd.5-2. } /* 0x2C Flex-Mux-Timing descriptor ITU-T H.222.0-I-Cor1 */ void descriptorMPEG_FlexMuxTiming (u_char *b) { // d.descriptor_tag = b[0]; // d.descriptor_length = b[1]; outBit_Sx_NL (4,"FCR_ES_ID: ", b,16,16); outBit_S2Tx_NL (4,"FCRResolution: ", b,32,32,"(cycles/s)"); outBit_Sx_NL (4,"FCRLength: ", b,64, 8); outBit_Sx_NL (4,"FCRRateLength: ", b,72, 8); } dvbsnoop-1.4.50/src/descriptors/dsmcc_carousel_descriptor.c0000744000076400001440000002054110373750007017641 /* $Id: dsmcc_carousel_descriptor.c,v 1.25 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space DSM-CC -- DSM-CC Descriptors -- ISO 13818-6 // TR 102 006 // TS 102 812 $Log: dsmcc_carousel_descriptor.c,v $ Revision 1.25 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.24 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.23 2004/11/03 21:00:50 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.22 2004/02/24 23:03:05 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.21 2004/02/20 22:18:38 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.20 2004/02/17 23:54:13 rasc Bug (not fixed yet): DSM-CC DII Carousel Descriptor Loop is strange Revision 1.19 2004/02/15 20:46:10 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.18 2004/02/15 01:01:02 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.17 2004/02/09 21:24:57 rasc AIT descriptors minor redesign on output routines Revision 1.16 2004/01/22 22:58:29 rasc deleting modul (again?) somehow obsolete module re-appeared??? (or I forgot something) Revision 1.15 2004/01/11 21:01:31 rasc PES stream directory, PES restructured Revision 1.14 2004/01/02 22:59:59 rasc DSM-CC modules renaming... Revision 1.13 2004/01/02 22:25:35 rasc DSM-CC MODULEs descriptors complete Revision 1.12 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.11 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.10 2003/12/27 18:17:17 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.9 2003/11/01 21:40:27 rasc some broadcast/linkage descriptor stuff Revision 1.8 2003/10/29 20:54:56 rasc more PES stuff, DSM descriptors, testdata */ #include "dvbsnoop.h" #include "descriptor.h" #include "dsmcc_carousel_descriptor.h" #include "dsmcc_int_unt_descriptor.h" #include "private/userdefs.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" /* determine descriptor type and print it... !!! DSMCC_CAROUSEL descriptors are in a private tag space !!! The userInfo field of BIOP::ModuleInfo shall be structured as a loop of descriptors which enables the use of Module descriptors as defined in DVB Data Carousels. return byte length */ int descriptorDSMCC_CAROUSEL (u_char *b) { int len; int tag; out_NL (4); tag = outBit_S2x_NL (4,"DSM-CC_CAROUSEL-DescriptorTag: ", b, 0, 8, (char *(*)(u_long))dsmccStrDSMCC_CAROUSEL_DescriptorTAG); len = outBit_Sx_NL (4,"descriptor_length: ", b, 8, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor printhex_buf (9, b,len+2); switch (tag) { case 0x01: descriptorDSMCC_type (b); break; case 0x02: descriptorDSMCC_name (b); break; case 0x03: descriptorDSMCC_info (b); break; case 0x04: descriptorDSMCC_module_link (b); break; case 0x05: descriptorDSMCC_crc32 (b); break; case 0x06: descriptorDSMCC_location (b); break; case 0x07: descriptorDSMCC_est_download_time (b); break; case 0x08: descriptorDSMCC_group_link (b); break; case 0x09: descriptorDSMCC_compressed_module (b); break; case 0x0A: descriptorDSMCC_subgroup_association (b); break; // MHP case 0x70: descriptorDSMCC_MHP_label (b); break; case 0x71: descriptorDSMCC_MHP_caching_priority (b); break; case 0x72: descriptorDSMCC_MHP_content_type (b); break; default: if (tag < 0x80) { out_nl (0," ----> ERROR: unimplemented descriptor (DSM-CC_CAROUSEL context), Report!"); } descriptor_PRIVATE (b,DSMCC_CAROUSEL); break; } return len+2; // (descriptor total length) } /* * EN 301 192 / TR 102 006 * private DSM-CC CAROUSEL descriptors * * 0x00 - 0x0A currently allocated by DVB * 0x0B - 0x6F reserved for future use by DVB * 0x70 - 0x7F reserved for DVB MHP * 0x80 - 0xFF private descriptors * * e.g.: * The userInfo field of BIOP::ModuleInfo shall be structured as a * loop of descriptors which enables the use of Module descriptors * as defined in DVB Data Carousels. */ /* 0x01 - type ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_type (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; print_std_ascii (4, "Text: ", b+2, len); } /* 0x02 - name ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_name (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; print_text_468A (4, "Text: ", b+2, len); } /* 0x03 - info ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_info (u_char *b) { int len; u_char ISO639_language_code[4]; // descriptor_tag = b[0]; len = b[1]; getISO639_3 (ISO639_language_code, b+2); out_nl (4," ISO639_language_code: %3.3s", ISO639_language_code); print_text_468A (4, "Text: ", b+5, len-3); } /* 0x04 - module_link ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_module_link (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2x_NL(4,"position: ", b,16, 8, (char *(*)(u_long)) dsmccStr_GroupModuleLinkPosition); outBit_Sx_NL (4,"module_id: ", b,24,16); } /* 0x05 - crc ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_crc32 (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_Sx_NL (4,"CRC: ", b,16,32); } /* 0x06 - location ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_location (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2Tx_NL (4,"location: ", b,16, 8, "--> refers to component_tag in stream_identifier_descriptor"); } /* 0x07 - est_download_time ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_est_download_time (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2Tx_NL (4,"est_download_time: ", b,16, 32, "(seconds)"); } /* 0x08 - group link ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_group_link (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2x_NL(4,"position: ", b,16, 8, (char *(*)(u_long)) dsmccStr_GroupModuleLinkPosition); outBit_Sx_NL (4,"group_id: ", b,24,32); } /* 0x09 - compressed_module ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_compressed_module (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2x_NL(4,"compression_method: ", b,16, 8, (char *(*)(u_long)) dsmccStr_compression_method); outBit_S2Tx_NL (4,"original_size: ", b,24,32, "(bytes)"); // Module data stored in the following structure: // zlib structure(){ // compression_method 1 // flags_check 1 // compressed_data n // check value 4 // } } /* 0x0A - subgroup_association ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_subgroup_association (u_char *b) { descriptorDSMCC_ssu_subgroup_association (b); } /* 0x70 - MHP label descriptor ETSI TS 102 812 v 1.2.1 */ void descriptorDSMCC_MHP_label (u_char *b) { int len; // tag = b[0]; len = b[1]; print_text_UTF8 (4, "label: ", b+2, len); } /* 0x71 - MHP caching priority descriptor ETSI TS 102 812 v 1.2.1 */ void descriptorDSMCC_MHP_caching_priority (u_char *b) { // tag = b[0]; // len = b[1]; outBit_Sx_NL (4,"priority_value: ", b, 16, 8); outBit_S2x_NL(4,"transparency_level: ", b, 24, 8, (char *(*)(u_long)) dsmccStrMHP_caching_transparency_level); } /* 0x72 - MHP content type descriptor ETSI TS 102 812 v 1.2.1 */ void descriptorDSMCC_MHP_content_type (u_char *b) { int len; // tag = b[0]; len = b[1]; print_text_UTF8 (4, "content_type_data: ", b+2, len); } dvbsnoop-1.4.50/src/descriptors/dsmcc_int_unt_descriptor.c0000744000076400001440000004107210373750007017506 /* $Id: dsmcc_int_unt_descriptor.c,v 1.22 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space DSM-CC INT UNT -- DSM-CC Descriptors ISO 13818-6 // EN 301 192 // TS 102 006 $Log: dsmcc_int_unt_descriptor.c,v $ Revision 1.22 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.21 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.20 2004/11/03 21:00:50 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.19 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.18 2004/08/04 21:58:41 rasc BugFix: IPv6 (INT) descriptor display, got wrong values Revision 1.17 2004/04/15 03:38:50 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.16 2004/02/20 22:18:39 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.15 2004/02/09 21:24:57 rasc AIT descriptors minor redesign on output routines Revision 1.14 2004/01/03 00:30:06 rasc DSM-CC STREAM descriptors module (started) Revision 1.13 2004/01/02 22:59:59 rasc DSM-CC modules renaming... Revision 1.12 2004/01/02 22:25:35 rasc DSM-CC MODULEs descriptors complete Revision 1.11 2004/01/02 16:40:34 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.10 2004/01/02 02:18:34 rasc more DSM-CC INT/UNT descriptors Revision 1.9 2004/01/01 20:31:22 rasc PES program stream map, minor descriptor cleanup Revision 1.8 2004/01/01 20:09:19 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.7 2003/12/29 22:14:53 rasc more dsm-cc INT UNT descriptors Revision 1.6 2003/12/28 00:01:14 rasc some minor changes/adds... Revision 1.5 2003/12/27 22:02:43 rasc dsmcc INT UNT descriptors started Revision 1.4 2003/12/27 18:17:17 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.3 2003/12/27 14:35:00 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.2 2003/11/01 21:40:27 rasc some broadcast/linkage descriptor stuff Revision 1.1 2003/10/29 20:56:18 rasc more PES stuff, DSM descriptors, testdata */ #include "dvbsnoop.h" #include "descriptor.h" #include "dsmcc_int_unt_descriptor.h" #include "dvb_descriptor.h" #include "private/userdefs.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" #include "misc/helper.h" #include "misc/pkt_time.h" /* determine descriptor type and print it... !!! DSMCC INT/UNT descriptors are in a private tag space !!! EN 301 192: Descriptors from the DVB SI range (0x40 - 0x7F) shall have their standard semantics as defined in EN 300 468 [2]. Equally MPEG descriptors in the range 0x00 - 0x3F can not be used in the INT. Note that descriptor tags from 0x00 to 0x3F share a common descriptor name space with UNT descriptors (see TS 102 006 [19]). All descriptors may appear more than once in the INT sub-table at the locations indicated above. In the case of name_descriptors multiple occurrences require different ISO 639 language codes. return byte length */ int descriptorDSMCC_INT_UNT (u_char *b) { int len; int tag; out_NL (4); tag = outBit_S2x_NL (4,"DSM_CC-INT-UNT-DescriptorTag: ", b, 0, 8, (char *(*)(u_long))dsmccStrDSMCC_INT_UNT_DescriptorTAG); len = outBit_Sx_NL (4,"descriptor_length: ", b, 8, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor printhex_buf (9, b,len+2); switch (tag) { case 0x01: descriptorDSMCC_scheduling (b); break; case 0x02: descriptorDSMCC_update (b); break; case 0x03: descriptorDSMCC_ssu_location (b); break; case 0x04: descriptorDSMCC_message (b); break; case 0x05: descriptorDSMCC_ssu_event_name (b); break; case 0x06: descriptorDSMCC_target_smartcard (b); break; case 0x07: descriptorDSMCC_target_MAC_address (b); break; case 0x08: descriptorDSMCC_target_serial_number (b); break; case 0x09: descriptorDSMCC_target_IP_address (b); break; case 0x0A: descriptorDSMCC_target_IPv6_address (b); break; case 0x0B: descriptorDSMCC_ssu_subgroup_association (b); break; case 0x0C: descriptorDSMCC_IP_MAC_platform_name (b); break; case 0x0D: descriptorDSMCC_IP_MAC_platform_provider_name (b); break; case 0x0E: descriptorDSMCC_target_MAC_address_range (b); break; case 0x0F: descriptorDSMCC_target_IP_slash (b); break; case 0x10: descriptorDSMCC_target_IP_source_slash (b); break; case 0x11: descriptorDSMCC_target_IPv6_slash (b); break; case 0x12: descriptorDSMCC_target_IPv6_source_slash (b); break; case 0x13: descriptorDSMCC_IP_MAC_StreamLocation (b); break; case 0x14: descriptorDSMCC_ISP_access_mode (b); break; // DVB SI scope... case 0x57: descriptorDVB_Telephone (b); break; case 0x5F: descriptorDVB_PrivateDataSpecifier (b); break; default: if (tag < 0x80) { out_nl (0," ----> ERROR: unimplemented descriptor (DSM-CC INT/UNT context), Report!"); } descriptor_PRIVATE (b,DSMCC_INT_UNT); break; } return len+2; // (descriptor total length) } /* * EN 301 192 / TR 102 006 * private DSM-CC INT UNT descriptors */ /* 0x01 - scheduling ETSI TS 102 006 (ISO 13818-6) */ void descriptorDSMCC_scheduling (u_char *b) { int len; int x; u_long UTC_time_MJD; u_long UTC_time_UTC; // descriptor_tag = b[0]; len = b[1]; UTC_time_MJD = getBits (b, 0, 16, 16); UTC_time_UTC = getBits (b, 0, 32, 24); out (4,"start_date_time: "); print_time40 (4, UTC_time_MJD,UTC_time_UTC); out_NL (4); UTC_time_MJD = getBits (b, 0, 56, 16); UTC_time_UTC = getBits (b, 0, 72, 24); out (4,"end_date_time: "); print_time40 (4, UTC_time_MJD,UTC_time_UTC); out_NL (4); x = outBit_Sx (4,"final_availability: ", b,96, 1); if (x == 1) out_nl (4," [= final schedule]"); else out_NL (4); x = outBit_Sx (4,"periodicity_flag: ", b,97, 1); if (x == 1) out_nl (4," [= only available between start/end time]"); else out_NL (4); outBit_S2x_NL (4,"period_unit: ", b, 98, 2, (char *(*)(u_long)) dsmccStr_TimeUnits); outBit_S2x_NL (4,"duration_unit: ", b,100, 2, (char *(*)(u_long)) dsmccStr_TimeUnits); outBit_S2x_NL (4,"estimated_cycle_time_unit: ",b,102, 2, (char *(*)(u_long)) dsmccStr_TimeUnits); outBit_Sx_NL (4,"period: ", b,104, 8); outBit_Sx_NL (4,"duration: ", b,112, 8); outBit_Sx_NL (4,"estimated_cycle_time: ", b,120, 8); print_private_data (4,b+16,len-14); } /* 0x02 - update ETSI TS 102 006 (ISO 13818-6) */ void descriptorDSMCC_update (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; outBit_S2x_NL (4,"update_flag: ", b,16, 2, (char *(*)(u_long)) dsmccStr_UpdateFlag ); outBit_S2x_NL (4,"update_method: ", b,18, 4, (char *(*)(u_long)) dsmccStr_UpdateMethod ); outBit_S2Tx_NL (4,"update_priority: ", b,22, 2, "0=highest"); print_private_data (4,b+3,len-1); } /* 0x03 - ssu_location ETSI TS 102 006 (ISO 13818-6) */ void descriptorDSMCC_ssu_location (u_char *b) { int len; int id; // descriptor_tag = b[0]; len = b[1]; id = outBit_S2x_NL (4,"data_broadcast_id: ", b,16, 16, (char *(*)(u_long)) dvbstrDataBroadcast_ID ); if (id == 0x000A) { outBit_Sx_NL (4,"association_tag: ", b,32, 16); len -= 2; b += 2; } print_private_data (4,b+4,len-2); } /* 0x04 - message ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_message(u_char *b) { int len; u_char ISO639_language_code[4]; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"descriptor_number: ", b,16, 4); outBit_Sx_NL (4,"last_descriptor_number: ", b,20, 4); getISO639_3 (ISO639_language_code, b+3); out_nl (4," ISO639_language_code: %3.3s", ISO639_language_code); print_text_468A (4, "Text: ", b+6, len-4); } /* 0x05 - ssu_event_name ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_ssu_event_name (u_char *b) { int len; u_char ISO639_language_code[4]; // descriptor_tag = b[0]; // len = b[1]; getISO639_3 (ISO639_language_code, b+2); out_nl (4," ISO639_language_code: %3.3s", ISO639_language_code); len = outBit_Sx_NL (4,"name_length: ", b,40, 8); print_std_ascii (4, "SSU_event_name: ", b+6, len); b += 6+len; len = outBit_Sx_NL (4,"text_length: ", b, 0, 8); print_text_468A (4, "MessageText: ", b+1, len); } /* 0x06 - target_smartcard ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_smartcard (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"Super_CA_system_id: ", b,16,32); // $$$ TODO ? TS 101 197 print_private_data (4,b+6,len-4); } /* 0x07 - MAC_address ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_MAC_address (u_char *b) { int len; long mac_H, mac_L; // descriptor_tag = b[0]; len = b[1]; mac_H = getBits (b, 0, 16, 24); mac_L = getBits (b, 0, 40, 24); out (4,"Mac_addr_mask: %06lx%06lx [= ",mac_H, mac_L); displ_mac_addr (4, mac_H, mac_L); out_nl (4,"]"); b += 8; len -= 6; while (len > 0) { mac_H = getBits (b, 0, 0, 24); mac_L = getBits (b, 0, 24, 24); out (4,"Mac_addr: %06lx%06lx [= ",mac_H, mac_L); displ_mac_addr (4, mac_H, mac_L); out_nl (4,"]"); b += 6; len -= 6; } } /* 0x08 - target_serial_number ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_serial_number (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; print_databytes (4,"Serial Data Bytes:", b+2,len); } /* 0x09 - IP_address ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_IP_address (u_char *b) { int len; u_long ip; // descriptor_tag = b[0]; len = b[1]; ip = getBits (b, 0, 16, 32); out (4,"IPv4_addr_mask: %08lx [= ",ip); displ_IPv4_addr (4, ip); out_nl (4,"]"); b += 6; len -= 4; while (len > 0) { ip = getBits (b, 0, 0, 32); out (4,"IPv4_addr: %08lx [= ",ip); displ_IPv4_addr (4, ip); out_nl (4,"]"); b += 4; len -= 4; } } /* 0x0A - IPv6_address ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_IPv6_address (u_char *b) { int len; struct IPv6ADDR x; // descriptor_tag = b[0]; len = b[1]; getIPv6Addr (b+2, &x); out (4,"IPv6_addr_mask: %08lx%08lx%08lx%08lx [= ", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); displ_IPv6_addr (4, &x); out_nl (4,"]"); b += 18; len -= 16; while (len > 0) { getIPv6Addr (b, &x); out (4,"IPv6_addr_mask: %08lx%08lx%08lx%08lx [= ", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); displ_IPv6_addr (4, &x); out_nl (4,"]"); b += 16; len -= 16; } } /* 0x0B - ssu_subgroup_association ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_ssu_subgroup_association (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_Sx (4,"subgroup_tag: ", b, 16, 24); outBit_Sx_NL (4," ", b, 40, 16); // TS 102 006: // subgroup_tag (40 bit): the least significant 16 bits of this field shall // contain the same value as the subgroup_association_descriptor in // the GroupInfoBytes in the GroupInfoIndication structure of the // DSI message. This is a unique value under the defining authority // of the holder of the OUI conveyed in the field's most significant // 24 bits. // Note that no relationship between this OUI and any other OUI // in the system is implied. } /* 0x0C - IP/MAC_platform_name ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_IP_MAC_platform_name (u_char *b) { int len; u_char ISO639_language_code[4]; // descriptor_tag = b[0]; len = b[1]; getISO639_3 (ISO639_language_code, b+2); out_nl (4," ISO639_language_code: %3.3s", ISO639_language_code); print_text_468A (4, "Text: ", b+2+3, len-3); } /* 0x0D - IP/MAC_platform_provider_name ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_IP_MAC_platform_provider_name (u_char *b) { descriptorDSMCC_IP_MAC_platform_name (b); // same encoding... } /* 0x0E - target_MAC_address_range ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_MAC_address_range (u_char *b) { int len; long mac_H, mac_L; // descriptor_tag = b[0]; len = b[1]; b += 2; while (len > 0) { mac_H = getBits (b, 0, 0, 24); mac_L = getBits (b, 0, 24, 24); out (4,"Mac_addr_low: %06lx%06lx [= ",mac_H, mac_L); displ_mac_addr (4, mac_H, mac_L); out_nl (4,"]"); mac_H = getBits (b, 0, 48, 24); mac_L = getBits (b, 0, 72, 24); out (4,"Mac_addr_high: %06lx%06lx [= ",mac_H, mac_L); displ_mac_addr (4, mac_H, mac_L); out_nl (4,"]"); b += 12; len -= 12; } } /* 0x0F - IP_slash ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_IP_slash (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; while (len > 0) { u_long ip; int mask; ip = outBit_Sx_NL (4,"IPv4_addr: ", b, 0,32); mask = outBit_Sx_NL (4,"IPv4_slash_mask: ", b,32, 8); out (4," [= "); displ_IPv4_addr (4, ip); out_nl (4,"/%d]",mask); b += 5; len -= 5; } } /* 0x10 - IP_source_slash ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_IP_source_slash (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; while (len > 0) { u_long ip; int mask; ip = outBit_Sx_NL (4,"IPv4_source_addr: ", b, 0,32); mask = outBit_Sx_NL (4,"IPv4_source_slash_mask: ", b,32, 8); out (4," [= "); displ_IPv4_addr (4, ip); out_nl (4,"/%d]",mask); ip = outBit_Sx_NL (4,"IPv4_dest_addr: ", b,40,32); mask = outBit_Sx_NL (4,"IPv4_dest_slash_mask: ", b,72, 8); out (4," [= "); displ_IPv4_addr (4, ip); out_nl (4,"/%d]",mask); b += 10; len -= 10; } } /* 0x11 - IPv6_slash ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_IPv6_slash (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; while (len > 0) { struct IPv6ADDR x; int mask; getIPv6Addr (b, &x); out_nl (4,"IPv6_addr_mask: %08lx%08lx%08lx%08lx", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); mask = outBit_Sx_NL (4,"IPv6_slash_mask: ", b,128, 8); out (4," [= "); displ_IPv6_addr (4, &x); out_nl (4,"/%d]",mask); b += 17; len -= 17; } } /* 0x12 - IPv6_source_slash ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_target_IPv6_source_slash (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; while (len > 0) { struct IPv6ADDR x; int mask; getIPv6Addr (b, &x); out_nl (4,"IPv6_source_addr: %08lx%08lx%08lx%08lx", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); mask = outBit_Sx_NL (4,"IPv6_source_slash_mask: ", b,128, 8); out (4," [= "); displ_IPv6_addr (4, &x); out_nl (4,"/%d]",mask); b += 17; len -= 17; getIPv6Addr (b, &x); out_nl (4,"IPv6_dest_addr: %08lx%08lx%08lx%08lx", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); mask = outBit_Sx_NL (4,"IPv6_dest_slash_mask: ", b,128, 8); out (4," [= "); displ_IPv6_addr (4, &x); out_nl (4,"/%d]",mask); b += 17; len -= 17; } } /* 0x13 - IP_MAC_StreamLocation ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_IP_MAC_StreamLocation (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2x_NL (4,"Network_id: ", b, 16, 16, (char *(*)(u_long)) dvbstrNetworkIdent_ID); outBit_S2x_NL (4,"Original_network_id: ", b, 32, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_Sx_NL (4,"transport_stream_ID: ", b, 48, 16); outBit_Sx (4,"service_ID: ", b, 64, 16); out_nl (4," --> refers to PMT program_number"); outBit_Sx_NL (4,"component_tag: ", b, 80, 8); } /* 0x14 - ISP_access_mode ETSI EN 301 192 (ISO 13818-6) */ void descriptorDSMCC_ISP_access_mode (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; outBit_S2x_NL (4,"Access_mode: ", b, 16, 8, (char *(*)(u_long)) dsmccStr_AccessMode ); } dvbsnoop-1.4.50/src/descriptors/mhp_ait_descriptor.c0000744000076400001440000003350610373750007016301 /* $Id: mhp_ait_descriptor.c,v 1.15 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space MHP AIT -- TS 102 812 v1.2.1 10.11 $Log: mhp_ait_descriptor.c,v $ Revision 1.15 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.14 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.13 2004/11/03 21:00:50 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.12 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.11 2004/07/24 11:44:44 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.10 2004/05/24 20:18:17 rasc bugfix: AIT descriptor transport_protocol_label (reported by Stéphane Esté-Gracias) Revision 1.9 2004/04/15 03:38:50 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.8 2004/02/21 00:50:40 rasc bugfix: MHP AIT descriptors Revision 1.7 2004/02/20 22:18:39 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.6 2004/02/15 01:01:03 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.5 2004/02/12 21:21:20 rasc MHP AIT descriptors some smaller changes Revision 1.4 2004/02/11 20:27:32 rasc MHP AIT descriptors... Revision 1.3 2004/02/10 22:57:54 rasc MHP descriptor, missing DVB descriptor done Revision 1.2 2004/02/09 21:24:58 rasc AIT descriptors minor redesign on output routines Revision 1.1 2004/02/07 01:28:01 rasc MHP Application Information Table some AIT descriptors */ #include "dvbsnoop.h" #include "descriptor.h" #include "mhp_ait_descriptor.h" #include "dvb_descriptor.h" #include "private/userdefs.h" #include "datacarousel/mhp_misc.h" #include "strings/dvb_str.h" #include "strings/dsmcc_str.h" #include "misc/hexprint.h" #include "misc/output.h" /* determine descriptor type and print it... !!! MHP AIT descriptors are in a private tag space !!! return byte length */ int descriptorMHP_AIT (u_char *b) { int len; int tag; out_NL (4); tag = outBit_S2x_NL (4,"MHP_AIT-DescriptorTag: ", b, 0, 8, (char *(*)(u_long))dsmccStrMHP_AIT_DescriptorTAG); len = outBit_Sx_NL (4,"descriptor_length: ", b, 8, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor printhex_buf (9, b,len+2); switch (tag) { case 0x00: descriptorMHP_AIT_application (b); break; case 0x01: descriptorMHP_AIT_application_name (b); break; case 0x02: descriptorMHP_AIT_transport_protocol (b); break; case 0x03: descriptorMHP_AIT_dvb_j_application (b); break; case 0x04: descriptorMHP_AIT_dvb_j_application_location (b); break; case 0x05: descriptorMHP_AIT_external_application_authorisation (b); break; // case 0x06: reserved // case 0x07: reserved case 0x08: descriptorMHP_AIT_dvb_html_application (b); break; case 0x09: descriptorMHP_AIT_dvb_html_application_location (b); break; case 0x0A: descriptorMHP_AIT_dvb_html_application_boundary (b); break; case 0x0B: descriptorMHP_AIT_application_icons (b); break; case 0x0C: descriptorMHP_AIT_pre_fetch (b); break; case 0x0D: descriptorMHP_AIT_DII_location (b); break; case 0x0E: descriptorMHP_AIT_delegated_application (b); break; case 0x0F: descriptorMHP_AIT_plug_in (b); break; case 0x10: descriptorMHP_AIT_application_storage (b); break; case 0x11: descriptorMHP_AIT_ip_signalling (b); break; case 0x5F: descriptorDVB_PrivateDataSpecifier (b); break; default: if (tag < 0x80) { out_nl (0," ----> ERROR: unimplemented descriptor (MHP_AIT context), Report!"); } descriptor_PRIVATE (b,MHP_AIT); break; } return len+2; // (descriptor total length) } // // Unless otherwise specfied, all fields interpreted as text strings in the AIT // shall be encoded as UTF8 (see 7.1.5, "Monomedia format for text"on page 54). // See also 14.5, "Text encoding of application identifiers" on page 222. // /* 0x00 - application ETSI TS 102 812 */ void descriptorMHP_AIT_application (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; len2 = outBit_Sx_NL (4,"application_profile_length: ", b, 16, 8); b += 3; len -= 1; indent (+1); while (len2 > 0) { int x; out_NL(4); x = mhp_application_profile_version (4, b); b += x; len -= x; len2 -= x; } out_NL(4); indent (-1); outBit_Sx_NL (4,"service_bound_flag: ", b, 0, 1); outBit_S2x_NL(4,"visibility: ", b, 1, 2, (char *(*)(u_long)) dsmccStrMHP_visibility_state ); outBit_Sx_NL (4,"reserved: ", b, 3, 5); outBit_Sx_NL (4,"application_priority: ", b, 8, 8); b += 2; len -= 2; while (len > 0) { outBit_Sx_NL (4,"transport_protocol_label: ", b, 0, 8); b++; len--; } } /* 0x01 - application name ETSI TS 102 812 */ void descriptorMHP_AIT_application_name (u_char *b) { int len; u_char ISO639_language_code[4]; // descriptor_tag = b[0]; len = b[1]; b += 2; indent (+1); while (len > 0) { int len2; getISO639_3 (ISO639_language_code, b); out_nl (4,"ISO639_language_code: %3.3s", ISO639_language_code); len2 = outBit_Sx_NL (4,"application_name_length: ", b, 24, 8); print_text_468A (4, "application_name: ", b+4, len2); b += 4 + len2; len -= 4 + len2; out_NL (4); } indent (-1); } /* 0x02 - transport_protocol ETSI TS 102 812 */ void descriptorMHP_AIT_transport_protocol (u_char *b) { int len; int p_id; // descriptor_tag = b[0]; len = b[1]; p_id = outBit_S2x_NL (4,"protocol_id: ", b, 16, 16, (char *(*)(u_long)) dsmccStrMHP_protocol_id); outBit_Sx_NL (4,"transport_protocol_label: ", b, 32, 8); b += 5; len -= 3; // -- 0x0001 = Transport via OC // -- 0x0002 = Transport via IP // -- 0x0003 = Transport via interaction channel if (p_id == 0x0001 || p_id == 0x0002) { int remote_conn; remote_conn = outBit_Sx_NL (4,"remote_connection: ", b, 0, 1); outBit_Sx_NL (6,"reserved: ", b, 1, 7); b++; len--; if (remote_conn == 0x01) { // $$$ TODO reminder: this code part is used several time outBit_S2x_NL (4,"Original_network_id: ", b, 0, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_Sx_NL (4,"transport_stream_ID: ", b, 16, 16); outBit_S2Tx_NL(4,"service_ID: ", b, 32, 16, " --> refers to PMT program_number"); b += 6; len -= 6; } if (p_id == 0x0001) { // -- Transport via OC outBit_Sx_NL (4,"component_tag: ", b, 0, 8); b++; len--; } else { // -- Transport via IP outBit_Sx_NL (4,"alignment_indicator: ", b, 0, 1); outBit_Sx_NL (6,"reserved: ", b, 1, 7); b++; len--; while (len > 0) { int len2; out_NL (4); len2 = outBit_Sx_NL (4,"URL_length: ", b, 0, 8); print_text_UTF8 (4, "URL: ", b+1, len2); b += 1+len2; len -= 1+len2; } } } if (p_id == 0x0003) { int len2; out_NL (4); len2 = outBit_Sx_NL (4,"URL_base_length: ", b, 0, 8); print_text_UTF8 (4, "URL_base: ", b+1, len2); b += 1+len2; len -= 1+len2; while (len > 0) { int len2; out_NL (4); len2 = outBit_Sx_NL (4,"URL_extension_length: ", b, 0, 8); print_text_UTF8 (4, "URL_extension: ", b+1, len2); b += 1+len2; len -= 1+len2; } } else { // -- all other print_databytes(4,"selector_bytes:", b, len); } } /* 0x03 - DVB-J Application ETSI TS 102 812 */ void descriptorMHP_AIT_dvb_j_application (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; indent (+1); while (len > 0) { int len2; len2 = outBit_Sx_NL (4,"parameter_length: ", b, 0, 8); print_text_UTF8 (4, "Parameter: ", b+1, len2); b += len2+1; len -= len2+1; } indent (-1); } /* 0x04 - DVB-J Application Location ETSI TS 102 812 */ void descriptorMHP_AIT_dvb_j_application_location (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; b += 2; len2 = outBit_Sx_NL (4,"base_directory_length: ", b, 0, 8); print_text_UTF8 (4, "base_directory: ", b+1, len2); b += len2+1; len -= len2+1; len2 = outBit_Sx_NL (4,"classpath_extension_length: ", b, 0, 8); print_text_UTF8 (4, "classpath_extension: ", b+1, len2); b += len2+1; len -= len2+1; print_text_UTF8 (4, "initial_class: ", b, len); } /* 0x05 - External Application Authorisation ETSI TS 102 812 */ void descriptorMHP_AIT_external_application_authorisation (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; indent(+1); while (len > 0) { int x; x = mhp_application_identifier (4, b); b += x; len -= x; outBit_Sx_NL (4,"application_priority: ", b, 0, 8); b++; len--; out_NL (4); } indent(-1); } /* 0x08 -- DVB html application ETSI TS 102 812 */ void descriptorMHP_AIT_dvb_html_application (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; len2 = outBit_Sx_NL (4,"appid_set_length: ", b+2, 0, 8); b += 3; len --; indent(+1); while (len2 > 0) { outBit_Sx_NL (4,"application_id: ", b, 0, 16); b += 2; len -= 2; len2 -= 2; } indent(-1); print_text_UTF8 (4, "parameter: ", b, len); } /* 0x09 -- DVB html application location ETSI TS 102 812 */ void descriptorMHP_AIT_dvb_html_application_location (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; len2 = outBit_Sx_NL (4,"physical_root_length: ", b+2, 0, 8); print_text_UTF8 (4, "physical_root: ", b+3, len2); b += 3 + len2; len -= 1 + len2; print_text_UTF8 (4, "initial_path: ", b, len); } /* 0x0A -- DVB html application boundary ETSI TS 102 812 */ void descriptorMHP_AIT_dvb_html_application_boundary (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; len2 = outBit_Sx_NL (4,"label_length: ", b+2, 0, 8); print_text_UTF8 (4, "label: ", b+3, len2); b += 3 + len2; len -= 1 + len2; print_text_UTF8 (4, "regular_expression: ", b, len); } /* 0x0B -- Application Icons ETSI TS 102 812 */ void descriptorMHP_AIT_application_icons (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; len2 = outBit_Sx_NL (4,"icon_locator_length: ", b+2, 0, 8); print_text_UTF8 (4, "icon_locator: ", b+3, len2); b += 3 + len2; len -= 1 + len2; outBit_Sx_NL (4,"icon_flags: ", b, 0, 16); // $$$ TODO table b += 2; len -= 2; print_databytes(4,"reserved_future_use:", b, len); } /* 0x0C -- Pre-Fetch descriptor ETSI TS 102 812 */ void descriptorMHP_AIT_pre_fetch (u_char *b) { int len; int len2; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"transport_protcol_label: ", b+2, 0, 8); b += 3; len --; indent(+1); while (len > 0) { out_NL (4); len2 = outBit_Sx_NL (4,"label_length: ", b, 0, 8); print_text_UTF8 (4, "label: ", b+1, len2); out_nl (4, " ==> [= matches DII modul label]"); b += 1 + len2; len -= 1 + len2; outBit_Sx_NL (4,"prefetch_priority: ", b, 0, 8); b++; len--; } indent(-1); } /* 0x0D -- DII location descriptor ETSI TS 102 812 */ void descriptorMHP_AIT_DII_location (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"transport_protcol_label: ", b+2, 0, 8); b += 3; len --; indent(+1); while (len > 0) { out_NL (4); outBit_Sx_NL (4,"reserved: ", b, 0, 1); outBit_S2Tx_NL (4,"DII_identification: ", b, 1, 15, "refers to identification in transaction_id"); outBit_Sx_NL (4,"association_tag: ", b, 16, 16); b += 4; len -= 4; } indent(-1); } /* 0x0E -- Delegated Application descriptor ETSI TS 102 812 */ void descriptorMHP_AIT_delegated_application (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; b += 2; // indent(+1); while (len > 0) { out_NL (4); outBit64_Sx_NL (4,"application_identifier: ", b, 0, 48); b += 6; len -= 6; } // indent(-1); } /* 0x0F -- Plug-in descriptor ETSI TS 102 812 */ void descriptorMHP_AIT_plug_in (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"application_type: ", b+2, 0, 16); b += 4; len -= 2; indent(+1); while (len > 0) { int x; out_NL(4); x = mhp_application_profile_version (4, b); b += x; len -= x; } // indent(-1); } /* 0x10 -- Application Storage descriptor ETSI TS 102 812 */ void descriptorMHP_AIT_application_storage (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; b +=2; outBit_S2x_NL(4,"storage_property: ", b, 0, 8, (char *(*)(u_long)) dsmccStrMHP_storage_property); outBit_Sx_NL (4,"not_launchable_from_broadcast: ", b, 8, 1); outBit_Sx_NL (4,"reserved: ", b, 9, 7); outBit_Sx_NL (4,"version: ", b, 16, 32); outBit_Sx_NL (4,"priority: ", b, 48, 8); } /* 0x11 -- IP signalling descriptor ETSI TS 102 812 */ void descriptorMHP_AIT_ip_signalling (u_char *b) { // descriptor_tag = b[0]; // len = b[1]; b +=2; outBit_S2x_NL (4,"platform_id: ", b, 0, 24, (char *(*)(u_long)) dsmccStrPlatform_ID); } dvbsnoop-1.4.50/src/descriptors/tva_rnt_descriptor.c0000744000076400001440000001250210373750007016326 /* $Id: tva_rnt_descriptor.c,v 1.6 2006/02/12 23:17:11 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private TAG Space TS 102 323 TV-Anytime -- RNT Descriptors $Log: tva_rnt_descriptor.c,v $ Revision 1.6 2006/02/12 23:17:11 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.5 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.4 2004/11/03 21:00:58 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.3 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.2 2004/08/27 23:25:52 rasc - Update: changes due to EN 300 468 v1.6.1 - Bugfix: Multilingual component descriptor (tnx to Karsten Siebert) Revision 1.1 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 */ #include "dvbsnoop.h" #include "descriptor.h" #include "tva_rnt_descriptor.h" #include "dvb_descriptor.h" #include "private/userdefs.h" #include "strings/dvb_str.h" #include "strings/tva_str.h" #include "misc/hexprint.h" #include "misc/output.h" #include "misc/helper.h" #include "misc/pkt_time.h" /* determine descriptor type and print it... !!! TVA RNT descriptors seems to have a private tag space !!! !!! (descriptor tag collission with DVB descriptors) */ int descriptorTVA (u_char *b) { int len; int tag; out_NL (4); tag = outBit_S2x_NL (4,"TVA-DescriptorTag: ", b, 0, 8, (char *(*)(u_long))tvaStrTVA_DescriptorTAG); len = outBit_Sx_NL (4,"descriptor_length: ", b, 8, 8); // empty ?? if (len == 0) return len; // print hex buf of descriptor printhex_buf (9, b,len+2); switch (tag) { case 0x41: descriptorTVA_RAR_over_DVB_stream (b); break; case 0x42: descriptorTVA_RAR_over_IP_stream (b); break; case 0x43: descriptorTVA_RNT_scan (b); break; default: if (tag < 0x80) { out_nl (0," ----> ERROR: unimplemented descriptor (TVA context), Report!"); } descriptor_PRIVATE (b, TVA_RNT); break; } return len+2; // (descriptor total length) } /* * TS 102 323 TV-ANYTIME * RNT descriptors */ static int _valid_dates_block (u_char *b); /* 0x41 - RAR_over_DVB_stream */ void descriptorTVA_RAR_over_DVB_stream (u_char *b) { int sf; int x; u_long date_MJD, date_UTC; // descriptor_tag = b[0]; // len = b[1]; _valid_dates_block (b+2); outBit_Sx_NL (4,"weighting: ", b, 96, 6); x = outBit_Sx (4,"complete_flag: ", b, 102, 1); if (x == 1) out_nl (4," [= referenced CRI data is complete]"); else out_NL (4); sf = outBit_S2x_NL (4,"scheduled_flag: ", b, 103, 1, (char *(*)(u_long)) tvastr_CRI_DATA_scheduled_flag); // $$$ TODO this part is re-usable outBit_S2x_NL (4,"network_id: ", b, 104, 16, (char *(*)(u_long)) dvbstrNetworkIdent_ID); outBit_S2x_NL (4,"original_network_id: ", b, 120, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_Sx_NL (4,"transport_stream_ID: ", b, 132, 16); outBit_S2Tx_NL(4,"service_ID: ", b, 148, 16, " --> refers to PMT program_number"); outBit_Sx_NL (4,"component_tag: ", b, 164, 8); // --- if (sf) { date_MJD = getBits (b, 0, 172, 16); date_UTC = getBits (b, 0, 188, 24); out (4,"download_start_time: "); print_time40 (4, date_MJD,date_UTC); out_NL (4); x = outBit_Sx (4,"download_period_duration: ", b, 212, 8); out_nl (4," [= %d minutes]",x*6); outBit_S2Tx_NL (4,"download_cycle_time: ", b, 220, 8, "minutes"); } } /* 0x42 - RAR_over_IP_stream */ void descriptorTVA_RAR_over_IP_stream (u_char *b) { int x; // descriptor_tag = b[0]; // len = b[1]; _valid_dates_block (b+2); outBit_Sx_NL (4,"weighting: ", b, 96, 6); x = outBit_Sx (4,"complete_flag: ", b, 102, 1); if (x == 1) out_nl (4," [= referenced CRI data is complete]"); else out_NL (4); outBit_Sx_NL (6,"reserved: ", b, 103, 1); x = outBit_Sx_NL(4,"URL_length: ", b, 104, 8); print_text_UTF8 (4,"URL: ", b+14, x); } /* * valid_date_weighting_complete_flag - Block * subroutine for identical stuctures reusage * return: len in bytes = 10; */ static int _valid_dates_block (u_char *b) { u_long date_MJD, date_UTC; date_MJD = getBits (b, 0, 0, 16); date_UTC = getBits (b, 0, 16, 24); out (4,"first_valid_date: "); print_time40 (4, date_MJD,date_UTC); out_NL (4); date_MJD = getBits (b, 0, 40, 16); date_UTC = getBits (b, 0, 56, 24); out (4,"last_valid_date: "); print_time40 (4, date_MJD,date_UTC); out_NL (4); return 10; } /* 0x43 - RNT_scan */ void descriptorTVA_RNT_scan (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; while (len > 0) { outBit_S2x_NL (4,"network_id: ", b, 0, 16, (char *(*)(u_long)) dvbstrNetworkIdent_ID); outBit_S2x_NL (4,"original_network_id: ", b, 16, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_Sx_NL (4,"scan_weighting: ", b, 32, 8); b += 5; len -= 5; out_NL (4); } } dvbsnoop-1.4.50/src/descriptors/descriptor_misc.c0000744000076400001440000000165310356276716015624 /* $Id: descriptor_misc.c,v 1.2 2006/01/02 18:23:58 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Descriptors misc. routines, helpers, etc. $Log: descriptor_misc.c,v $ Revision 1.2 2006/01/02 18:23:58 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/01/18 00:30:48 rasc no message */ #include "dvbsnoop.h" #include "misc/helper.h" #include "misc/output.h" void out_nl_calc_NPT (int v, unsigned long long npt) { long sec,usec; /* system clock frequency == (90kHz) NPT_seconds = NPT / (System_Clock_Frequency / 300) NPT_microseconds = ( (NPT * 1000000) / (System_Clock_Frequency / 300) ) - (NPT_seconds * 1000000) */ sec = npt / (300); usec= ((npt * 10000) / 3) - (sec * 1000000); out_nl (v," [= %lu.%06lu sec]",sec,usec); } dvbsnoop-1.4.50/src/sections/0000777000076400001440000000000010630324346011617 5dvbsnoop-1.4.50/src/sections/sectables.h0000744000076400001440000000061210356276750013663 /* $Id: sectables.h,v 1.6 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __SECTABLES_H #define __SECTABLES_H void processSI_packet (u_int pid, long packet_nr, u_char *b, int len); void decodeSI_packet (u_char *buf, int len, u_int pid); #endif dvbsnoop-1.4.50/src/sections/bat.h0000744000076400001440000000035710356276750012472 /* $Id: bat.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_BAT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/cat.h0000744000076400001440000000035710356276750012473 /* $Id: cat.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_CAT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/dit.h0000744000076400001440000000035710356276750012504 /* $Id: dit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_DIT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/eit.h0000744000076400001440000000035710356276750012505 /* $Id: eit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_EIT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/mdt.h0000744000076400001440000000043410356276750012504 /* $Id: mdt.h,v 1.3 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __MDT_H #define __MDT_H void section_MDT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/sections/nit.h0000744000076400001440000000035710356276750012516 /* $Id: nit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_NIT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/pat.h0000744000076400001440000000035710356276750012510 /* $Id: pat.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_PAT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/pmt.h0000744000076400001440000000035710356276750012524 /* $Id: pmt.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_PMT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/rst.h0000744000076400001440000000035710356276750012534 /* $Id: rst.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_RST (u_char *b, int len); dvbsnoop-1.4.50/src/sections/sdt.h0000744000076400001440000000035710356276750012516 /* $Id: sdt.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_SDT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/sit.h0000744000076400001440000000035710356276750012523 /* $Id: sit.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_SIT (u_char *b, int len); dvbsnoop-1.4.50/src/sections/st.h0000744000076400001440000000035510356276752012352 /* $Id: st.h,v 1.5 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_ST (u_char *b, int len); dvbsnoop-1.4.50/src/sections/tdt.h0000744000076400001440000000043310356276752012514 /* $Id: tdt.h,v 1.6 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __TDT_H #define __TDT_H void section_TDT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/sections/tot.h0000744000076400001440000000043110356276752012525 /* $Id: tot.h,v 1.7 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __TOT_H #define __TOT_H void section_TOT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/sections/tsdt.h0000744000076400001440000000043710356276752012703 /* $Id: tsdt.h,v 1.6 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __TSDT_H #define __TSDT_H void section_TSDT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/sections/emm_ecm.h0000744000076400001440000000036710356276750013327 /* $Id: emm_ecm.h,v 1.5 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ void section_EMM_ECM (u_char *b, int len); dvbsnoop-1.4.50/src/sections/Makefile.am0000744000076400001440000000070310141772574013577 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libsections.a noinst_HEADERS = \ sectables.h \ bat.h \ cat.h \ dit.h \ eit.h \ eit.h \ mdt.h \ nit.h \ pat.h \ pmt.h \ rst.h \ sdt.h \ sit.h \ st.h \ tdt.h \ tot.h \ tsdt.h \ emm_ecm.h libsections_a_SOURCES = \ sectables.c \ bat.c \ cat.c \ dit.c \ eit.c \ mdt.c \ nit.c \ pat.c \ pmt.c \ rst.c \ sdt.c \ sit.c \ st.c \ tdt.c \ tot.c \ tsdt.c \ emm_ecm.c dvbsnoop-1.4.50/src/sections/Makefile.in0000644000076400001440000003246310630302146013602 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libsections_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/sections DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libsections_a_AR = $(AR) $(ARFLAGS) libsections_a_LIBADD = am_libsections_a_OBJECTS = sectables.$(OBJEXT) bat.$(OBJEXT) \ cat.$(OBJEXT) dit.$(OBJEXT) eit.$(OBJEXT) mdt.$(OBJEXT) \ nit.$(OBJEXT) pat.$(OBJEXT) pmt.$(OBJEXT) rst.$(OBJEXT) \ sdt.$(OBJEXT) sit.$(OBJEXT) st.$(OBJEXT) tdt.$(OBJEXT) \ tot.$(OBJEXT) tsdt.$(OBJEXT) emm_ecm.$(OBJEXT) libsections_a_OBJECTS = $(am_libsections_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bat.Po ./$(DEPDIR)/cat.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dit.Po ./$(DEPDIR)/eit.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/emm_ecm.Po ./$(DEPDIR)/mdt.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/nit.Po ./$(DEPDIR)/pat.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pmt.Po ./$(DEPDIR)/rst.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sdt.Po ./$(DEPDIR)/sectables.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sit.Po ./$(DEPDIR)/st.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/tdt.Po ./$(DEPDIR)/tot.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/tsdt.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libsections_a_SOURCES) DIST_SOURCES = $(libsections_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libsections.a noinst_HEADERS = \ sectables.h \ bat.h \ cat.h \ dit.h \ eit.h \ eit.h \ mdt.h \ nit.h \ pat.h \ pmt.h \ rst.h \ sdt.h \ sit.h \ st.h \ tdt.h \ tot.h \ tsdt.h \ emm_ecm.h libsections_a_SOURCES = \ sectables.c \ bat.c \ cat.c \ dit.c \ eit.c \ mdt.c \ nit.c \ pat.c \ pmt.c \ rst.c \ sdt.c \ sit.c \ st.c \ tdt.c \ tot.c \ tsdt.c \ emm_ecm.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/sections/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/sections/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libsections.a: $(libsections_a_OBJECTS) $(libsections_a_DEPENDENCIES) -rm -f libsections.a $(libsections_a_AR) libsections.a $(libsections_a_OBJECTS) $(libsections_a_LIBADD) $(RANLIB) libsections.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emm_ecm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sectables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/st.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsdt.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/sections/sectables.c0000744000076400001440000002236210354655554013665 /* $Id: sectables.c,v 1.35 2005/12/29 02:43:39 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- For more information please see: ISO 13818 (-1) and ETSI 300 468 $Log: sectables.c,v $ Revision 1.35 2005/12/29 02:43:39 rasc gcc fixes, man page update Revision 1.34 2005/11/08 23:15:26 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.33 2005/10/20 22:25:08 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.32 2005/07/31 21:48:03 rasc soft CRC for sections... Revision 1.31 2005/07/18 21:11:40 rasc TVA Content Section Revision 1.30 2004/11/03 21:01:03 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.29 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.28 2004/08/22 18:36:45 rasc - Bugfix: multilang service descriptor fix (tnx to Karsten Siebert) - New: MetaData Section (Basic) (H.222.0 AMD1) Revision 1.27 2004/08/13 01:15:54 rasc small change in PID assignment display Revision 1.26 2004/08/12 22:57:18 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.25 2004/08/04 19:54:39 rasc Bugfix: UNT/INT table mixup (reported by Karsten Siebert) Revision 1.24 2004/08/01 21:33:09 rasc minor TVA stuff (TS 102 323) Revision 1.23 2004/07/25 20:12:59 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.22 2004/07/24 11:44:45 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.21 2004/02/20 22:18:42 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.20 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.19 2004/01/04 22:03:22 rasc time for a version leap Revision 1.18 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.17 2003/12/27 00:21:16 rasc dsmcc section tables Revision 1.16 2003/12/26 23:27:40 rasc DSM-CC UNT section Revision 1.15 2003/11/26 23:54:48 rasc -- bugfixes on Linkage descriptor Revision 1.14 2003/11/26 19:55:34 rasc no message Revision 1.13 2003/11/24 23:52:17 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.12 2003/11/09 22:54:16 rasc no message Revision 1.11 2003/10/29 20:54:57 rasc more PES stuff, DSM descriptors, testdata Revision 1.10 2003/10/26 23:00:43 rasc fix Revision 1.9 2003/10/24 22:17:21 rasc code reorg... Revision 1.8 2003/10/21 20:12:51 rasc no message Revision 1.7 2003/10/21 19:54:43 rasc no message Revision 1.6 2003/10/19 22:22:57 rasc - some datacarousell stuff started Revision 1.5 2003/10/19 13:54:25 rasc -more table decoding Revision 1.4 2003/10/17 18:16:54 rasc - started more work on newer ISO 13818 descriptors - some reorg work started Revision 1.3 2003/07/06 05:49:25 obi CAMT fix and indentation Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "sectables.h" #include "pat.h" #include "cat.h" #include "pmt.h" #include "tsdt.h" #include "nit.h" #include "sdt.h" #include "st.h" #include "bat.h" #include "tdt.h" #include "tot.h" #include "rst.h" #include "dit.h" #include "sit.h" #include "eit.h" #include "mdt.h" #include "emm_ecm.h" #include "datacarousel/ait.h" #include "datacarousel/dsmcc.h" #include "datacarousel/datagram.h" #include "datacarousel/ints.h" #include "datacarousel/unts.h" #include "datacarousel/mpe_fec.h" #include "tvanytime/rnt.h" #include "tvanytime/cs.h" #include "private/userdefs.h" #include "testdata/test0x1d.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" #include "misc/cmdline.h" #include "misc/crc32.h" #include "misc/print_header.h" void guess_table (u_char *buf, int len, u_int pid); // // -- process SI packet (Sections) // -- hexdump, decoding // void processSI_packet (u_int pid, long pkt_nr, u_char *buf, int len) { OPTION *opt = getOptionPtr(); indent (0); print_packet_header (opt, "SECT", opt->pid, pkt_nr, len); if (opt->buffer_hexdump) { printhex_buf (0,buf, len); out_NL(0); } // -- decode protocol if (opt->printdecode) { decodeSI_packet (buf,len ,opt->pid); out_nl (3,"=========================================================="); out_NL (3); } } /* -- decode Sections buffer by identifying the table IDs -- siehe EN 300 468 S.14 */ void decodeSI_packet (u_char *buf, int len, u_int pid) { OPTION *opt; int softcrc_fail; // nothing to output ? if (getVerboseLevel() < 2) return; if (pid != DUMMY_PID) { char *s; out (2,"PID: %u (0x%04x)",pid,pid); s = dvbstrPID_assignment(pid); if (*s) out (2," [= assigned for: %s]", s); out_NL (2); out_NL (2); } // // -- do a soft crc check // -- if soft crc fails, ignore packet // opt = getOptionPtr(); softcrc_fail = 0; if (opt->soft_crc) { u_long crc = crc32 ((char *)buf,len); if (crc) { softcrc_fail = 1; } } if (! softcrc_fail) { switch (pid) { case 0x01D: /* Measurement */ section_TESTDATA (buf, len); break; default: // multiple PIDs possible guess_table (buf, len, pid); break; } } else { printhex_buf (5,buf,len); out_nl (2, "Packet soft CRC failed, skipping packet..."); } fflush (stdout); } /* -- content of packet can not be determined via PID, -- so gess from first byte of packet header */ typedef struct _TABLE_IF_FUNC { u_int from; /* e.g. from id 1 */ u_int to; /* to id 3 */ void (*func)(); /* function for table decoding */ } TABLE_ID_FUNC; /* * -- Decode mapping table (TableID --> decode function) * -- Crosscheck this with dvb_str, when changing!!! */ static TABLE_ID_FUNC table_id_func[] = { { 0x00, 0x00, section_PAT }, { 0x01, 0x01, section_CAT }, { 0x02, 0x02, section_PMT }, { 0x03, 0x03, section_TSDT }, // $$$ TODO { 0x04, 0x04, section_14496_SCT }, // $$$ TODO { 0x05, 0x05, section_14496_OCT }, { 0x06, 0x06, section_MDT }, // Metadata section // $$$ TODO { 0x07, 0x07, section_IPMP_CIT }, // IPMP_Control_Information_section (defined in ISO/IEC13818-11) /* res. */ { 0x3a, 0x3d, section_DSMCC }, { 0x3e, 0x3e, section_DSMCC_DATAGRAM }, { 0x40, 0x41, section_NIT }, { 0x42, 0x42, section_SDT }, /* res. */ { 0x46, 0x46, section_SDT }, /* res. */ { 0x4A, 0x4A, section_BAT }, { 0x4B, 0x4B, section_DSMCC_UNT }, { 0x4C, 0x4C, section_DSMCC_INT }, { 0x4E, 0x6E, section_EIT }, /* 4 different types */ { 0x70, 0x70, section_TDT }, { 0x71, 0x71, section_RST }, { 0x72, 0x72, section_ST }, { 0x73, 0x73, section_TOT }, { 0x74, 0x74, section_MHP_AIT }, { 0x75, 0x75, section_TVA_CS }, // TS 102 323 // $$$ TODO // 0x76 related content section (TS 102 323 [36]) // 0x77 content identifier section (TS 102 323 [36]) (CIT) { 0x78, 0x78, section_MPE_FEC }, // EN 301 192 v1.4.1 { 0x79, 0x79, section_TVA_RNT }, // TS 102 323 /* res. */ { 0x7E, 0x7E, section_DIT }, { 0x7F, 0x7F, section_SIT }, { 0x80, 0x8F, section_EMM_ECM }, /* $$$ Conditional Access Message Section */ { 0x90, 0xFE, section_PRIVATE }, /* opps!? DSM-CC or other stuff?! */ { 0,0, NULL } }; void guess_table (u_char *buf, int len, u_int pid) { TABLE_ID_FUNC *t = table_id_func; u_int table_id; /* -- scan id table for decode function */ table_id = (u_int) buf[0]; while (t->func) { if (t->from <= table_id && t->to >= table_id) break; t++; } out_nl (2,"Guess table from table id..."); if (t->func == NULL) { out_SB_NL (2,"Unknown, reserved or not (yet) implemented - TableID: ",table_id); out_nl (2,"--> %s",dvbstrTableID (table_id)); printhex_buf (5,buf,len); return; } (*(t->func))(buf,len); /* exec decode function */ return; } dvbsnoop-1.4.50/src/sections/bat.c0000744000076400001440000001245110356276750012463 /* $Id: bat.c,v 1.11 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- BAT section -- Bouquet Allocation Table -- ETSI EN 300 468 5.2.2 $Log: bat.c,v $ Revision 1.11 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.9 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.8 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.7 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.6 2003/10/24 22:17:20 rasc code reorg... Revision 1.5 2003/10/16 19:02:26 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.4 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.3 2001/12/01 12:34:44 rasc pespacket weitergestrickt, leider z.Zt. zuwenig Zeit um es richtig fertig zu machen. Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "bat.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_BAT (u_char *b, int len) { typedef struct _BAT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int bouquet_id; u_int reserved_3; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; u_int reserved_4; u_int bouquet_descriptors_length; // N descriptor u_int reserved_5; u_int transport_stream_loop_length; // N1 BAT_LIST2 unsigned long crc; } BAT; typedef struct _BAT_LIST2 { u_int transport_stream_id; u_int original_network_id; u_int reserved_1; u_int transport_descriptors_length; // N2 descriptor } BAT_LIST2; BAT t; BAT_LIST2 t2; int len1,len2; t.table_id = b[0]; t.section_syntax_indicator = getBits (b, 0, 8, 1); t.reserved_1 = getBits (b, 0, 9, 1); t.reserved_2 = getBits (b, 0, 10, 2); t.section_length = getBits (b, 0, 12, 12); t.bouquet_id = getBits (b, 0, 24, 16); t.reserved_3 = getBits (b, 0, 40, 2); t.version_number = getBits (b, 0, 42, 5); t.current_next_indicator = getBits (b, 0, 47, 1); t.section_number = getBits (b, 0, 48, 8); t.last_section_number = getBits (b, 0, 56, 8); t.reserved_4 = getBits (b, 0, 64, 4); t.bouquet_descriptors_length = getBits (b, 0, 68, 12); out_nl (3,"BAT-decoding...."); out_S2B_NL (3,"Table_ID: ",t.table_id, dvbstrTableID (t.table_id)); if (t.table_id != 0x4A) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",t.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",t.reserved_1); out_SB_NL (6,"reserved_2: ",t.reserved_2); out_SW_NL (5,"Section_length: ",t.section_length); out_S2W_NL(3,"Bouquet_ID: ",t.bouquet_id,dvbstrBouquetTable_ID(t.bouquet_id)); out_SB_NL (6,"reserved_3: ",t.reserved_3); out_SB_NL (3,"Version_number: ",t.version_number); out_S2B_NL(3,"current_next_indicator: ",t.current_next_indicator, dvbstrCurrentNextIndicator(t.current_next_indicator)); out_SB_NL (3,"Section_number: ",t.section_number); out_SB_NL (3,"Last_Section_number: ",t.last_section_number); out_SB_NL (6,"reserved_4: ",t.reserved_4); out_SW_NL (5,"Bouquet_descriptors_length: ",t.bouquet_descriptors_length); len1 = t.section_length - 10; b += 10; len2 = t.bouquet_descriptors_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; b += x; len1 -= x; } indent (-1); out_NL (3); t.reserved_5 = getBits (b, 0, 0, 4); t.transport_stream_loop_length = getBits (b, 0, 4, 12); out_SB_NL (6,"reserved_5: ",t.reserved_5); out_SW_NL (5,"Transport_stream_loop_length: ",t.transport_stream_loop_length); b += 2; indent(+1); while (len1 > 4) { t2.transport_stream_id = getBits (b, 0, 0, 16); t2.original_network_id = getBits (b, 0, 16, 16); t2.reserved_1 = getBits (b, 0, 32, 4); t2.transport_descriptors_length = getBits (b, 0, 36, 12); out_NL (3); out_SW_NL (3,"Transport_stream_ID: ",t2.transport_stream_id); out_S2W_NL (3,"Original_network_ID: ",t2.original_network_id, dvbstrOriginalNetwork_ID(t2.original_network_id)); out_SB_NL (6,"reserved_1: ",t2.reserved_1); out_SW_NL (5,"Transport_descriptors_length: ", t2.transport_descriptors_length); b += 6; len1 -= 6; len2 = t2.transport_descriptors_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; b += x; len1 -= x; } indent (-1); out_NL (3); } // while len1 indent (-1); t.crc = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",t.crc); } dvbsnoop-1.4.50/src/sections/cat.c0000744000076400001440000000642210356276750012465 /* $Id: cat.c,v 1.11 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- CAT Section $Log: cat.c,v $ Revision 1.11 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.9 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.8 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.7 2003/10/26 22:02:53 rasc fix Revision 1.6 2003/10/26 21:36:20 rasc private DSM-CC descriptor Tags started, INT-Section completed.. Revision 1.5 2003/10/24 22:45:06 rasc code reorg... Revision 1.4 2003/10/24 22:17:20 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "cat.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_CAT (u_char *b, int len) { /* IS13818-1 S. 63 */ /* see also: ETS 468, ETR 289 */ typedef struct _CAT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int section_length; u_int reserved_2; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; // private section unsigned long CRC; } CAT; CAT c; int len1; c.table_id = b[0]; c.section_syntax_indicator = getBits (b, 0, 8, 1); c.reserved_1 = getBits (b, 0, 10, 2); c.section_length = getBits (b, 0, 12, 12); c.reserved_2 = getBits (b, 0, 24, 18); c.version_number = getBits (b, 0, 42, 5); c.current_next_indicator = getBits (b, 0, 47, 1); c.section_number = getBits (b, 0, 48, 8); c.last_section_number = getBits (b, 0, 56, 8); out_nl (3,"CAT-decoding...."); out_S2B_NL (3,"Table_ID: ",c.table_id, dvbstrTableID (c.table_id)); if (c.table_id != 0x01) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",c.section_syntax_indicator); out_SB_NL (6,"(fixed): ",0); out_SB_NL (6,"reserved_1: ",c.reserved_1); out_SW_NL (5,"Section_length: ",c.section_length); out_SB_NL (6,"reserved_2: ",c.reserved_2); out_SB_NL (3,"Version_number: ",c.version_number); out_S2B_NL(3,"current_next_indicator: ",c.current_next_indicator, dvbstrCurrentNextIndicator(c.current_next_indicator)); out_SB_NL (3,"Section_number: ",c.section_number); out_SB_NL (3,"Last_Section_number: ",c.last_section_number); // buffer + header, len = len - header - CRC // Descriptor ISO 13818 - 2.6.1 // - header - CRC len1 = c.section_length - 5; b += 8; indent (1); while (len1 > 4) { int i; i = descriptor (b, MPEG); len1 -= i; b += i; } indent (-1); out_NL (3); c.CRC = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",c.CRC); } dvbsnoop-1.4.50/src/sections/dit.c0000744000076400001440000000446110356276750012477 /* $Id: dit.c,v 1.7 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- DIT section -- Discontinuity Information Table -- ETSI EN 300 468 5.2.9 $Log: dit.c,v $ Revision 1.7 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.6 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:45:06 rasc code reorg... Revision 1.3 2003/10/24 22:17:20 rasc code reorg... Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "dit.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_DIT (u_char *b, int len) { typedef struct _DIT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int transition_flag; u_int reserved_3; } DIT; DIT d; d.table_id = b[0]; d.section_syntax_indicator = getBits (b, 0, 8, 1); d.reserved_1 = getBits (b, 0, 9, 1); d.reserved_2 = getBits (b, 0, 10, 2); d.section_length = getBits (b, 0, 12, 12); d.transition_flag = getBits (b, 0, 24, 1); d.reserved_3 = getBits (b, 0, 25, 7); out_nl (3,"DIT-decoding...."); out_S2B_NL (3,"Table_ID: ",d.table_id, dvbstrTableID (d.table_id)); if (d.table_id != 0x7E) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",d.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",d.reserved_1); out_SB_NL (6,"reserved_2: ",d.reserved_2); out_SW_NL (5,"Section_length: ",d.section_length); out_S2B_NL (3,"transition_flag: ",d.transition_flag, (d.transition_flag) ? "due to change of the originating source" : "due to change selection only"); out_SB_NL (6,"reserved_3: ",d.reserved_3); } dvbsnoop-1.4.50/src/sections/eit.c0000744000076400001440000001357110356276750012502 /* $Id: eit.c,v 1.12 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- EIT section -- Event Information Table -- ETSI EN 300 469 5.2.4 $Log: eit.c,v $ Revision 1.12 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.11 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.10 2004/04/15 03:38:51 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.9 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.8 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.7 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.6 2003/10/24 22:45:07 rasc code reorg... Revision 1.5 2003/10/24 22:17:20 rasc code reorg... Revision 1.4 2003/10/16 19:02:29 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "eit.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_EIT (u_char *b, int len) { typedef struct _EIT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int service_id; u_int reserved_3; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; u_int transport_stream_id; u_int original_network_id; u_int segment_last_section_number; u_int last_table_id; // N1 EIT_LIST2 unsigned long crc; } EIT; typedef struct _EIT_LIST2 { u_int event_id; u_long start_time_MJD; // 16 u_long start_time_UTC; // 24 u_long duration; u_int running_status; u_int free_CA_mode; u_int descriptors_loop_length; // N2 descriptor } EIT_LIST2; EIT e; EIT_LIST2 e2; int len1,len2; e.table_id = b[0]; e.section_syntax_indicator = getBits (b, 0, 8, 1); e.reserved_1 = getBits (b, 0, 9, 1); e.reserved_2 = getBits (b, 0, 10, 2); e.section_length = getBits (b, 0, 12, 12); e.service_id = getBits (b, 0, 24, 16); e.reserved_3 = getBits (b, 0, 40, 2); e.version_number = getBits (b, 0, 42, 5); e.current_next_indicator = getBits (b, 0, 47, 1); e.section_number = getBits (b, 0, 48, 8); e.last_section_number = getBits (b, 0, 56, 8); e.transport_stream_id = getBits (b, 0, 64, 16); e.original_network_id = getBits (b, 0, 80, 16); e.segment_last_section_number = getBits (b, 0, 96, 8); e.last_table_id = getBits (b, 0,104, 8); out_nl (3,"EIT-decoding...."); out_S2B_NL (3,"Table_ID: ",e.table_id, dvbstrTableID (e.table_id)); if ( e.table_id != 0x4E && e.table_id != 0x4F && !(e.table_id >= 0x50 && e.table_id <= 0x6F) ) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",e.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",e.reserved_1); out_SB_NL (6,"reserved_2: ",e.reserved_2); out_SW_NL (5,"Section_length: ",e.section_length); out_S2W_NL (3,"Service_ID: ",e.service_id, " --> refers to PMT program_number"); if (e.service_id == 0xFFFF) out_nl (3," ==> EIT is scrambled"); out_SB_NL (6,"reserved_3: ",e.reserved_3); out_SB_NL (3,"Version_number: ",e.version_number); out_S2B_NL(3,"current_next_indicator: ",e.current_next_indicator, dvbstrCurrentNextIndicator(e.current_next_indicator)); out_SB_NL (3,"Section_number: ",e.section_number); out_SB_NL (3,"Last_Section_number: ",e.last_section_number); out_SW_NL (3,"Transport_stream_ID: ",e.transport_stream_id); out_S2W_NL (3,"Original_network_ID: ",e.original_network_id, dvbstrOriginalNetwork_ID(e.original_network_id)); out_SB_NL (3,"Segment_last_Section_number: ",e.segment_last_section_number); out_S2B_NL (3,"Last_table_id: ",e.last_table_id,dvbstrTableID(e.last_table_id)); // - header data after length value len1 = e.section_length - 11; b += 14; indent (+1); while (len1 > 4) { e2.event_id = getBits (b, 0, 0, 16); e2.start_time_MJD = getBits (b, 0, 16, 16); e2.start_time_UTC = getBits (b, 0, 32, 24); e2.duration = getBits (b, 0, 56, 24); e2.running_status = getBits (b, 0, 80, 3); e2.free_CA_mode = getBits (b, 0, 83, 1); e2.descriptors_loop_length = getBits (b, 0, 84, 12); out_NL (3); out_SW_NL (3,"Event_ID: ",e2.event_id); out (3,"Start_time: "); print_time40 (3,e2.start_time_MJD,e2.start_time_UTC); out_NL(3); out (3,"Duration: "); print_time40 (3,0L,e2.duration); out_NL (3); out_S2B_NL (3,"Running_status: ",e2.running_status, dvbstrRunningStatus_FLAG (e2.running_status)); out_S2B_NL (3,"Free_CA_mode: ",e2.free_CA_mode, (e2.free_CA_mode) ?"streams [partially] CA controlled" :"unscrambled"); out_SB_NL (5,"Descriptors_loop_length: ",e2.descriptors_loop_length); b += 12; len1 -= (12 + e2.descriptors_loop_length); len2 = e2.descriptors_loop_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); b += x; len2 -= x; } indent (-1); out_NL (3); } // while len1 indent (-1); e.crc = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",e.crc); } dvbsnoop-1.4.50/src/sections/mdt.c0000744000076400001440000001005310356276750012475 /* $Id: mdt.c,v 1.6 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- MDT section (MetaData Section) $Log: mdt.c,v $ Revision 1.6 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.5 2005/11/10 23:34:38 rasc Some H.222.1 AMD 4+5 update Revision 1.4 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.3 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.2 2004/08/24 21:30:23 rasc more Metadata Revision 1.1 2004/08/22 18:36:45 rasc - Bugfix: multilang service descriptor fix (tnx to Karsten Siebert) - New: MetaData Section (Basic) (H.222.0 AMD1) */ #include "dvbsnoop.h" #include "mdt.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_MDT (u_char *b, int len) { /* IS13818-1 AMD1 */ int table_id; int m_len; int sfi; int x; out_nl (3,"MDT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long)) dvbstrTableID ); if (table_id != 0x06) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); x = outBit_Sx(3,"random_access_indicator: ", b, 10, 1); if (x == 1) { out (3," [= access point to the metadata]"); } out_NL(3); x = outBit_Sx (3,"decoder_config_flag: ", b, 11, 1); if (x == 1) { out (3," [= decoder configuration information is present in the metadata Access Unit]"); } out_NL(3); m_len = outBit_Sx_NL (5,"metadata_section_length: ", b, 12, 12); outBit_Sx_NL (3,"metadata_service_id: ", b, 24, 8); outBit_Sx_NL (6,"reserved: ", b, 32, 8); sfi = outBit_S2x_NL (3,"section_fragment_indication: ",b, 40, 2, (char *(*)(u_long)) dvbstrMPEG_metadata_section_frag_indication ); outBit_Sx_NL (3,"version_number: ", b, 42, 5); outBit_S2x_NL(3,"current_next_indicator: ", b, 47, 1, (char *(*)(u_long)) dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b, 48, 8); outBit_Sx_NL (3,"Last_section_number: ", b, 54, 8); b += 8; m_len -= 5; print_databytes (4,"metadata_byte:", b,m_len-4); // $$$ TODO MetaData AU_CELL etc b += m_len-4; outBit_Sx_NL (5,"CRC: ", b, 0, 32); } /* * $$$ TODO metadata_byte: This 8-bit contains contiguous bytes from a metadata Access Unit. Q: so is it a contigous stream splitted over serveral sections? A: guess so... Table Amd.1-10 – Metadata Access Unit Wrapper Metadata_AU_wrapper () { for (i=0; i 0 ) { int x; x = descriptor (b, DVB_SI); l1 -= x; b += x; } indent (-1); out_NL (3); // get transport stream loop / descriptors... n.reserved_5 = getBits (b, 0, 0, 4); n.transport_stream_loop_length = getBits (b, 0, 4, 12); out_NL (3); out_SB_NL (6,"reserved_5: ",n.reserved_5); out_SW_NL (5,"Transport_stream_loop_length: ",n.transport_stream_loop_length); l1 = n.transport_stream_loop_length; b += 2; indent (+1); while ( l1 > 0 ) { nt.transport_stream_id = getBits (b, 0, 0, 16); nt.original_network_id = getBits (b, 0, 16, 16); nt.reserved_1 = getBits (b, 0, 32, 4); nt.transport_descriptor_length = getBits (b, 0, 36, 12); out_NL (3); out_SW_NL (3,"Transport_stream_ID: ",nt.transport_stream_id); out_S2W_NL (3,"Original_network_ID: ",nt.original_network_id, dvbstrOriginalNetwork_ID(nt.original_network_id)); out_SB_NL (6,"reserved_1: ",nt.reserved_1); out_SW_NL (5,"Transport_descriptor_length: ", nt.transport_descriptor_length); // descriptor(s) b += 6; l1 -= 6; l2 = nt.transport_descriptor_length; indent (+1); while (l2 > 0) { int x; x = descriptor (b, DVB_SI); b += x; l2 -= x; l1 -= x; } indent (-1); out_NL (3); } indent(-1); n.CRC = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",n.CRC); } dvbsnoop-1.4.50/src/sections/pat.c0000744000076400001440000000775510356276750012514 /* $Id: pat.c,v 1.11 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PAT section $Log: pat.c,v $ Revision 1.11 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.9 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.8 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.7 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.6 2004/01/02 16:40:39 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2002/12/05 18:33:19 rasc bugfix: PAT didn't see the last entry (tnx to obi) Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "pat.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/pid_mem.h" void section_PAT (u_char *b, int len) { /* IS13818-1 S. 62 */ typedef struct _PAT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int section_length; u_int transport_stream_id; u_int reserved_2; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; // N pat_list u_long CRC; } PAT; typedef struct _PAT_LIST { u_int program_number; u_int reserved; u_int network_pmt_PID; } PAT_LIST; PAT p; PAT_LIST pl; int n; p.table_id = b[0]; p.section_syntax_indicator = getBits (b, 0, 8, 1); p.reserved_1 = getBits (b, 0, 10, 2); p.section_length = getBits (b, 0, 12, 12); p.transport_stream_id = getBits (b, 0, 24, 16); p.reserved_2 = getBits (b, 0, 40, 2); p.version_number = getBits (b, 0, 42, 5); p.current_next_indicator = getBits (b, 0, 47, 1); p.section_number = getBits (b, 0, 48, 8); p.last_section_number = getBits (b, 0, 56, 8); out_nl (3,"PAT-decoding...."); out_S2B_NL (3,"Table_ID: ",p.table_id, dvbstrTableID (p.table_id)); if (p.table_id != 0x00) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",p.section_syntax_indicator); out_SB_NL (6,"(fixed): ",0); out_SB_NL (6,"reserved_1: ",p.reserved_1); out_SW_NL (5,"Section_length: ",p.section_length); out_SW_NL (3,"Transport_Stream_ID: ",p.transport_stream_id); out_SB_NL (6,"reserved_2: ",p.reserved_2); out_SB_NL (3,"Version_number: ",p.version_number); out_S2B_NL(3,"current_next_indicator: ",p.current_next_indicator, dvbstrCurrentNextIndicator(p.current_next_indicator)); out_SB_NL (3,"Section_number: ",p.section_number); out_SB_NL (3,"Last_Section_number: ",p.last_section_number); // PID list... // n = section_length - CRC - front bytes // n = len / anzahl bytes pro pid angabe. // Buffer to start of List n = p.section_length - 5 - 4; b = b + 8; indent (+1); for (; n>=4; n=n-4) { pl.program_number = getBits (b, 0, 0, 16); pl.reserved = getBits (b, 0, 16, 3); pl.network_pmt_PID = getBits (b, 0, 19, 13); b += 4; store_PidToMem (pl.network_pmt_PID); out_NL (3); out_SW_NL (3,"Program_number: ",pl.program_number); out_SB_NL (6,"reserved: ",pl.reserved); out_SW_NL (3,(pl.program_number) ?"Program_map_PID: " :"Network_PID: ", pl.network_pmt_PID); } indent (-1); out_NL (3); p.CRC = getBits (b,0,0,32); out_SL_NL (5,"CRC: ",p.CRC); } dvbsnoop-1.4.50/src/sections/pmt.c0000744000076400001440000001323210356276750012513 /* $Id: pmt.c,v 1.13 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PMT section (Transport Stream Program Map Section) $Log: pmt.c,v $ Revision 1.13 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.12 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.11 2004/04/19 22:09:33 rasc minor change Revision 1.10 2004/04/15 22:29:22 rasc PMT: some brainded section check TS: filter single pids from multi-pid ts-input-file minor enhancements Revision 1.9 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.8 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.7 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.6 2004/01/02 16:40:39 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "pmt.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/pid_mem.h" void section_PMT (u_char *b, int len) { /* IS13818-1 S. 65 */ typedef struct _PMT { u_int table_id; u_int section_syntax_indicator; u_int b_null; u_int reserved_1; int section_length; u_int program_number; u_int reserved_2; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; u_int reserved_3; u_int pcr_pid; u_int reserved_4; int program_info_length; // N descriptor // N1 PMT_LIST2 unsigned long crc; } PMT; typedef struct _PMT_LIST2 { u_int stream_type; u_int reserved_1; u_int elementary_PID; u_int reserved_2; int ES_info_length; // N2 descriptor } PMT_LIST2; PMT p; PMT_LIST2 p2; int len1,len2; p.table_id = b[0]; p.section_syntax_indicator = getBits (b, 0, 8, 1); p.b_null = getBits (b, 0, 9, 1); p.reserved_1 = getBits (b, 0, 10, 2); p.section_length = getBits (b, 0, 12, 12); p.program_number = getBits (b, 0, 24, 16); p.reserved_2 = getBits (b, 0, 40, 2); p.version_number = getBits (b, 0, 42, 5); p.current_next_indicator = getBits (b, 0, 47, 1); p.section_number = getBits (b, 0, 48, 8); p.last_section_number = getBits (b, 0, 56, 8); p.reserved_3 = getBits (b, 0, 64, 3); p.pcr_pid = getBits (b, 0, 67, 13); p.reserved_4 = getBits (b, 0, 80, 4); p.program_info_length = getBits (b, 0, 84, 12); out_nl (3,"PMT-decoding...."); out_S2B_NL (3,"Table_ID: ",p.table_id, dvbstrTableID (p.table_id)); if (p.table_id != 0x02) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",p.section_syntax_indicator); out_SB_NL (6,"(fixed '0'): ",p.b_null); out_SB_NL (6,"reserved_1: ",p.reserved_1); out_SW_NL (5,"Section_length: ",p.section_length); out_SW_NL (3,"Program_number: ",p.program_number); out_SB_NL (6,"reserved_2: ",p.reserved_2); out_SB_NL (3,"Version_number: ",p.version_number); out_S2B_NL(3,"current_next_indicator: ",p.current_next_indicator, dvbstrCurrentNextIndicator(p.current_next_indicator)); out_SB_NL (3,"Section_number: ",p.section_number); out_SB_NL (3,"Last_Section_number: ",p.last_section_number); out_SB_NL (6,"reserved_3: ",p.reserved_3); out_SW_NL (3,"PCR PID: ",p.pcr_pid); // store_PidToMem (p.pcr_pid); $$$ TODO PCR is no section... out_SB_NL (6,"reserved_4: ",p.reserved_4); out_SW_NL (5,"Program_info_length: ",p.program_info_length); len1 = p.section_length - 9; b += 9 + 3; len2 = p.program_info_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; b += x; len1 -= x; } lenCheckErrOut(3,len2); indent (-1); out_NL (3); out_nl (3,"Stream_type loop: "); indent (+1); while (len1 > 4) { p2.stream_type = getBits (b, 0, 0, 8); p2.reserved_1 = getBits (b, 0, 8, 3); p2.elementary_PID = getBits (b, 0, 11, 13); p2.reserved_2 = getBits (b, 0, 24, 4); p2.ES_info_length = getBits (b, 0, 28, 12); if (*dvbstrStream_TYPE_SHORT (p2.stream_type) == 'S') { // SECTION? store_PidToMem (p2.elementary_PID); // $$$ TODO maybe PES-Spider too? } out_NL (3); out_S2B_NL (3,"Stream_type: ",p2.stream_type, dvbstrStream_TYPE (p2.stream_type)); out_SB_NL (6,"reserved_1: ",p2.reserved_1); out_SW_NL (3,"Elementary_PID: ",p2.elementary_PID); out_SB_NL (6,"reserved_2: ",p2.reserved_2); out_SW_NL (5,"ES_info_length: ",p2.ES_info_length); b += 5; len1 -= 5; len2 = p2.ES_info_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; len1 -= x; b += x; } indent (-1); // -- this is due to some braindead providers lenCheckErrOut(3,len2); out_NL (3); } // while len1 indent (-1); p.crc = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",p.crc); } dvbsnoop-1.4.50/src/sections/rst.c0000744000076400001440000000670710356276750012534 /* $Id: rst.c,v 1.9 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- RST section -- Running Status Table -- ETSI EN 300 468 5.2.7 $Log: rst.c,v $ Revision 1.9 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.8 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.7 2004/04/15 03:38:51 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.6 2004/01/02 16:40:39 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2003/10/16 19:02:29 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "rst.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_RST (u_char *b, int len) { typedef struct _RST { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; // N1 RST_LIST2 } RST; typedef struct _RST_LIST2 { u_int transport_stream_id; u_int original_network_id; u_int service_id; u_int event_id; u_int reserved_1; u_int running_status; } RST_LIST2; RST r; RST_LIST2 r2; int len1; r.table_id = b[0]; r.section_syntax_indicator = getBits (b, 0, 8, 1); r.reserved_1 = getBits (b, 0, 9, 1); r.reserved_2 = getBits (b, 0, 10, 2); r.section_length = getBits (b, 0, 12, 12); out_nl (3,"RST-decoding...."); out_S2B_NL (3,"Table_ID: ",r.table_id, dvbstrTableID (r.table_id)); if (r.table_id != 0x71) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",r.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",r.reserved_1); out_SB_NL (6,"reserved_2: ",r.reserved_2); out_SW_NL (5,"Section_length: ",r.section_length); len1 = r.section_length - 3; b += 3; indent (+1); while (len1 > 0) { r2.transport_stream_id = getBits (b, 0, 0, 16); r2.original_network_id = getBits (b, 0, 16, 16); r2.service_id = getBits (b, 0, 32, 16); r2.event_id = getBits (b, 0, 48, 16); r2.reserved_1 = getBits (b, 0, 64, 5); r2.running_status = getBits (b, 0, 69, 3); b += 9; len1 -= 9; out_NL (3); out_SW_NL (3,"Transport_stream_ID: ",r2.transport_stream_id); out_S2W_NL (3,"Original_network_ID: ",r2.original_network_id, dvbstrOriginalNetwork_ID(r2.original_network_id)); out_S2W_NL (3,"Service_ID: ",r2.service_id, " --> refers to PMT program_number"); out_SW_NL (3,"Event_ID: ",r2.event_id); out_SB_NL (6,"reserved_1: ",r2.reserved_1); out_S2B_NL (3,"Running_status: ",r2.running_status, dvbstrRunningStatus_FLAG (r2.running_status)); } // while len1 indent (-1); } dvbsnoop-1.4.50/src/sections/sdt.c0000744000076400001440000001303410356276750012505 /* $Id: sdt.c,v 1.12 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- SDT section -- Service Description Table -- ETSI EN 300 468 5.2.3 $Log: sdt.c,v $ Revision 1.12 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.11 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.10 2004/04/15 03:38:51 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.9 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.8 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.7 2004/01/02 16:40:39 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.6 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/10/24 22:17:21 rasc code reorg... Revision 1.4 2003/10/16 19:02:29 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "sdt.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" /* -- SDT section -- ETSI EN 300 468 5.2.3 */ void section_SDT (u_char *b, int len) { typedef struct _SDT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int transport_stream_id; u_int reserved_3; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; u_int original_network_id; u_int reserved_4; // N... SDT_LIST u_long CRC; } SDT; typedef struct _SDT_LIST { u_int service_id; u_int reserved_1; u_int EIT_schedule_flag; u_int EIT_present_following_flag; u_int running_status; u_int free_CA_mode; u_int descriptors_loop_length; // N2 ... descriptors } SDT_LIST; SDT s; SDT_LIST s2; int len1,len2; s.table_id = b[0]; s.section_syntax_indicator = getBits (b, 0, 8, 1); s.reserved_1 = getBits (b, 0, 9, 1); s.reserved_2 = getBits (b, 0, 10, 2); s.section_length = getBits (b, 0, 12, 12); s.transport_stream_id = getBits (b, 0, 24, 16); s.reserved_3 = getBits (b, 0, 40, 2); s.version_number = getBits (b, 0, 42, 5); s.current_next_indicator = getBits (b, 0, 47, 1); s.section_number = getBits (b, 0, 48, 8); s.last_section_number = getBits (b, 0, 56, 8); s.original_network_id = getBits (b, 0, 64, 16); s.reserved_4 = getBits (b, 0, 80, 8); out_nl (3,"SDT-decoding...."); out_S2B_NL (3,"Table_ID: ",s.table_id, dvbstrTableID (s.table_id)); if (s.table_id != 0x42 && s.table_id != 0x46) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",s.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",s.reserved_1); out_SB_NL (6,"reserved_2: ",s.reserved_2); out_SW_NL (5,"Section_length: ",s.section_length); out_SW_NL (3,"Transport_Stream_ID: ",s.transport_stream_id); out_SB_NL (6,"reserved_3: ",s.reserved_3); out_SB_NL (3,"Version_number: ",s.version_number); out_S2B_NL(3,"current_next_indicator: ",s.current_next_indicator, dvbstrCurrentNextIndicator(s.current_next_indicator)); out_SB_NL (3,"Section_number: ",s.section_number); out_SB_NL (3,"Last_Section_number: ",s.last_section_number); out_S2W_NL (3,"Original_network_ID: ",s.original_network_id, dvbstrOriginalNetwork_ID(s.original_network_id)); out_SB_NL (6,"reserved_4: ",s.reserved_4); // len = len - header - CRC len1 = s.section_length - 11 - 4; b += 11; out_NL (3); indent (+1); while (len1 > 0 ) { s2.service_id = getBits (b, 0, 0, 16); s2.reserved_1 = getBits (b, 0, 16, 6); s2.EIT_schedule_flag = getBits (b, 0, 22, 1); s2.EIT_present_following_flag= getBits (b, 0, 23, 1); s2.running_status = getBits (b, 0, 24, 3); s2.free_CA_mode = getBits (b, 0, 27, 1); s2.descriptors_loop_length = getBits (b, 0, 28, 12); out_NL (3); out_S2W_NL (3,"Service_id: ",s2.service_id, " --> refers to PMT program_number"); out_SB_NL (6,"reserved_1: ",s2.reserved_1); out_SB_NL (3,"EIT_schedule_flag: ",s2.EIT_schedule_flag); out_SB_NL (3,"EIT_present_following_flag: ",s2.EIT_present_following_flag); out_S2B_NL (3,"Running_status: ",s2.running_status, dvbstrRunningStatus_FLAG(s2.running_status)); out_S2B_NL (3,"Free_CA_mode: ",s2.free_CA_mode, (s2.free_CA_mode) ?"streams [partially] CA controlled" :"unscrambled"); out_SW_NL (5,"Descriptors_loop_length: ",s2.descriptors_loop_length); b += 5; len1 -= 5; len2 = s2.descriptors_loop_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; b += x; len1 -= x; } indent (-1); out_NL (3); } indent (-1); s.CRC = getBits (b,0,0,32); out_SL_NL (5,"CRC: ",s.CRC); } dvbsnoop-1.4.50/src/sections/sit.c0000744000076400001440000001177210356276750012521 /* $Id: sit.c,v 1.11 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- SIT section -- Selection Information Table -- ETSI EN 300 469 7.1.2 $Log: sit.c,v $ Revision 1.11 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.9 2004/04/15 03:38:51 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.8 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.7 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.6 2004/01/02 16:40:40 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "sit.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_SIT (u_char *b, int len) { typedef struct _SIT { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int reserved_3; u_int reserved_4; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; u_int reserved_5; u_int transmission_info_loop_length; // N descriptor // N1 SIT_LIST2 unsigned long crc; } SIT; typedef struct _SIT_LIST2 { u_int service_id; u_int reserved_1; u_int running_status; u_int service_loop_length; // N2 descriptor } SIT_LIST2; SIT s; SIT_LIST2 s2; int len1,len2; s.table_id = b[0]; s.section_syntax_indicator = getBits (b, 0, 8, 1); s.reserved_1 = getBits (b, 0, 9, 1); s.reserved_2 = getBits (b, 0, 10, 2); s.section_length = getBits (b, 0, 12, 12); s.reserved_3 = getBits (b, 0, 24, 16); s.reserved_4 = getBits (b, 0, 40, 2); s.version_number = getBits (b, 0, 42, 5); s.current_next_indicator = getBits (b, 0, 47, 1); s.section_number = getBits (b, 0, 48, 8); s.last_section_number = getBits (b, 0, 56, 8); s.reserved_5 = getBits (b, 0, 64, 4); s.transmission_info_loop_length = getBits (b, 0, 68, 12); out_nl (3,"SIT-decoding...."); out_S2B_NL (3,"Table_ID: ",s.table_id, dvbstrTableID (s.table_id)); if (s.table_id != 0x7F) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",s.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",s.reserved_1); out_SB_NL (6,"reserved_2: ",s.reserved_2); out_SW_NL (5,"Section_length: ",s.section_length); out_SW_NL (6,"reserved_3: ",s.reserved_3); out_SB_NL (6,"reserved_4: ",s.reserved_4); out_SB_NL (3,"Version_number: ",s.version_number); out_S2B_NL(3,"current_next_indicator: ",s.current_next_indicator, dvbstrCurrentNextIndicator(s.current_next_indicator)); out_SB_NL (3,"Section_number: ",s.section_number); out_SB_NL (3,"Last_Section_number: ",s.last_section_number); out_SB_NL (6,"reserved_5: ",s.reserved_5); out_SW_NL (5,"Transmission_info_loop_length: ",s.transmission_info_loop_length); // - header data after length value len1 = s.section_length - 7; b += 10; len2 = s.transmission_info_loop_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; b += x; len1 -= x; } indent (-1); out_NL (3); indent (+1); while (len1 > 4) { s2.service_id = getBits (b, 0, 0, 16); s2.reserved_1 = getBits (b, 0, 16, 1); s2.running_status = getBits (b, 0, 17, 3); s2.service_loop_length = getBits (b, 0, 20, 12); b += 4; len1 -= 4; out_NL (3); out_S2W_NL (3,"Service_ID: ",s2.service_id, " --> refers to PMT program_number"); out_SB_NL (6,"reserved_1: ",s2.reserved_1); out_S2B_NL (3,"Running_status: ",s2.running_status, dvbstrRunningStatus_FLAG (s2.running_status)); out_SW_NL (5,"Service_loop_length: ",s2.service_loop_length); len2 = s2.service_loop_length; indent (+1); while (len2 > 0) { int x; x = descriptor (b, DVB_SI); len2 -= x; b += x; len1 -= x; } indent (-1); out_NL (3); } // while len1 indent (-1); s.crc = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",s.crc); } dvbsnoop-1.4.50/src/sections/st.c0000744000076400001440000000420510356276750012341 /* $Id: st.c,v 1.8 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- ST section (stuffing) $Log: st.c,v $ Revision 1.8 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.7 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.6 2004/01/02 16:40:40 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "st.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" /* -- ST section (stuffing) -- ETSI EN 300 468 5.2.8 */ void section_ST (u_char *b, int len) { typedef struct _ST { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; // N databytes } ST; ST s; s.table_id = b[0]; s.section_syntax_indicator = getBits (b, 0, 8, 1); s.reserved_1 = getBits (b, 0, 9, 1); s.reserved_2 = getBits (b, 0, 10, 2); s.section_length = getBits (b, 0, 12, 12); out_nl (3,"ST-decoding...."); out_S2B_NL (3,"Table_ID: ",s.table_id, dvbstrTableID (s.table_id)); if (s.table_id != 0x72) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",s.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",s.reserved_1); out_SB_NL (6,"reserved_2: ",s.reserved_2); out_SW_NL (5,"Section_length: ",s.section_length); b += 3; print_databytes (3,"Section data:", b, s.section_length); } dvbsnoop-1.4.50/src/sections/tdt.c0000744000076400001440000000371110356276752012511 /* $Id: tdt.c,v 1.9 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- TDT section -- Time Date Table -- ETSI EN 300 468 5.2.5 $Log: tdt.c,v $ Revision 1.9 2006/01/02 18:24:25 rasc just update copyright and prepare for a new public tar ball Revision 1.8 2005/10/25 18:41:40 rasc minor code rewrite Revision 1.7 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.6 2004/01/02 16:40:40 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "tdt.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_TDT (u_char *b, int len) { u_int table_id; u_long UTC_time_MJD; u_long UTC_time_UTC; out_nl (3,"TDT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long)) dvbstrTableID ); if (table_id != 0x70) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); outBit_Sx_NL (6,"reserved_2: ", b, 10, 2); outBit_Sx_NL (3,"Section_length: ", b, 12, 12); out (3,"UTC_time: "); UTC_time_MJD = getBits (b, 0, 24, 16); UTC_time_UTC = getBits (b, 0, 40, 24); print_time40 (3, UTC_time_MJD,UTC_time_UTC); out_NL (3); } dvbsnoop-1.4.50/src/sections/tot.c0000744000076400001440000000500010356276752012515 /* $Id: tot.c,v 1.11 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- TOT section -- Time Offset Table -- ETSI EN 300 468 5.2.6 $Log: tot.c,v $ Revision 1.11 2006/01/02 18:24:25 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2005/10/25 18:41:40 rasc minor code rewrite Revision 1.9 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.8 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.7 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.6 2004/01/02 16:40:40 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.5 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/10/24 22:17:21 rasc code reorg... Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "tot.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/pkt_time.h" void section_TOT (u_char *b, int len) { u_int table_id; u_long UTC_time_MJD; u_long UTC_time_UTC; int len1; out_nl (3,"TOT-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long)) dvbstrTableID ); if (table_id != 0x73) { out_nl (3,"wrong Table ID"); return; } outBit_Sx_NL (3,"section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (6,"reserved_1: ", b, 9, 1); outBit_Sx_NL (6,"reserved_2: ", b, 10, 2); outBit_Sx_NL (3,"Section_length: ", b, 12, 12); out (3,"UTC_time: "); UTC_time_MJD = getBits (b, 0, 24, 16); UTC_time_UTC = getBits (b, 0, 40, 24); print_time40 (3, UTC_time_MJD,UTC_time_UTC); out_NL (3); outBit_Sx_NL (6,"reserved_3: ", b, 64, 4); len1 = outBit_Sx_NL (5,"Descriptor_loop_length: ", b, 68, 12); b += 10; indent (+1); while (len1 > 0) { int x; x = descriptor (b, DVB_SI); len1 -= x; b += x; } indent (-1); out_NL (3); outBit_Sx_NL (5,"CRC: ", b, 0, 32); } dvbsnoop-1.4.50/src/sections/tsdt.c0000744000076400001440000000621010356276752012671 /* $Id: tsdt.c,v 1.13 2006/01/02 18:24:25 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- TSDT section -- Transport Stream Description Section -- ISO 13818 $Log: tsdt.c,v $ Revision 1.13 2006/01/02 18:24:25 rasc just update copyright and prepare for a new public tar ball Revision 1.12 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.11 2004/02/12 21:21:21 rasc MHP AIT descriptors some smaller changes Revision 1.10 2004/02/07 01:28:04 rasc MHP Application Information Table some AIT descriptors Revision 1.9 2004/01/02 16:40:40 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.8 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.7 2003/11/26 19:55:34 rasc no message Revision 1.6 2003/11/01 17:05:47 rasc no message Revision 1.5 2003/10/29 20:54:57 rasc more PES stuff, DSM descriptors, testdata */ #include "dvbsnoop.h" #include "tsdt.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" void section_TSDT (u_char *b, int len) { typedef struct _TDST { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; u_int reserved_3; u_int version_number; u_int current_next_indicator; u_int section_number; u_int last_section_number; // N descriptor u_long crc; } TDST; TDST t; int len1; t.table_id = b[0]; t.section_syntax_indicator = getBits (b, 0, 8, 1); t.reserved_1 = getBits (b, 0, 9, 1); t.reserved_2 = getBits (b, 0, 10, 2); t.section_length = getBits (b, 0, 12, 12); t.reserved_3 = getBits (b, 0, 24, 18); t.version_number = getBits (b, 0, 42, 5); t.current_next_indicator = getBits (b, 0, 47, 1); t.section_number = getBits (b, 0, 48, 8); t.last_section_number = getBits (b, 0, 56, 8); b += 8; len1 = t.section_length - 5; out_nl (3,"TDST-decoding...."); out_S2B_NL (3,"Table_ID: ",t.table_id, dvbstrTableID (t.table_id)); if (t.table_id != 0x03) { out_nl (3,"wrong Table ID"); return; } out_SB_NL (3,"section_syntax_indicator: ",t.section_syntax_indicator); out_SB_NL (6,"Fixed '0': ",t.reserved_1); out_SB_NL (6,"reserved_2: ",t.reserved_2); out_SW_NL (5,"Section_length: ",t.section_length); out_SL_NL (6,"reserved_3: ",t.reserved_3); out_SB_NL (3,"Version_number: ",t.version_number); out_S2B_NL(3,"current_next_indicator: ",t.current_next_indicator, dvbstrCurrentNextIndicator(t.current_next_indicator)); out_SB_NL (3,"Current_next_indicator: ",t.current_next_indicator); out_SB_NL (3,"Section_number: ",t.section_number); out_SB_NL (3,"Last_Section_number: ",t.last_section_number); indent (+1); while (len1 > 4) { int x; x = descriptor (b, MPEG); b += x; len1 -= x; } indent (-1); out_NL (3); t.crc = getBits (b, 0, 0, 32); out_SL_NL (5,"CRC: ",t.crc); } dvbsnoop-1.4.50/src/sections/emm_ecm.c0000744000076400001440000000513310356276750013316 /* $Id: emm_ecm.c,v 1.11 2006/01/02 18:24:24 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2004 Rainer.Scherg@gmx.de -- EMM / ECM Data packet $Log: emm_ecm.c,v $ Revision 1.11 2006/01/02 18:24:24 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2004/10/17 22:20:36 rasc section decoding functions renamed due to preparation of private structures Revision 1.9 2004/01/02 16:40:39 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.8 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.7 2003/10/24 22:17:21 rasc code reorg... Revision 1.6 2003/07/06 05:49:25 obi CAMT fix and indentation Revision 1.5 2003/07/05 21:22:45 rasc TypoFix - Tnx MWS Revision 1.4 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.3 2001/10/16 18:05:43 rasc no message Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "emm_ecm.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/helper.h" #include "misc/output.h" void section_EMM_ECM (u_char *b, int len) { /* */ typedef struct _EMM_ECM { u_int table_id; u_int section_syntax_indicator; u_int reserved_1; u_int reserved_2; u_int section_length; } EMM_ECM; EMM_ECM e; //int n; e.table_id = b[0]; e.section_syntax_indicator = getBits (b, 0, 8, 1); e.reserved_1 = getBits (b, 0, 9, 1); e.reserved_2 = getBits (b, 0, 10, 2); e.section_length = getBits (b, 0, 12, 12); out_nl (3,"CAMT-decoding...."); out_S2B_NL (3,"Table_ID: ",e.table_id, dvbstrTableID (e.table_id)); out_SB_NL (3,"section_syntax_indicator: ",e.section_syntax_indicator); out_SB_NL (6,"reserved_1: ",e.reserved_1); out_SB_NL (6,"reserved_2: ",e.reserved_2); out_SW_NL (5,"Section_length: ",e.section_length); print_databytes(3,"CA_message_section_data:",b+3,e.section_length); // !!! decoding the complete ECM/EMM stream may be illegal // so we don't do this! // secrets are secrets even if they are openly transmitted! // you are not allowed to enhance this section! } dvbsnoop-1.4.50/src/private/0000777000076400001440000000000010630324346011442 5dvbsnoop-1.4.50/src/private/userdefs.h0000744000076400001440000000165010354655552013363 /* $Id: userdefs.h,v 1.3 2005/12/29 02:43:38 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _USERDEFS_H_ #define _USERDEFS_H_ #include "descriptors/descriptor.h" typedef struct _PRIVATE_SECTION_STRUCTURES_FUNC { u_int table_id; /* section table ID */ void (*func)(); /* function for table decoding */ } PRIV_SECTION_ID_FUNC; typedef struct _PRIVATE_DESCRIPTOR_STRUCTURES_FUNC { u_int descriptor_tag; /* descriptor tag ID */ DTAG_SCOPE tag_scope; /* MPEG, DVB_SI, DSMCC_STREAM, ... */ void (*func)(); /* function for descriptor decoding */ } PRIV_DESCR_ID_FUNC; void section_PRIVATE (u_char *b, int len); void descriptor_PRIVATE (u_char *b, DTAG_SCOPE scope); void set_PRIVATE_ProviderStr (char *s); void list_PRIVATE_ProviderStrs (void); #endif dvbsnoop-1.4.50/src/private/Makefile.am0000744000076400001440000000026510141533054013411 AM_CPPFLAGS = -I$(top_srcdir)/src SUBDIRS = \ default \ premiere.de noinst_LIBRARIES = libprivate.a noinst_HEADERS = \ userdefs.h libprivate_a_SOURCES = \ userdefs.c dvbsnoop-1.4.50/src/private/Makefile.in0000644000076400001440000003545210630302144013424 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libprivate_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/private DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libprivate_a_AR = $(AR) $(ARFLAGS) libprivate_a_LIBADD = am_libprivate_a_OBJECTS = userdefs.$(OBJEXT) libprivate_a_OBJECTS = $(am_libprivate_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/userdefs.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libprivate_a_SOURCES) DIST_SOURCES = $(libprivate_a_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src SUBDIRS = \ default \ premiere.de noinst_LIBRARIES = libprivate.a noinst_HEADERS = \ userdefs.h libprivate_a_SOURCES = \ userdefs.c all: all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/private/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/private/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libprivate.a: $(libprivate_a_OBJECTS) $(libprivate_a_DEPENDENCIES) -rm -f libprivate.a $(libprivate_a_AR) libprivate.a $(libprivate_a_OBJECTS) $(libprivate_a_LIBADD) $(RANLIB) libprivate.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userdefs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-noinstLIBRARIES clean-recursive \ ctags ctags-recursive distclean distclean-compile \ distclean-generic distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/private/userdefs.c0000744000076400001440000001350610354655552013361 /* $Id: userdefs.c,v 1.4 2005/12/29 02:43:38 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) Private Sections & Descriptors -- will branch to default user section table or descriptor -- or to known specific private data structurs $Log: userdefs.c,v $ Revision 1.4 2005/12/29 02:43:38 rasc gcc fixes, man page update Revision 1.3 2005/12/22 16:21:51 rasc Update and new descriptors EN 300 468 v1.7.1 Revision 1.2 2005/08/10 21:28:18 rasc New: Program Stream handling (-s ps) Revision 1.1 2004/11/03 21:01:00 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #include "dvbsnoop.h" #include "userdefs.h" #include "descriptors/descriptor.h" #include "misc/output.h" #include "default/section_private_default.h" #include "default/descriptor_private_default.h" // // -- How does this work: // -- Sections tables or descriptors in different scopes (DVB_SI, MHP, etc.) // -- may have userdefined tables/descriptors. // -- This may differ or overlap between different providers (e.g. "premiere.de") // -- so we have a table reference e.g. "premiere.de" to a get-function // -- to get section tables and descriptor tag table data. // -- These two tables reference from table_id /descriptor_tag, etc. to a // -- decoding function // // // -- Table for getting reference functions for known provider strings/ids // -- reference functions gets known section & descriptor tag references // typedef struct _PRIVATE_PROVIDER_FUNC { char *str; /* e.g. "premiere.de" */ void (*func)(); /* function for getting table & descriptors */ } PRIV_PROVIDER_FUNC; // // -- defines for Provider Space descriptors and table references // -- provider names in lowercase!! // #include "premiere.de/premiere_de.h" static PRIV_PROVIDER_FUNC ppf[] = { { "premiere.de", getPrivate_PremiereDE }, { NULL, NULL } }; static char privProviderStr[32] = ""; static void *get_tag_table_for_ProviderStr (int type); // // -- Private Section Output // -- dvb default or known userdef/private section // void section_PRIVATE (u_char *b, int len) { PRIV_SECTION_ID_FUNC *t; u_int table_id; // -- get id/function reference table for provider str // -- get table for section tables t = (PRIV_SECTION_ID_FUNC *) get_tag_table_for_ProviderStr (0); // -- reference table for provider found ? // -- scan table ids for decode function if (t) { table_id = (u_int) b[0]; while (t->func && t->table_id) { if (t->table_id == table_id) { out_nl (3, "using private provider space: %s",privProviderStr); (*(t->func))(b,len); /* exec decode function */ return; } t++; } } // -- no private provider str match // -- or table id not found for provider // -- --> default userdef section decoding section_PRIVATE_default (b, len); } // // -- Private Descriptor Output // -- dvb default or known userdef/private descriptors // void descriptor_PRIVATE (u_char *b, DTAG_SCOPE tag_scope) { PRIV_DESCR_ID_FUNC *t; u_int descr_tag; // -- get id/function reference table for provider // -- get table for descriptors t = (PRIV_DESCR_ID_FUNC *) get_tag_table_for_ProviderStr (1); // -- reference table for provider found ? // -- scan descriptor tags and tag scopeIDs (DVB_SI, MPEG, etc.) // -- for decode function if (t) { descr_tag = (u_int) b[0]; while (t->func && t->descriptor_tag) { if ((t->descriptor_tag == descr_tag) && (t->tag_scope == tag_scope)) { out_nl (3, "using private provider space: %s",privProviderStr); (*(t->func))(b); /* exec decode function */ return; } t++; } } // -- no private provider match // -- or descriptor tag + descriptor tag scope not found for // -- priviate provider // -- --> default userdef descriptor decoding descriptor_PRIVATE_default (b); } // ------------------------------------------------------------------ // // -- Set provider str of private descriptors or tables // -- z.B. "premiere.de" // void set_PRIVATE_ProviderStr (char *s) { int i = sizeof (privProviderStr)-1; if (! s) s = ""; strncpy (privProviderStr,s,i); privProviderStr[i] = '\0'; } // // -- list all private provider strings (output) // void list_PRIVATE_ProviderStrs (void) { PRIV_PROVIDER_FUNC *t = ppf; while (t->str) { printf (" %s\n",t->str); t++; } return; } // // get_tag_table_for_ProviderStr (type=0,1) // -- get_section_refs_for_... (type=0) // -- get_descriptor_refs_for_... (type=1) // -- return: NULL (if no provider, or default) or ptr to reference tag table // static void *get_tag_table_for_ProviderStr (int type) { PRIV_PROVIDER_FUNC *t = ppf; if ((!privProviderStr) || privProviderStr[0] == '\0') { return NULL; } while (t->str && t->func) { if (! strcmp (t->str, privProviderStr) ) { PRIV_SECTION_ID_FUNC *psect; PRIV_DESCR_ID_FUNC *pdesc; // -- execute e.g. getPrivate_PremiereDE ( &psect, &pdesc); (*(t->func))(&psect, &pdesc); /* exec decode function */ return (type) ? (void *)pdesc : (void *)psect; } t++; } return NULL; } // $$$ TODO: change interface mimic (call priv. data decoding): // output if data matches for output // return: true/false if data was decoded // exec should be done to any standard table/descriptor checking // so we can overlay also standard descriptors/table (e.g. if change by provider) // --> see descriptor enhancments for e.g. IDSB (ARIB STD-10, japanese) // dvbsnoop-1.4.50/src/private/default/0000777000076400001440000000000010630324346013066 5dvbsnoop-1.4.50/src/private/default/descriptor_private_default.h0000744000076400001440000000145310356276740020604 /* $Id: descriptor_private_default.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: descriptor_private_default.h,v $ Revision 1.2 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/11/03 21:01:00 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #ifndef __DESCRIPTOR_PRIVATE_DEFAULT_H #define __DESCRIPTOR_PRIVATE_DEFAULT_H void descriptor_PRIVATE_default (u_char *b); #endif dvbsnoop-1.4.50/src/private/default/section_private_default.h0000744000076400001440000000054310356276740020071 /* $Id: section_private_default.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __SECTION_PRIVATE_DEFAULT_H #define __SECTION_PRIVATE_DEFAULT_H void section_PRIVATE_default (u_char *b, int len); #endif dvbsnoop-1.4.50/src/private/default/Makefile.am0000744000076400001440000000037210141526604015037 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libprivatedefault.a noinst_HEADERS = \ descriptor_private_default.h \ section_private_default.h libprivatedefault_a_SOURCES = \ descriptor_private_default.c \ section_private_default.c dvbsnoop-1.4.50/src/private/default/Makefile.in0000644000076400001440000002737510630302144015055 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libprivatedefault_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/private/default DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libprivatedefault_a_AR = $(AR) $(ARFLAGS) libprivatedefault_a_LIBADD = am_libprivatedefault_a_OBJECTS = descriptor_private_default.$(OBJEXT) \ section_private_default.$(OBJEXT) libprivatedefault_a_OBJECTS = $(am_libprivatedefault_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/descriptor_private_default.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/section_private_default.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libprivatedefault_a_SOURCES) DIST_SOURCES = $(libprivatedefault_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libprivatedefault.a noinst_HEADERS = \ descriptor_private_default.h \ section_private_default.h libprivatedefault_a_SOURCES = \ descriptor_private_default.c \ section_private_default.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/private/default/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/private/default/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libprivatedefault.a: $(libprivatedefault_a_OBJECTS) $(libprivatedefault_a_DEPENDENCIES) -rm -f libprivatedefault.a $(libprivatedefault_a_AR) libprivatedefault.a $(libprivatedefault_a_OBJECTS) $(libprivatedefault_a_LIBADD) $(RANLIB) libprivatedefault.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/descriptor_private_default.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section_private_default.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/private/default/descriptor_private_default.c0000744000076400001440000000203710356276740020576 /* $Id: descriptor_private_default.c,v 1.2 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Descriptors $Log: descriptor_private_default.c,v $ Revision 1.2 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/11/03 21:01:00 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #include "dvbsnoop.h" #include "descriptor_private_default.h" #include "misc/helper.h" #include "misc/output.h" /* User defined descriptor (Basic Descriptor output) ETSI 300 468 // ISO 13818-1 */ void descriptor_PRIVATE_default (u_char *b) { int len; // tag = b[0]; len = b[1]; print_databytes (4,"Descriptor-data:", b+2, len); } dvbsnoop-1.4.50/src/private/default/section_private_default.c0000744000076400001440000000476410356276740020075 /* $Id: section_private_default.c,v 1.2 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- User defined table // Private -- ISO 13818-1 // ITU H.222.0 private_section $Log: section_private_default.c,v $ Revision 1.2 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/11/03 21:01:00 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.5 2004/02/16 22:45:37 rasc small bugfix: crc is 32 bit Revision 1.4 2004/01/02 16:40:40 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.3 2004/01/01 20:09:31 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.2 2003/10/24 22:17:21 rasc code reorg... Revision 1.1 2003/10/19 13:59:00 rasc -more table decoding */ #include "dvbsnoop.h" #include "section_private_default.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" void section_PRIVATE_default (u_char *b, int len) { u_int table_id; u_int section_syntax_indicator; u_int section_length; out_nl (3,"User_Defined-decoding...."); table_id = outBit_S2x_NL (3,"Table_ID: ", b, 0, 8, (char *(*)(u_long))dvbstrTableID ); if (table_id < 0x80) { out_nl (3,"wrong Table ID"); return; } section_syntax_indicator = outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"private_section_length: ", b,12,12); if (section_syntax_indicator == 0) { b += 3; } else { outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); outBit_Sx_NL (6,"reserved: ", b, 40, 2); outBit_Sx_NL (3,"Version_number: ", b, 42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b, 48, 8); outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); b += 8; section_length -= (5+4); // 4: CRC } print_private_data (3,b,section_length); b += section_length; if (section_syntax_indicator != 0) { outBit_Sx_NL (5,"CRC: ", b, 0, 32); } } dvbsnoop-1.4.50/src/private/premiere.de/0000777000076400001440000000000010630324346013641 5dvbsnoop-1.4.50/src/private/premiere.de/premiere_de.h0000744000076400001440000000170410356276740016222 /* $Id: premiere_de.h,v 1.3 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private Data Structures for: -- Premiere.de $Log: premiere_de.h,v $ Revision 1.3 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2005/08/10 21:28:19 rasc New: Program Stream handling (-s ps) Revision 1.1 2004/11/03 21:01:02 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #ifndef _PREMIERE_DE_H #define _PREMIERE_DE_H_ #include "private/userdefs.h" void getPrivate_PremiereDE ( PRIV_SECTION_ID_FUNC **psect, PRIV_DESCR_ID_FUNC **pdesc); #endif dvbsnoop-1.4.50/src/private/premiere.de/dvb_descriptor_premiere.h0000744000076400001440000000206510414525006020627 /* $Id: dvb_descriptor_premiere.h,v 1.3 2006/04/04 17:16:54 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- private DVB Descriptors Premiere.de $Log: dvb_descriptor_premiere.h,v $ Revision 1.3 2006/04/04 17:16:54 rasc finally fix typo in premiere descriptor name Revision 1.2 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/11/03 21:01:02 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #ifndef _PREMIERE_DVB_DESCRIPTOR_H #define _PREMIERE_DVB_DESCRIPTOR_H void descriptor_PRIVATE_PremiereDE_ContentOrder (u_char *b); void descriptor_PRIVATE_PremiereDE_ParentalInformation (u_char *b); void descriptor_PRIVATE_PremiereDE_ContentTransmission (u_char *b); #endif dvbsnoop-1.4.50/src/private/premiere.de/section_premiere_cit.h0000744000076400001440000000053510356276740020136 /* $Id: section_premiere_cit.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _SECTION_PREMIERE_CIT_H #define _SECTION_PREMIERE_CIT_H void section_PRIVATE_PremiereDE_CIT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/private/premiere.de/section_premiere_cpt.h0000744000076400001440000000053510356276740020145 /* $Id: section_premiere_cpt.h,v 1.2 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _SECTION_PREMIERE_CPT_H #define _SECTION_PREMIERE_CPT_H void section_PRIVATE_PremiereDE_CPT (u_char *b, int len); #endif dvbsnoop-1.4.50/src/private/premiere.de/Makefile.am0000744000076400001440000000051010141772530015605 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libprivatePremiereDE.a noinst_HEADERS = \ premiere_de.h \ dvb_descriptor_premiere.h \ section_premiere_cit.h \ section_premiere_cpt.h libprivatePremiereDE_a_SOURCES = \ premiere_de.c \ dvb_descriptor_premiere.c \ section_premiere_cit.c \ section_premiere_cpt.c dvbsnoop-1.4.50/src/private/premiere.de/Makefile.in0000644000076400001440000003025510630302145015620 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libprivatePremiereDE_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/private/premiere.de DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libprivatePremiereDE_a_AR = $(AR) $(ARFLAGS) libprivatePremiereDE_a_LIBADD = am_libprivatePremiereDE_a_OBJECTS = premiere_de.$(OBJEXT) \ dvb_descriptor_premiere.$(OBJEXT) \ section_premiere_cit.$(OBJEXT) section_premiere_cpt.$(OBJEXT) libprivatePremiereDE_a_OBJECTS = $(am_libprivatePremiereDE_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dvb_descriptor_premiere.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/premiere_de.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/section_premiere_cit.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/section_premiere_cpt.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libprivatePremiereDE_a_SOURCES) DIST_SOURCES = $(libprivatePremiereDE_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libprivatePremiereDE.a noinst_HEADERS = \ premiere_de.h \ dvb_descriptor_premiere.h \ section_premiere_cit.h \ section_premiere_cpt.h libprivatePremiereDE_a_SOURCES = \ premiere_de.c \ dvb_descriptor_premiere.c \ section_premiere_cit.c \ section_premiere_cpt.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/private/premiere.de/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/private/premiere.de/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libprivatePremiereDE.a: $(libprivatePremiereDE_a_OBJECTS) $(libprivatePremiereDE_a_DEPENDENCIES) -rm -f libprivatePremiereDE.a $(libprivatePremiereDE_a_AR) libprivatePremiereDE.a $(libprivatePremiereDE_a_OBJECTS) $(libprivatePremiereDE_a_LIBADD) $(RANLIB) libprivatePremiereDE.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dvb_descriptor_premiere.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/premiere_de.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section_premiere_cit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section_premiere_cpt.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/private/premiere.de/premiere_de.c0000744000076400001440000000402610414525006016200 /* $Id: premiere_de.c,v 1.5 2006/04/04 17:16:54 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- User defined table // Private -- Premiere Content Information Table CIT $Log: premiere_de.c,v $ Revision 1.5 2006/04/04 17:16:54 rasc finally fix typo in premiere descriptor name Revision 1.4 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.3 2005/08/10 21:28:19 rasc New: Program Stream handling (-s ps) Revision 1.2 2005/06/29 17:30:38 rasc some legal notes... Revision 1.1 2004/11/03 21:01:02 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #include "dvbsnoop.h" #include "premiere_de.h" #include "section_premiere_cit.h" #include "section_premiere_cpt.h" #include "dvb_descriptor_premiere.h" /* Please check for legal issues, when using provider specific data structures in your own software! Using these data structures may require a certification or licensing process by the provider. */ static PRIV_DESCR_ID_FUNC pdescriptors[] = { { 0xF0, DVB_SI, descriptor_PRIVATE_PremiereDE_ContentOrder }, { 0xF1, DVB_SI, descriptor_PRIVATE_PremiereDE_ParentalInformation }, { 0xF2, DVB_SI, descriptor_PRIVATE_PremiereDE_ContentTransmission }, { 0x00, 0, NULL } // end of table (id = 0x00, funct = NULL) }; static PRIV_SECTION_ID_FUNC psections[] = { { 0xA0, section_PRIVATE_PremiereDE_CIT }, { 0xA1, section_PRIVATE_PremiereDE_CPT }, { 0x00, NULL } // end of table (id = 0x00, funct = NULL) }; // // -- Return private section/descriptor id tables // -- for this scope // void getPrivate_PremiereDE ( PRIV_SECTION_ID_FUNC **psect, PRIV_DESCR_ID_FUNC **pdesc) { *psect = psections; *pdesc = pdescriptors; } dvbsnoop-1.4.50/src/private/premiere.de/dvb_descriptor_premiere.c0000744000076400001440000000736410414525006020631 /* $Id: dvb_descriptor_premiere.c,v 1.4 2006/04/04 17:16:54 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Private DVB Descriptors Premiere.de $Log: dvb_descriptor_premiere.c,v $ Revision 1.4 2006/04/04 17:16:54 rasc finally fix typo in premiere descriptor name Revision 1.3 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/11/04 19:21:11 rasc Fixes and changes on "premiere.de" private sections Cleaning up "premiere.de" private descriptors (should be final now) Revision 1.1 2004/11/03 21:01:02 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #include "dvbsnoop.h" #include "dvb_descriptor_premiere.h" #include "strings/dvb_str.h" #include "misc/hexprint.h" #include "misc/output.h" /* * * Private DVB descriptors * User Space: Premiere privat (www.premiere.de) * * basic code snipset provided by Peter.Pavlov, Premiere 2004-10 * */ /* 0xF0 Content Order Descriptor PTS 60 04 101 v 1.0.1 17.06.2004 */ void descriptor_PRIVATE_PremiereDE_ContentOrder (u_char *b) { int tag, len; tag = b[0]; len = b[1]; out_nl (4,"--> Premiere Content Order descriptor "); b+=2; out_SB_NL (5,"Order_number_length: ", *b); print_text_468A (4, "Order_number: ", b+1, *b); b += *b + 1; out_SB_NL (5,"Order_price_length: ", *b); print_text_468A (4, "Order_price: ", b+1, *b); b += *b + 1; out_SB_NL (5,"Order_phone_number_length: ", *b); print_text_468A (4, "Order_phone_number: ", b+1, *b); b += *b + 1; out_SB_NL (5,"SMS_order_information_length: ", *b); print_text_468A (4, "SMS_order_information: ", b+1, *b); b += *b + 1; out_SB_NL (5,"URL_order_information_length: ", *b); print_text_468A (4, "URL_order_information: ", b+1, *b); } /* Premiere privat 0xF1 Parent Information Descriptor PTS 60 04 101 v 1.0.1 17.06.2004 */ void descriptor_PRIVATE_PremiereDE_ParentalInformation (u_char *b) { int tag, len; tag = b[0]; len = b[1]; out_nl (4,"--> Premiere Parental Information descriptor "); b += 2; out_SB_NL (5,"rating: ", *b); out_nl (4,"Controll_time_t1: %02x:%02x:%02x", b[1], b[2], b[3]); out_nl (4,"Controll_time_t2: %02x:%02x:%02x", b[4], b[5], b[6]); b += 7; out_SB_NL (5,"Parental_information_length: ", *b); print_text_468A (4, "Parental_information: ", b+1, *b); } /* Premiere privat 0xF2 Content Transmission Descriptor PTS 60 04 101 v 1.0.1 17.06.2004 */ void descriptor_PRIVATE_PremiereDE_ContentTransmission (u_char *b) { int len, str_tim_len; u_int time_MJD, time_UTC; // tag = b[0]; len = b[1]; out_nl (4,"--> Premiere Content Transmission descriptor "); outBit_Sx_NL (4,"transport_stream_ID: ", b, 16, 16); outBit_S2x_NL (4,"original_network_id: ", b, 32, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_S2Tx_NL(4,"service_ID: ", b, 48, 16, " --> refers to PMT program_number"); b += 8; len -= 6; out_NL(4); while (len>0) { out (4,"Start_date: "); time_MJD = getBits (b, 0, 0, 16); print_time_mjd (4, time_MJD); out_NL (4); str_tim_len = outBit_Sx_NL (5,"start_time_loop_length: ", b, 16, 8); b += 3; len -= 3; indent (+1); for(; str_tim_len>0; str_tim_len-=3) { out (4,"Start_time: "); time_UTC = getBits (b, 0, 0, 24); print_time_utc (4, time_UTC); out_NL (4); b += 3; len -= 3; } out_NL (4); indent (-1); } } dvbsnoop-1.4.50/src/private/premiere.de/section_premiere_cit.c0000744000076400001440000000517210356276740020133 /* $Id: section_premiere_cit.c,v 1.3 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- User defined table // Private -- Premiere Content Information Table CIT $Log: section_premiere_cit.c,v $ Revision 1.3 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/11/04 19:21:11 rasc Fixes and changes on "premiere.de" private sections Cleaning up "premiere.de" private descriptors (should be final now) Revision 1.1 2004/11/03 21:01:02 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #include "dvbsnoop.h" #include "section_premiere_cit.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" void section_PRIVATE_PremiereDE_CIT (u_char *b, int len) { u_int table_id; u_int section_syntax_indicator; u_int section_length; out_nl (3,"User_Defined-decoding...."); table_id = outBit_S2Tx_NL (3,"Table_ID: ", b, 0, 8, "Premiere Content Information Table"); if (table_id != 0xa0) { out_nl (3,"wrong Table ID"); return; } section_syntax_indicator = outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); // ==1 outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"private_section_length: ", b,12,12); outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); outBit_Sx_NL (6,"reserved: ", b, 40, 2); outBit_Sx_NL (3,"Version_number: ", b, 42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b, 48, 8); outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); b += 8; section_length -= 5; // // -- Premiere Content Information Table CIT // -- provided by Peter.Pavlov (Premiere.de) // out_NL (3); outBit_Sx_NL (3,"Content id: ", b, 0, 32); outBit_Sx_NL (3,"Duration: ", b, 32,24); outBit_Sx_NL (3,"Reserved: ", b, 56, 4); outBit_Sx_NL (5,"descriptor_section_length: ", b, 60,12); b += 9; section_length -=9; while (section_length > 4 ) { int x; x = descriptor (b, DVB_SI); if (section_length < x) break; b += x; section_length -= x; } outBit_Sx_NL (5,"CRC: ", b, 0, 32); } dvbsnoop-1.4.50/src/private/premiere.de/section_premiere_cpt.c0000744000076400001440000000711610356276740020142 /* $Id: section_premiere_cpt.c,v 1.3 2006/01/02 18:24:16 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- User defined table // Private -- Premiere Content Information Table CIT $Log: section_premiere_cpt.c,v $ Revision 1.3 2006/01/02 18:24:16 rasc just update copyright and prepare for a new public tar ball Revision 1.2 2004/11/04 19:21:11 rasc Fixes and changes on "premiere.de" private sections Cleaning up "premiere.de" private descriptors (should be final now) Revision 1.1 2004/11/03 21:01:02 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections */ #include "dvbsnoop.h" #include "section_premiere_cpt.h" #include "descriptors/descriptor.h" #include "strings/dvb_str.h" #include "misc/output.h" #include "misc/hexprint.h" void section_PRIVATE_PremiereDE_CPT (u_char *b, int len) { u_int table_id; u_int section_syntax_indicator; u_int section_length; u_int time_MJD, time_UTC; u_int i, content_list_length; out_nl (3,"User_Defined-decoding...."); table_id = outBit_S2Tx_NL (3,"Table_ID: ", b, 0, 8, "Premiere Content Presentation Table"); if (table_id != 0xa1) { out_nl (3,"wrong Table ID"); return; } section_syntax_indicator = outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); // == 1 outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"private_section_length: ", b,12,12); outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); outBit_Sx_NL (6,"reserved: ", b, 40, 2); outBit_Sx_NL (3,"Version_number: ", b, 42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b, 48, 8); outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); b += 8; section_length -= 5; // // -- Premiere Content Presentation Table CIT // -- provided by Peter.Pavlov (Premiere.de) // outBit_Sx_NL (4,"Transport_stream_ID: ",b, 0, 16); outBit_Sx_NL (4,"Original_network_ID: ",b, 16, 16); outBit_Sx_NL (4,"virtual_channel_id: ",b, 32, 32); outBit_Sx_NL (4,"virtual_channel_name_length: ",b, 64, 8); b+=8; print_text_468A (4, "virtual_channel_name: ", b+1, *b); section_length -= 9+*b; b += *b+1; outBit_Sx_NL (4,"reserved: ",b, 0, 4); outBit_Sx_NL (4,"virtual_channel_info_length: ",b, 4, 12); b+=2; section_length -= 2; while (section_length > 4) { time_MJD = getBits (b, 0, 0, 16); time_UTC = getBits (b, 0, 16, 24); out (4,"start_time: "); print_time40 (4, time_MJD, time_UTC); out_NL (4); out_nl (4,"duration: %02x:%02x:%02x", *(b+5), *(b+6), *(b+7)); b+=8; outBit_Sx_NL (4,"virtual_event_name_length: ",b, 0, 8); print_text_468A (4, "virtual_event_name: ", b+1, *b); section_length -= *b+9; b += *b+1; outBit_Sx_NL (4,"virtual_event_info_length: ",b, 0, 8); print_text_468A (4, "virtual_event_info: ", b+1, *b); section_length -= *b+1; b += *b+1; outBit_Sx_NL (4,"reserved: ",b, 0, 4); outBit_Sx_NL (4,"content_list_length: ",b, 4, 12); content_list_length = ((b[0]&15)<<8)+b[1]; for(i=0, b+=2; i // - the first 3 bytes are not part of this module // (anyway, the clock-run-in is not part of dvb) // we start with Magazine_and_Packet_addr... // - before any decoding, the data packets has to be transformed // from LSB...MSB (bits) to the internal CPU format. // Warning: Byte order will not be changed, only bit order in bytes! // ==> so: LSB, MSB words habe still to be tranformed, if needed // // ==> // - Some codes are protected by Hamming code 8/4. // - Some codes are protected by Hamming code 24/18. // // // -- decode & print magazine & packet address // -- print page_nr, subpage_nr, if given // -- !!! BUFFER BYTES HAVE TO BE ALREADY INVERTED! // -- return: len of decoded bytes // int print_teletext_control_decode (int v, u_char *b, int len) { int x; int packet_nr = -1; int mag_nr = -1; int page_nr = -1; int sub_page_nr = -1; // -- buffer starts with magazine_and_packet_addr // -- len should be 42 bytes // PES_data_field(){ // data_identifier 8 uimsbf // for(i=0;i magazine_and_packet_address 16 bslbf // --> data_block 320 bslbf // } // -- packet nr // -- magazine nr x = unhamW84(*b,*(b+1)); packet_nr = (x >> 3) & 0x1F; mag_nr = x & 7; if (! mag_nr) mag_nr = 8; // $$$ TODO is this really correct? out_SB_NL (v,"magazine number (X): ",mag_nr); out_S2W_NL (v,"packet number (Y): ",packet_nr, dvbstrTELETEXT_packetnr(packet_nr) ); // -- normal display packet... if (packet_nr > 0 && packet_nr <= 25) { unParityTeletextData (b+2, len-2); print_teletext_data_x0_x25 (v,"packet data (parity stripped):", b+2, len-2); return len; } // -- special packets? // -- Packets X/26, X/28 and M/29 can carry data to enhance a basic Level 1 // -- Teletext page. The general coding scheme is shown in figure 11. Byte 6 // -- is used as an additional address byte (designation code), coded Hamming // -- 8/4. This allows up to 16 versions of each packet type. The remaining // -- 39 bytes are Hamming 24/18 coded, grouped as 13 triplets. if (packet_nr > 25) { int designation; designation = unhamB84(*(b+2)) & 0x0F; out_SB_NL (v,"designation code: ",designation); print_databytes (4,"packet data (hamming 24/18):", b+3, len-3); // $$$ TODO hamming24_18 triplets // ... unham24_18 b+3,len-3 // packet_x26_to_m29 (packet_nr, mag_nr, designation, unhamed_buffer); // $$$ TODO $$ DEBUG // { // u_char xx[len]; // u_char *xb = b+3; // int xlen = len-3; // out_nl (4," DEBUG $$$: len %d ", len-3); // while (xlen > 0) { //........ // } // // } return len; } // -- page header!! (Packet_nr == 0) // if (packet_nr != 0) return max_len; // -- page nr, etc. // -- sub page nr // EN 300 706 // The Page Address consists of a Page Number (see clause 9.3.1.1) and a // Page Sub-code (see clause 9.3.1.2). The Page Address may take any value // except: Page Number = FF and Sub-code = 3F7F. The address XFF:3F7F is // reserved as a null page address. // If a magazine has only one displayable page (and in some other // circumstances), it may be necessary to indicate the completion of the // transmission of that page by closing it with another page header packet. // Headers with pages addresses in the range XFF:0000 to XFF:3F7E are // defined for use for this purpose. These headers may be referred to as // "Time Filling Headers", when they are used to keep the real-time clock // field updated in a magazine in parallel transmission mode. page_nr = (unhamB84(*(b+2)) & 0xF) | ( (unhamB84(*(b+3)) & 0xF) << 4); sub_page_nr = ( unhamW84(*(b+4),*(b+5)) | (unhamW84(*(b+6),*(b+7)) << 8) ) & 0x3F7F; out_SW_NL (v,"page number: ",page_nr); out_SW_NL (v,"sub-page number: ",sub_page_nr); // -- special pages (A.10) { char *s = ""; int x = (mag_nr<<8 | page_nr); if (x == 0x1BE) s = "Automatic Channel Installation (ACI)"; if (x == 0x1F0) s = "Basic TOP Table (BTT)"; if (page_nr == 0xFD) s = "Magazine Inventory Page (MIP)"; if (page_nr == 0xFE) s = "Magazine Organization Table (MOT)"; if (page_nr == 0xFF) s = "Time filling and terminator"; if (page_nr == 0xFF && sub_page_nr == 0x3F7F) s = "Null packet"; if (*s) out_nl (v," ==> %s ",s); } out_nl (v," ==> teletext display page number: %x%02x/%x",mag_nr,page_nr,sub_page_nr); if (page_nr == 0xFF && sub_page_nr == 0x3F7F) return 8; // -- Control bits S. 26 EN 300 706 // -- don't do unham, get bits directly out of hamming code { u_char x; int c4,c5,c6,c7,c8,c9,c10,c11; c4 = *(b+5) & 0x80; // bit 8 x = *(b+7); c5 = x & 0x20; // bit 6 c6 = x & 0x80; // bit 7 x = *(b+8); c7 = x & 0x02; // bit 2 c8 = x & 0x08; // bit 4 c9 = x & 0x20; // bit 6 c10= x & 0x80; // bit 8 c11 = *(b+9) & 0x02; // bit 2 if (c4|c5|c6|c7|c8|c9|c10|c11) { out_nl (v,"Control bits:"); indent (+1); if (c4) out_nl(v,"C4 = Erase page"); if (c5) out_nl(v,"C5 = Newsflash"); if (c6) out_nl(v,"C6 = Subtitle"); if (c7) out_nl(v,"C7 = Suppress header"); if (c8) out_nl(v,"C8 = Update indicator"); if (c9) out_nl(v,"C9 = Interrupted sequence"); if (c10) out_nl(v,"C10 = Inhibit display"); if (c11) out_nl(v,"C11 = Magazine serial"); indent (-1); } } // -- country/language code (c12,c13,c14) { int lang; lang = (unhamB84(*(b+9)) >> 1) & 7; // unhammed bits 4,6,8 out_S2B_NL (v,"Character subset (c12-c14): ", lang, dvbstrTELETEXT_lang_code(lang) ); } // Bytes 14 to 45 in page header packets carry 32 character or display // control codes, coded 7 data bits plus one bit odd parity. They are // normally intended for display. Bytes 38 to 45 are usually coded to // represent a real-time clock. // -- timestring, etc. unParityTeletextData (b+10, len-10); print_teletext_data_x0_x25 (v,"page header display string:", b+10, len-10); // print_std_ascii (v, "page header dispay string: ", b+10, len-10); return len; } // -- display teletext data x0..x24 void print_teletext_data_x0_x25 (int v, char *s, u_char *b, int len) { // $$$ TODO -- decode display codes c < 0x20 print_databytes (v, s, b, len); } // $$$ TODO Packet 30/8 -- EN 300 231 8.2.1 (VPS via Teletext) // // dvbsnoop-1.4.50/src/ebu/vps.c0000744000076400001440000001041210356276724011445 /* $Id: vps.c,v 1.4 2006/01/02 18:24:03 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- misc routines for EBU Video Programming System -- EN 300 231 8.2.2 $Log: vps.c,v $ Revision 1.4 2006/01/02 18:24:03 rasc just update copyright and prepare for a new public tar ball Revision 1.3 2004/03/10 21:05:53 rasc WSS (Wide Screen Signalling) data decoding Revision 1.2 2004/03/09 21:57:58 rasc VPS decoding (fix NPP) Revision 1.1 2004/03/09 20:59:22 rasc VPS decoding (someone check the NPP & PTY code output please...) */ #include "dvbsnoop.h" #include "vps.h" #include "strings/dvb_str.h" #include "misc/helper.h" #include "misc/hexprint.h" #include "misc/output.h" // vps_data_block: this field corresponds to the 13 data bytes of a // VPS line as described in clause 8.2.2.2 of EN 300 231, excluding the // run-in and start code byte. So, byte 3 up to and including 15 are // coded. Data bits are inserted in the PES packet in the same order, // as they would appear in the VBI. // The parameters listed in clause 6.1 can be regarded as data fields. // The data-field length and structure is given hereafter, taking into // account that bit b1 of a data field is the first bit transmitted. // Unless otherwise specified, a parameter transmitted with all bits set // to logical "1" should be regarded as carrying irrelevant information. // The transport of the recording-control commands for suitably equipped // receiving equipment makes use of a dedicated line in the field-blanking // interval of a video signal (in Germany, Austria and Switzerland, line // 16 is dedicated for this purpose). This transport method is able to // carry the parameters CNI, PIL, PCS and PTY. // -- print VPS codes // -- !!! BUFFER BYTES HAVE TO BE ALREADY INVERTED! (if needed) // -- return: len of decoded bytes int print_vps_decode (int v, u_char *b, int len) { // warning! Nipples e.g. _2_7 may not be msb...lsb order! // see: ETSI EN 300 231 for this notation! u_int pcs; u_int cni_1_4; u_int pil; u_int pty; u_int day, month, hour, minute; u_int country_5_8; u_int npp, npp_0_1, npp_2_7; out_nl (v,"VPS data:"); print_databytes (8,"Data:", b, len); indent (+1); // -- starts at EN 300 231 8.2.2 Fig.9 Table // -- Byte 3..15 , so byte 3 => [0] // -- vps_data_block: // -- Byte 3+4: not relevant outBit_Sx_NL (v,"(not relevant to PDC): ", b, 0, 16); // -- PCS pcs = outBit_S2x_NL (v,"PCS audio: ", b+2, 0, 2, (char *(*)(u_long)) dvbstrVPS_pcs_audio ); pcs = outBit_Sx_NL (v,"PCS reserved: ", b+2, 2, 2); cni_1_4 = outBit_Sx (v,"CNI reserved: ", b+2, 4, 4); if (cni_1_4 == 0x0F) out_nl (4, " [= Unenhanced VPS]"); else out_nl (4, " [= Enhanced VPS]"); outBit_Sx_NL (v,"(not relevant to PDC): ", b+3, 0, 24); // byte 6..10 outBit_Sx_NL (v,"(not relevant to PDC): ", b+3, 24, 16); pil = getBits (b, 8, 2, 20); npp_0_1 = getBits (b, 8, 0, 2); day = getBits (b, 8, 2, 5); month = getBits (b, 8, 7, 4); hour = getBits (b, 8, 11, 5); minute = getBits (b, 8, 16, 6); country_5_8 = getBits (b, 8, 22, 4); npp_2_7 = getBits (b, 8, 26, 6); pty = getBits (b, 8, 32, 8); // byte 15 out_SB_NL (v,"NPP_1: ", npp_0_1); out_ST (v,"Program Identificaion Label (PIL): ", pil); if (day != 0x00) { out_nl (v," [= month=%d day=%d hour=%d min=%d]", month, day, hour, minute); } else { char *s; switch (pil) { case 0x07FFF: s = "Timer-control code (TC)"; break; case 0x07FBF: s = "Record inhibit/Terminate (RI/T)"; break; case 0x07F7F: s = "Interrruption code (INT)"; break; case 0x07F3F: s = "Continuation code"; break; case 0xFFFFF: s = "Program selected by PTY"; break; default: s = "UNKOWN code"; break; } out_nl (v," [= %s]",s); } out_S2B_NL (v,"Country: ", country_5_8, dvbstrVPS_cni_countrycode(1+(country_5_8 << 4)) ); out_SB_NL (v,"NPP_2: ", npp_2_7); npp = (npp_0_1 << 6) + (npp_2_7); // msb ... lsb out_S2B_NL (v," ==> Network/Program Provider (NPP): ", npp, dvbstrVPS_npp(npp) ); out_S2B_NL (v,"Program Type (PTY): ", pty, dvbstrVPS_pty(pty) ); indent (-1); return len; } dvbsnoop-1.4.50/src/ebu/wss.c0000744000076400001440000000370710356276724011462 /* $Id: wss.c,v 1.2 2006/01/02 18:24:03 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- misc routines for EBU WSS (Wide Screen Signalling) -- ETSI EN 300 294 $Log: wss.c,v $ Revision 1.2 2006/01/02 18:24:03 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/03/10 21:05:53 rasc WSS (Wide Screen Signalling) data decoding */ #include "dvbsnoop.h" #include "wss.h" #include "strings/dvb_str.h" #include "misc/helper.h" #include "misc/hexprint.h" #include "misc/output.h" // -- print WSS codes (Wide Screen Signalling) // -- length = 14 bit void print_wss_decode (int v, u_char *b) { outBit_Sx_NL (v,"WSS data: ", b, 0,14); // -- data is lsb ... msb !!! // -- we don't correct this here, but are working with reversed values indent (+1); // data group 1 outBit_S2x_NL (v,"==> aspect ratio: ", b, 0, 4, (char *(*)(u_long)) dvbstrWSS_aspect_ratio ); // data group 2 outBit_S2x_NL (v,"==> film bit: ", b, 4, 1, (char *(*)(u_long)) dvbstrWSS_film_bit); outBit_S2x_NL (v,"==> colour coding bit: ",b, 5, 1, (char *(*)(u_long)) dvbstrWSS_color_coding_bit); outBit_S2x_NL (v,"==> helper bit: ", b, 6, 1, (char *(*)(u_long)) dvbstrWSS_helper_bit); outBit_Sx_NL (v,"==> reserved bit: ", b, 7, 1); // data group 3 outBit_S2x_NL (v,"==> subtitle/teletext: ", b, 8, 1, (char *(*)(u_long)) dvbstrWSS_subtitleTeletext_bit); outBit_S2x_NL (v,"==> subtitling mode: ", b, 9, 2, (char *(*)(u_long)) dvbstrWSS_subtitling_mode); // data group 4 outBit_S2x_NL (v,"==> surround bit: ", b, 11, 1, (char *(*)(u_long)) dvbstrWSS_surround_bit); outBit_S2x_NL (v,"==> copyright bit: ", b, 12, 1, (char *(*)(u_long)) dvbstrWSS_copyright_bit); outBit_S2x_NL (v,"==> copy_generation bit: ", b, 13, 1, (char *(*)(u_long)) dvbstrWSS_copy_generation_bit); indent (-1); } dvbsnoop-1.4.50/src/ebu/ebu_misc.c0000744000076400001440000001556310356276724012437 /* $Id: ebu_misc.c,v 1.5 2006/01/02 18:24:03 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- misc. routines for -- EBU data (see EN 300 472, EN 301 775, and some more) -- Teletext, VPS, WSS, closed caption, etc. $Log: ebu_misc.c,v $ Revision 1.5 2006/01/02 18:24:03 rasc just update copyright and prepare for a new public tar ball Revision 1.4 2005/01/17 19:41:22 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.3 2004/11/04 19:21:11 rasc Fixes and changes on "premiere.de" private sections Cleaning up "premiere.de" private descriptors (should be final now) Revision 1.2 2004/02/05 10:30:56 rasc no message Revision 1.1 2004/02/04 22:36:27 rasc more EBU/teletext stuff */ #include "dvbsnoop.h" #include "ebu_misc.h" #include "strings/dvb_str.h" #include "misc/helper.h" #include "misc/hexprint.h" #include "misc/output.h" // -- some tables and some routines basics // -- are from dvbtext (c) Dave Chapman and // -- originally from Ralph Metzler's vbidecode package. // -- other basic considerations are transfered from tuxtxt (c) LazyT // // Inverttab // -- LSb... MSb -> MSb...LSb // -- shift transmission order of // -- bits (12345678) -> cpu order (87654321) // static u_char invtab[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, }; // // -- Invert Character/Buffer (LSb/MSb) // -- bitreverse character/buffer (per char) // u_char invertChar (u_char *b) { return invtab[ *b ]; } void invertBuffer (u_char *b, int len) { int i; for (i=0; i 8 bit) // -- input byte order: LSB, MSB // FROM vbidecode u_char unhamW84 (u_char lsb, u_char msb) { u_char c1,c2; c1=unham84tab[lsb]; c2=unham84tab[msb]; // if ((c1 | c2) & 0x40) bad ham! return (c2 << 4) | (c1 & 0x0f); } // -- simple unham Byte 8_4 (1 bytes -> 4 bit) u_char unhamB84 (u_char c) { return unham84tab[c]; } // // -- simple unham Triplet 24_18 (3 bytes -> 18 bit) // -- teletext data needs to be 'normalized' // // -- Hamming Code (24:18) // // Byte N Byte N + 1 Byte N + 2 //bit 1 2 3 4 5 6 7 8 | 9 10 11 12 13 14 15 16 | 17 18 19 20 21 22 23 24 // P1 P2 D1 P3 D2 D3 D4 P4 | D5 D6 D7 D8 D9 D10 D11 P5 | D12 D13 D14 D15 D16 D17 D18 P6 // // P = Control/Parity bit, D = Data bit // // because we are on "digital TV", I will keep this simple, // we don't need to mess with parity bits. TS-Packets should do the integrity // protection... (hopefully) // u_long unhamT24_18 (u_char lsb, u_char msb1, u_char msb2) { u_long v; // Hamming Code (24:18) v = 0; v |= (lsb & 0x04) >> 2; // D1 v |= (lsb & 0x70) >> 3; // D2..D4 v |= ((msb1 & 0x7F ) << 8); // D5..D11 v |= ((msb2 & 0x7F ) << 16); // D12..D18 // $$$ TODO parity check, etc. return v; } // -- output EBU reserved, field_parity, line_offset // -- length: 1 byte void ebu_rfl_out (int v, u_char *b) { outBit_Sx_NL (6,"reserved: ", b, 0, 2); outBit_Sx_NL (v,"field_parity: ", b, 2, 1); outBit_Sx_NL (v,"line_offset: ", b, 3, 5); } dvbsnoop-1.4.50/src/net_ip/0000777000076400001440000000000010630324347011247 5dvbsnoop-1.4.50/src/net_ip/ip.h0000744000076400001440000000044210477036214011747 /* $Id: datagram.h,v 1.6 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef _IP_H #define _IP_H void net_IP_data (int v, u_char *b, int len); #endif dvbsnoop-1.4.50/src/net_ip/Makefile.am0000744000076400001440000000017510477037052013226 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libnetip.a noinst_HEADERS = \ ip.h libnetip_a_SOURCES = \ ip.c dvbsnoop-1.4.50/src/net_ip/Makefile.in0000644000076400001440000002632010630302142013220 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libnetip_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/net_ip DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libnetip_a_AR = $(AR) $(ARFLAGS) libnetip_a_LIBADD = am_libnetip_a_OBJECTS = ip.$(OBJEXT) libnetip_a_OBJECTS = $(am_libnetip_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/ip.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libnetip_a_SOURCES) DIST_SOURCES = $(libnetip_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libnetip.a noinst_HEADERS = \ ip.h libnetip_a_SOURCES = \ ip.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/net_ip/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/net_ip/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libnetip.a: $(libnetip_a_OBJECTS) $(libnetip_a_DEPENDENCIES) -rm -f libnetip.a $(libnetip_a_AR) libnetip.a $(libnetip_a_OBJECTS) $(libnetip_a_LIBADD) $(RANLIB) libnetip.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ip.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/net_ip/ip.c0000744000076400001440000000676110477042245011755 /* $Id: datagram.c,v 1.19 2006/01/02 18:23:47 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Network IP data -- RFC 791 IPv4 -- RFC 2460 IPv6 -- RFC 768 UDP IP & UDP header code provided by Stéphane Esté-Gracias $Log: datagram.c,v $ */ #include "dvbsnoop.h" #include "misc/hexprint.h" #include "misc/output.h" // // -- IP datagramm bytes decoding... // void net_IP_data (int v, u_char *b, int len) { int ip_version; int protocol = -1; // print_databytes (v, "IP_datagram_bytes", b, len); out_NL (v); out_nl (v,"IP_datagram_bytes:"); indent (+1); ip_version = outBit_Sx_NL (v, "Version: ", b, 0, 4); if (ip_version == 4) { // -- RFC 791 IPv4 int header_len; int ip; header_len = outBit_Sx_NL (v, "IP header length: ", b, 4, 4); outBit_Sx_NL (v, "Type of service: ", b, 8, 8); outBit_Sx_NL (v, "Total length: ", b, 16, 16); outBit_Sx_NL (v, "Identification: ", b, 32, 16); outBit_Sx_NL (v, "Reserved: ", b, 48, 1); outBit_Sx_NL (v, "DF: ", b, 49, 1); outBit_Sx_NL (v, "MF: ", b, 50, 1); outBit_Sx_NL (v, "Fragment offset: ", b, 51, 13); outBit_Sx_NL (v, "Time to live: ", b, 64, 8); protocol = outBit_Sx_NL (v, "Protocol: ", b, 72, 8); outBit_Sx_NL (v, "Header checksum: ", b, 80, 16); ip = getBits (b, 0, 96, 32); out (v,"Source address: %08lx [= ", ip); displ_IPv4_addr (v, ip); out_nl (v,"]"); ip = getBits (b, 0, 128, 32); out (v,"Destination address: %08lx [= ", ip); displ_IPv4_addr (v, ip); out_nl (v,"]"); b += (5*4); // 5*4 = header length len -= (5*4); // -- IPv4 Options & Padding // --- n = number of options // --- Total bit length: ( ( 5+n ) * 32 ), 5 is minimum header if (header_len > 5) { // -- TODO Options & Padding print_databytes (v, "Options & Padding ", b, len); b += (header_len-5)*4; len -= (header_len-5)*4; } } else if (ip_version == 6) { // -- RFC 2460 for IPv6 struct IPv6ADDR x; outBit_Sx_NL (v, "Traffic class: ", b, 4, 8); outBit_Sx_NL (v, "Flow label: ", b, 12, 20); outBit_Sx_NL (v, "Payload length: ", b, 32, 16); protocol = outBit_Sx_NL (v, "Next header: ", b, 48, 16); outBit_Sx_NL (v, "Hop limit: ", b, 64, 16); getIPv6Addr (b+8, &x); out (v, "Source address: %08lx%08lx%08lx%08lx [= ", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); displ_IPv6_addr (4, &x); out_nl (v,"]"); getIPv6Addr (b+24, &x); out (v, "Destination address: %08lx%08lx%08lx%08lx [= ", x.ip[0], x.ip[1], x.ip[2], x.ip[3] ); displ_IPv6_addr (4, &x); out_nl (v,"]"); b += 40; len -= 40; } // -- ICMP, RFC 792 if (protocol == 1) { // -- TODO } // -- TCP, RFC 793 if (protocol == 6) { // -- TODO } // -- UDP datagram, RFC 768 if (protocol == 17) { int udp_header_len; out_NL (v); out_nl (v,"UDP_datagram_bytes: "); indent (+1); outBit_Sx_NL (v, "Source port: ", b, 0, 16); outBit_Sx_NL (v, "Destination port: ", b, 16, 16); udp_header_len = outBit_Sx_NL (v, "Length: ", b, 32, 16); outBit_Sx_NL (v, "Checksum: ", b, 48, 16); print_databytes (v, "Data", b+8, udp_header_len-8); b += udp_header_len; // -- length is complete header + data len -= udp_header_len; indent (-1); } if (len > 0) { print_databytes (v, "Unknown Data (todo...)", b, len); b += len; len -= len; } out_NL (v); indent (-1); } dvbsnoop-1.4.50/src/strings/0000777000076400001440000000000010630324347011462 5dvbsnoop-1.4.50/src/strings/dsmcc_str.h0000744000076400001440000001262710403124322013526 /* $Id: dsmcc_str.h,v 1.31 2006/03/06 20:25:38 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- dsmcc strings $Log: dsmcc_str.h,v $ Revision 1.31 2006/03/06 20:25:38 rasc DSM-CC Carousell, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.30 2006/03/06 00:05:03 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.29 2006/01/02 18:24:32 rasc just update copyright and prepare for a new public tar ball Revision 1.28 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.27 2004/07/24 11:44:45 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.26 2004/02/24 23:03:08 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.25 2004/02/20 23:13:17 rasc BIOP: TapUse Revision 1.24 2004/02/15 01:01:05 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.23 2004/02/14 01:24:45 rasc DSM-CC started (DSI/DII, DDB) Revision 1.22 2004/02/12 21:21:22 rasc MHP AIT descriptors some smaller changes Revision 1.21 2004/02/07 01:28:07 rasc MHP Application Information Table some AIT descriptors Revision 1.20 2004/01/25 21:37:28 rasc bugfixes, minor changes & enhancments Revision 1.19 2004/01/17 23:06:10 rasc minor stuff, some restructs in output Revision 1.18 2004/01/15 21:27:22 rasc DSM-CC stream descriptors Revision 1.17 2004/01/12 22:49:53 rasc get rid of stream descriptor module Revision 1.16 2004/01/11 21:01:33 rasc PES stream directory, PES restructured Revision 1.15 2004/01/02 22:25:39 rasc DSM-CC MODULEs descriptors complete Revision 1.14 2004/01/02 16:40:43 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.13 2004/01/02 02:18:34 rasc more DSM-CC INT/UNT descriptors Revision 1.12 2004/01/01 20:09:40 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.11 2003/12/27 18:17:18 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.10 2003/12/26 23:27:40 rasc DSM-CC UNT section Revision 1.9 2003/12/17 23:15:05 rasc PES DSM-CC ack and control commands according ITU H.222.0 Annex B Revision 1.8 2003/11/29 23:11:43 rasc no message Revision 1.7 2003/11/26 23:54:49 rasc -- bugfixes on Linkage descriptor Revision 1.6 2003/11/26 19:55:34 rasc no message Revision 1.5 2003/11/01 21:40:27 rasc some broadcast/linkage descriptor stuff Revision 1.4 2003/10/29 20:54:57 rasc more PES stuff, DSM descriptors, testdata Revision 1.3 2003/10/26 21:36:20 rasc private DSM-CC descriptor Tags started, INT-Section completed.. Revision 1.2 2003/10/25 19:11:50 rasc no message Revision 1.1 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 */ #ifndef __DSMCC_STR_H #define __DSMCC_STR_H char *dsmccStrDSMCC_CAROUSEL_DescriptorTAG (u_int i); char *dsmccStrDSMCC_INT_UNT_DescriptorTAG (u_int i); char *dsmccStrMHP_AIT_DescriptorTAG (u_int i); char *dsmccStrMHPOrg (u_int id); char *dsmccStrAction_Type (u_int id); char *dsmccStrProcessing_order (u_int id); char *dsmccStrPayload_scrambling_control (u_int id); char *dsmccStrAddress_scrambling_control (u_int id); char *dsmccStrLinkage0CTable_TYPE (u_int i); char *dsmccStrMultiProtEncapsMACAddrRangeField (u_int i); char *dsmccStrPlatform_ID (u_int id); char *dsmccStrCarouselType_ID (u_int id); char *dsmccStrHigherProtocol_ID (u_int id); char *dsmccStrUpdateType_ID (u_int id); char *dsmccStr_Command_ID (u_int id); char *dsmccStr_SelectMode_ID (u_int id); char *dsmccStr_DirectionIndicator (u_int id); char *dsmccStr_DescriptorType (u_int id); char *dsmccStr_SpecifierType (u_int id); char *dsmccStr_AccessMode (u_int id); char *dsmccStr_UpdateFlag (u_int id); char *dsmccStr_UpdateMethod (u_int id); char *dsmccStr_TimeUnits (u_int id); char *dsmccStr_GroupModuleLinkPosition (u_int id); char *dsmccStr_compression_method (u_int id); char *dsmccStr_streamMode (u_int id); char *dsmccStr_postDiscontinuityIndicator (u_int id); char *dsmccStrOUI (u_int id); char *dsmccStr_LLC_SNAP_prot (u_int id); char *dsmccStrMHP_application_type (u_int id); char *dsmccStrMHP_application_id (u_int id); char *dsmccStrMHP_application_control_code (u_int id); char *dsmccStrMHP_visibility_state (u_int id); char *dsmccStrMHP_protocol_id (u_int id); char *dsmccStrMHP_storage_property (u_int id); char *dsmccStrMHP_caching_transparency_level (u_int id); char *dsmccStr_adaptationType (u_int id); char *dsmccStr_dsmccType (u_int id); char *dsmccStr_messageID (u_int id); char *dsmccStr_transactionID_originator (u_int id); char *dsmccStrIOP_ProfileID (u_int id); char *dsmccStrBIOP_TAP_Use (u_int id); char *dsmccStrBIOP_TAP_SelectorType (u_int id); char *dsmccStrBIOP_EndianType (u_int id); char *dsmccStrBIOP_TypeID_Alias (u_int id); char *dsmccStrBIOP_BindingType (u_int id); char *dsmccStrBIOP_MAGIC (u_int id); #endif dvbsnoop-1.4.50/src/strings/tva_str.h0000744000076400001440000000112110356276760013237 /* $Id: tva_str.h,v 1.2 2006/01/02 18:24:32 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- TV-Anytime Strings $Log: tva_str.h,v $ Revision 1.2 2006/01/02 18:24:32 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 */ #ifndef __TVA_STR_H #define __TVA_STR_H char *tvaStrTVA_DescriptorTAG (u_int i); char *tvastr_CRI_DATA_scheduled_flag (u_int i); #endif dvbsnoop-1.4.50/src/strings/dvb_str.h0000744000076400001440000002136110373750010013210 /* $Id: dvb_str.h,v 1.35 2006/02/12 23:17:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- dvb strings $Log: dvb_str.h,v $ Revision 1.35 2006/02/12 23:17:12 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.34 2005/12/27 23:30:30 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.33 2005/12/22 16:21:51 rasc Update and new descriptors EN 300 468 v1.7.1 Revision 1.32 2005/11/23 23:06:11 rasc ISO13818-2 MPEG2 sequence header Revision 1.31 2005/11/08 23:15:26 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.30 2005/09/02 14:11:36 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.29 2004/08/25 19:51:09 rasc - Update: EN 300 468 v1.6.1 Terrestrial delivery system descriptor Revision 1.28 2004/08/24 21:30:24 rasc more Metadata Revision 1.27 2004/08/13 11:05:29 rasc Metadata_STD_descriptor Revision 1.26 2004/08/12 22:57:19 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.25 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.24 2004/07/26 20:58:03 rasc RNT completed.. (TS 102 323) Revision 1.23 2004/07/25 20:12:59 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.22 2004/07/24 11:44:45 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.21 2004/04/05 17:32:13 rasc mass typo fix adaption --> adaptation Revision 1.20 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.19 2004/03/10 21:05:53 rasc WSS (Wide Screen Signalling) data decoding Revision 1.18 2004/03/09 20:59:23 rasc VPS decoding (someone check the NPP & PTY code output please...) Revision 1.17 2004/02/04 22:36:29 rasc more EBU/teletext stuff Revision 1.16 2004/02/02 23:34:11 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff Revision 1.15 2004/01/01 20:09:40 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.14 2003/11/26 19:55:34 rasc no message Revision 1.13 2003/11/09 20:48:35 rasc pes data packet (DSM-CC) Revision 1.12 2003/10/29 20:54:57 rasc more PES stuff, DSM descriptors, testdata Revision 1.11 2003/10/25 19:11:50 rasc no message Revision 1.10 2003/10/19 21:05:53 rasc - some datacarousell stuff started Revision 1.9 2003/10/17 18:16:54 rasc - started more work on newer ISO 13818 descriptors - some reorg work started Revision 1.8 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.7 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #ifndef __DVB_STR_H #define __DVB_STR_H char *dvbstrPID_assignment (u_int id); char *dvbstrTableID (u_int id); char *dvbstrMPEGDescriptorTAG (u_int tag); char *dvbstrDVBDescriptorTAG (u_int tag); char *dvbstrCurrentNextIndicator (u_int flag); char *dvbstrWEST_EAST_FLAG (u_int tag); char *dvbstrPolarisation_FLAG (u_int tag); char *dvbstrModulationCable_FLAG(u_int flag); char *dvbstrModulationSAT_FLAG (u_int tag); char *dvbstrRollOffSAT_FLAG (u_int flag); char *dvbstrFECinner_SCHEME (u_int tag); char *dvbstrFECouter_SCHEME (u_int tag); char *dvbstrLinkage_TYPE(u_int tag); char *dvbstrHandover_TYPE(u_int tag); char *dvbstrOrigin_TYPE(u_int tag); char *dvbstrService_TYPE(u_int tag); char *dvbstrStream_TYPE(u_int tag); char *dvbstrStream_TYPE_SHORT (u_int flag); char *dvbstrAudio_TYPE(u_int tag); char *dvbstrCASystem_ID(u_int id); char *dvbstrDataBroadcast_ID(u_int flag); char *dvbstrOriginalNetwork_ID (u_int i); char *dvbstrNetworkIdent_ID(u_int id); char *dvbstrBroadcast_ID(u_int id); char *dvbstrTeletext_TYPE(u_int id); char *dvbstrTerrBandwidth_SCHEME(u_int id); char *dvbstrTerrConstellation_FLAG(u_int id); char *dvbstrTerrHierarchy_FLAG(u_int id); char *dvbstrTerrCodeRate_FLAG(u_int id); char *dvbstrTerrGuardInterval_FLAG(u_int id); char *dvbstrTerrTransmissionMode_FLAG(u_int id); char *dvbstrTerrPriority (u_int i); char *dvbstrTerrTimeSlicingIndicator (u_int i); char *dvbstrTerrMPE_FEC_Indicator (u_int i); char *dvbstrTerr_DVBH_service_indication (u_int i); char *dvbstrAspectRatioInfo_FLAG(u_int id); char *dvbstrHierarchy_TYPE(u_int id); char *dvbstrRunningStatus_FLAG (u_int id); char *dvbstrDataStreamVIDEOAlignment_TYPE (u_int id); char *dvbstrDataStreamAUDIOAlignment_TYPE (u_int id); char *dvbstrDataService_ID (u_int id); char *dvbstrContent_Component_TYPE (u_int id); char *dvbstrLogCellPresInfo_TYPE(u_int id); char *dvbstrCellLinkageInfo_TYPE(u_int id); char *dvbstrTextCharset_TYPE(u_int id); char *dvbstrContentNibble_TYPE(u_int id); char *dvbstrParentalRating_TYPE(u_int id); char *dvbstrDelivSysCoding_TYPE(u_int id); char *dvbstrShortSmoothingBufSize_TYPE(u_int id); char *dvbstrShortSmoothingBufLeakRate_TYPE(u_int id); char *dvbstrDVB_AC3_ComponentType (u_int i); char *dvbstrDVB_DTS_Audio_SampleRateCode(u_int i); char *dvbstrDVB_DTS_Audio_BitRate (u_int i); char *dvbstrDVB_DTS_Audio_SurroundMode (u_int i); char *dvbstrDVB_DTS_Audio_ExtendedSurroundFlag (u_int i); char *dvbstrAncillaryData_ID(u_int id); char *dvbstrAnnouncement_TYPE(u_int id); char *dvbstrAnnouncementReference_TYPE(u_int id); /* -- Transport Stream Stuff */ char *dvbstrTSpid_ID (u_int id); char *dvbstrTS_AdaptationField_TYPE (u_int id); char *dvbstrTS_TEI (u_int id); char *dvbstrTS_PUSI (u_int id); char *dvbstrTS_ScramblingCtrl_TYPE (u_int id); /* -- PES stuff */ char *dvbstrPESstream_ID(u_int id); char *dvbstrPESstream_ID_Extension (u_int i); // 2004-08-11 H.222.0 AMD2 char *dvbstrPESscrambling_ctrl_TYPE(u_int id); char *dvbstrPESTrickModeControl (u_int i); char *dvbstrPESDataIdentifier (u_int i); char *dvbstrPES_EBUDataUnitID (u_int i); char *dvbstrTELETEXT_framingcode (u_int i); char *dvbstrTELETEXT_packetnr (u_int i); char *dvbstrTELETEXT_lang_code (u_int i); char *dvbstrVPS_pcs_audio (u_int i); char *dvbstrVPS_cni_countrycode (u_int i); char *dvbstrVPS_pty (u_int i); char *dvbstrVPS_npp (u_int i); char *dvbstrWSS_aspect_ratio (u_int i); char *dvbstrWSS_film_bit (u_int i); char *dvbstrWSS_color_coding_bit (u_int i); char *dvbstrWSS_helper_bit (u_int i); char *dvbstrWSS_subtitleTeletext_bit (u_int i); char *dvbstrWSS_subtitling_mode (u_int i); char *dvbstrWSS_surround_bit (u_int i); char *dvbstrWSS_copyright_bit (u_int i); char *dvbstrWSS_copy_generation_bit (u_int i); /* -- Div Stuff */ char *dvbstrCountryCode_ID (u_int i); char *dvbstrPrivateDataSpecifier_ID (u_int i); char *dvbstrBouquetTable_ID (u_int i); char *dvbstrStreamContent_Component_TYPE (u_int i); /* EN 301 192 v1.4.1 updates */ char *dvbstrTimeSlice_bit_used (u_int i); char *dvbstrMPE_FEC_algo (u_int i); char *dvbstrMPE_FEC_max_burst_size (u_int i); char *dvbstrMPE_FEC_frame_rows (u_int i); char *dvbstrMPE_FEC_max_average_rate (u_int i); char *dvbstrMPE_FEC_table_frame_boundary (u_int i); /* TS 102 323 v1.1.1 TV ANYTIME */ char *dvbstrTVA_RunningStatus(u_int i); char *dvbstrTVA_crid_type (u_int i); char *dvbstrTVA_crid_location (u_int i); char *dvbstrTVA_content_id_type (u_int i); /* H.222.0 AMD1 - AMD3 update */ char *dvbstrMPEG_metadata_application_format (u_int i); char *dvbstrMPEG_Content_time_base_indicator (u_int i); char *dvbstrMPEG_metadata_section_frag_indication (u_int i); /* ISO 13818-2 */ char *dvbstrMPEG_FrameRateCode (u_int i); char *dvbstrMPEG_PictureCodingType (u_int i); char *dvbstrMPEG_ExtensionStartCodeIdentifier (u_int i); char *dvbstrMPEG_ProfileIndication (u_int i); char *dvbstrMPEG_LevelIndication (u_int i); char *dvbstrMPEG_ChromaFormat (u_int i); char *dvbstrMPEG_VideoFormat (u_int i); char *dvbstrMPEG_ColorPrimaries (u_int i); char *dvbstrMPEG_TransferCharacteristics (u_int i); char *dvbstrMPEG_MatrixCoefficients (u_int i); char *dvbstrMPEG_ScalableMode (u_int i); char *dvbstrMPEG_Intra_DC_Precision (u_int i); char *dvbstrMPEG_PictureStructure (u_int i); char *dvbstrMPEG_Original_Or_Copy (u_int i); /* TS 101 191 */ char *dvbstrTS_MIP_Syncronization (u_int i); char *dvbstrTS_MIP_FunctionTag (u_int i); char *dvbstrTS_MIP_ChannelBandwidth (u_int i); #endif dvbsnoop-1.4.50/src/strings/net_str.h0000644000076400001440000000064410500020400013204 /* $Id: net_str.h,v 1.1 2006/09/07 13:39:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Network strings (IP, UDP, ICMP) $Log: net_str.h,v $ Revision 1.1 2006/09/07 13:39:12 rasc net string module */ #ifndef __NET_STR_H #define __NET_STR_H char *netStr_RFC790_protocol_nr (u_int i); #endif dvbsnoop-1.4.50/src/strings/strtable_misc.h0000744000076400001440000000104410354356246014410 /* $Id: strtable_misc.h,v 1.2 2005/12/27 23:30:30 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __STRTABLE_MISC_H #define __STRTABLE_MISC_H #include "dvbsnoop.h" typedef struct _STR_TABLE { u_int from; /* e.g. from id 1 */ u_int to; /* to id 3 */ const char *str; /* is string xxx */ } STR_TABLE; char *findTableID (STR_TABLE *t, u_int id); #endif dvbsnoop-1.4.50/src/strings/Makefile.am0000644000076400001440000000040210500021612013407 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libstrings.a noinst_HEADERS = \ dsmcc_str.h \ tva_str.h \ dvb_str.h \ net_str.h \ strtable_misc.h libstrings_a_SOURCES = \ dsmcc_str.c \ tva_str.c \ dvb_str.c \ net_str.c \ strtable_misc.c dvbsnoop-1.4.50/src/strings/Makefile.in0000644000076400001440000002762210630302147013446 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libstrings_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/strings DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libstrings_a_AR = $(AR) $(ARFLAGS) libstrings_a_LIBADD = am_libstrings_a_OBJECTS = dsmcc_str.$(OBJEXT) tva_str.$(OBJEXT) \ dvb_str.$(OBJEXT) net_str.$(OBJEXT) strtable_misc.$(OBJEXT) libstrings_a_OBJECTS = $(am_libstrings_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dsmcc_str.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/dvb_str.Po ./$(DEPDIR)/net_str.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/strtable_misc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/tva_str.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libstrings_a_SOURCES) DIST_SOURCES = $(libstrings_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libstrings.a noinst_HEADERS = \ dsmcc_str.h \ tva_str.h \ dvb_str.h \ net_str.h \ strtable_misc.h libstrings_a_SOURCES = \ dsmcc_str.c \ tva_str.c \ dvb_str.c \ net_str.c \ strtable_misc.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/strings/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/strings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libstrings.a: $(libstrings_a_OBJECTS) $(libstrings_a_DEPENDENCIES) -rm -f libstrings.a $(libstrings_a_AR) libstrings.a $(libstrings_a_OBJECTS) $(libstrings_a_LIBADD) $(RANLIB) libstrings.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsmcc_str.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dvb_str.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/net_str.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtable_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tva_str.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/strings/dsmcc_str.c0000744000076400001440000006734710403124322013532 /* $Id: dsmcc_str.c,v 1.38 2006/03/06 20:25:38 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- DSM-CC -Strings $Log: dsmcc_str.c,v $ Revision 1.38 2006/03/06 20:25:38 rasc DSM-CC Carousell, lots of Bugfixes, BIOP::Message not yet decodable (ddb has to collect Modules) Revision 1.37 2006/03/06 01:14:50 rasc Bugfixes... DSMCC BIOPs... Revision 1.36 2006/03/06 00:05:03 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.35 2006/01/02 18:24:32 rasc just update copyright and prepare for a new public tar ball Revision 1.34 2004/07/25 20:12:59 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.33 2004/07/24 11:44:45 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.32 2004/02/24 23:03:07 rasc private data of DSMCC::DSI BIOP::ServiceGatewayInformation() IOP::IOR() Revision 1.31 2004/02/20 23:13:17 rasc BIOP: TapUse Revision 1.30 2004/02/20 22:18:42 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.29 2004/02/15 20:46:10 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.28 2004/02/15 18:58:30 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.27 2004/02/15 01:01:04 rasc DSM-CC DDB (DownloadDataBlock Message) DSM-CC U-N-Message started Carousel Descriptors completed Revision 1.26 2004/02/14 01:24:45 rasc DSM-CC started (DSI/DII, DDB) Revision 1.25 2004/02/12 21:21:22 rasc MHP AIT descriptors some smaller changes Revision 1.24 2004/02/07 01:28:07 rasc MHP Application Information Table some AIT descriptors Revision 1.23 2004/01/25 21:37:28 rasc bugfixes, minor changes & enhancments Revision 1.22 2004/01/17 23:06:10 rasc minor stuff, some restructs in output Revision 1.21 2004/01/15 21:27:22 rasc DSM-CC stream descriptors Revision 1.20 2004/01/12 22:49:53 rasc get rid of stream descriptor module Revision 1.19 2004/01/11 21:01:33 rasc PES stream directory, PES restructured Revision 1.18 2004/01/05 02:12:20 rasc no message Revision 1.17 2004/01/02 22:25:39 rasc DSM-CC MODULEs descriptors complete Revision 1.16 2004/01/02 16:40:43 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.15 2004/01/02 02:18:34 rasc more DSM-CC INT/UNT descriptors Revision 1.14 2004/01/01 20:09:40 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.13 2003/12/29 22:14:54 rasc more dsm-cc INT UNT descriptors Revision 1.12 2003/12/28 22:53:41 rasc some minor changes/cleanup Revision 1.11 2003/12/27 22:02:44 rasc dsmcc INT UNT descriptors started Revision 1.10 2003/12/27 18:17:18 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.9 2003/12/26 23:27:40 rasc DSM-CC UNT section Revision 1.8 2003/12/17 23:15:05 rasc PES DSM-CC ack and control commands according ITU H.222.0 Annex B Revision 1.7 2003/11/29 23:11:43 rasc no message Revision 1.6 2003/11/26 23:54:49 rasc -- bugfixes on Linkage descriptor Revision 1.5 2003/11/01 21:40:27 rasc some broadcast/linkage descriptor stuff Revision 1.4 2003/10/29 20:54:57 rasc more PES stuff, DSM descriptors, testdata Revision 1.3 2003/10/26 21:36:20 rasc private DSM-CC descriptor Tags started, INT-Section completed.. Revision 1.2 2003/10/25 19:11:50 rasc no message Revision 1.1 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 */ #include "dvbsnoop.h" #include "dsmcc_str.h" #include "strtable_misc.h" /* -- DSM-CC CAROUSEL Descriptors -- Private Tag Space (DII, DSI) -- see EN 301 192 -- ... shows in DVB-descriptor lower ranges */ char *dsmccStrDSMCC_CAROUSEL_DescriptorTAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "type_descriptor" }, { 0x02, 0x02, "name_descriptor" }, { 0x03, 0x03, "info_descriptor" }, { 0x04, 0x04, "module_link_descriptor" }, { 0x05, 0x05, "CRC32_descriptor" }, { 0x06, 0x06, "location_descriptor" }, { 0x07, 0x07, "estimated_download_time_descriptor" }, { 0x08, 0x08, "group_link_descriptor" }, { 0x09, 0x09, "compressed_module_descriptor" }, { 0x0A, 0x0A, "subgroup_association_descriptor" }, { 0x0B, 0x6F, "reserved for future use by DVB" }, { 0x70, 0x70, "label_descriptor" }, // MHP { 0x71, 0x71, "caching_priority_descriptor" }, // MHP { 0x72, 0x7F, "reserved MHP" }, { 0x80, 0xFF, "private_descriptor" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- DSM-CC INT (UNT, SSU-UNT) Descriptors -- Private INT, UNT, SSU-UNT Tag Space -- see EN 301 192 // TS 102 006 */ char *dsmccStrDSMCC_INT_UNT_DescriptorTAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "scheduling_descriptor" }, { 0x02, 0x02, "update_descriptor" }, { 0x03, 0x03, "ssu_location_descriptor" }, { 0x04, 0x04, "message_descriptor" }, { 0x05, 0x05, "ssu_event_name_descriptor" }, { 0x06, 0x06, "target_smartcard_descriptor" }, { 0x07, 0x07, "target_MAC_address_descriptor" }, { 0x08, 0x08, "target_serial_number_descriptor" }, { 0x09, 0x09, "target_IP_address_descriptor" }, { 0x0A, 0x0A, "target_IPv6_address_descriptor" }, { 0x0B, 0x0B, "ssu_subgroup_association_descriptor" }, { 0x0C, 0x0C, "IP/MAC_platform_name_descriptor" }, { 0x0D, 0x0D, "IP/MAC_platform_provider_name_descriptor" }, { 0x0E, 0x0E, "target_MAC_address_range_descriptor" }, { 0x0F, 0x0F, "target_IP_slash_descriptor" }, { 0x10, 0x10, "target_IP_source_slash_descriptor" }, { 0x11, 0x11, "target_IPv6_slash_descriptor" }, { 0x12, 0x12, "target_IPv6_source_slash_descriptor" }, { 0x13, 0x13, "IP/MAC_stream_location_descriptor" }, { 0x14, 0x14, "ISP_access_mode_descriptor" }, { 0x15, 0x3F, "reserved" }, // { 0x40, 0x7F, "DVB-SI scope" }, Telphone, private_data_spec, use: dvb scope { 0x80, 0xFE, "user_private_descriptor" }, { 0xFF, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MHP AIT Descriptors -- Private Tag Space (AIT) -- see TS 102 812 */ char *dsmccStrMHP_AIT_DescriptorTAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "Application descriptor" }, { 0x01, 0x01, "Application name descriptor" }, { 0x02, 0x02, "Transport protocol descriptor" }, { 0x03, 0x03, "DVB-J application descriptor" }, { 0x04, 0x04, "DVB-J application location descriptor" }, { 0x05, 0x05, "External application authorisation descriptor" }, { 0x06, 0x06, "Routing Descriptor IPv4" }, { 0x07, 0x07, "Routing Descriptor IPv6" }, { 0x08, 0x08, "DVB-HTML application descriptor" }, { 0x09, 0x09, "DVB-HTML application location descriptor" }, { 0x0A, 0x0A, "DVB-HTML application boundary descriptor" }, { 0x0B, 0x0B, "Application icons descriptor" }, { 0x0C, 0x0C, "Pre-fetch descriptor" }, { 0x0D, 0x0D, "DII location descriptor" }, { 0x0E, 0x0E, "delegated application descriptor" }, { 0x0F, 0x0F, "Plug-in descriptor" }, { 0x10, 0x10, "Application storage descriptor" }, { 0x11, 0x5E, "reserved to MHP" }, { 0x5F, 0x5F, "private data specifier descriptor" }, { 0x60, 0x7F, "reserved to MHP" }, { 0x80, 0xFF, "user defined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MHP Organisations */ char *dsmccStrMHPOrg (u_int id) { STR_TABLE TableIDs[] = { // --{ MHP Organisation ID, MHP Organisation ID, "Organisation Supplying MHP Applications" }, { 0x0000, 0x0000, "Reserved" }, { 0x0001, 0x0001, "MTV Oy" }, { 0x0002, 0x0002, "Digita Oy" }, { 0x0003, 0x0003, "NRK" }, { 0x0004, 0x0004, "Premiere Medien GmbH & Co KG" }, { 0x0005, 0x0005, "Platco Oy" }, { 0x0006, 0x0006, "NOB" }, { 0x0007, 0x0007, "Sofia Digital Oy" }, { 0x0008, 0x0008, "YLE (Finnish Broadcasting Company)" }, { 0x0009, 0x0009, "IRT (Institut für Rundfunktechnik GmbH)" }, { 0x000A, 0x000A, "Cardinal Information Systems Ltd" }, { 0x000B, 0x000B, "Mediaset s.p.a." }, { 0x000C, 0x000C, "Ortikon Interactive Oy" }, { 0x000D, 0x000D, "Austrian Broadcastion Corporation (ORF)" }, { 0x000E, 0x000E, "Strategy & Technology Ltd" }, { 0x000F, 0x000F, "Canal+ Technologies" }, { 0x0010, 0x0010, "TV2Nord Digital" }, { 0x0011, 0x0011, "Zweites Deutsches Fernsehen - ZDF" }, { 0x0012, 0x0012, "SCIP AG" }, { 0x0013, 0x0013, "ARD" }, { 0x0014, 0x0014, "Sveng.com" }, { 0x0015, 0x0015, "UniSoft Corporation" }, { 0x0016, 0x0016, "Microsoft Corp" }, { 0x0017, 0x0017, "Nokia" }, { 0x0018, 0x0018, "SWelcom Oy" }, { 0x0019, 0x0019, "Fraunhofer Institut Medienkommunikation - IMK" }, { 0x001A, 0x001A, "RTL NewMedia GmbH" }, { 0x001B, 0x001B, "Fraunhofer FOKUS" }, { 0x001C, 0x001C, "TwonkyVision GmbH" }, { 0x001D, 0x001D, "Gist Communications" }, { 0x001E, 0x001E, "Televisió de Catalunya SA" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Action Type (Linkage) EN 301 192 7.6.x -- ETSI TS 102006 $$$ TODO (is there a conflict?) */ char *dsmccStrAction_Type (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "location of IP/MAC streams in DVB networks // System Software Update" }, { 0x02, 0xff, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Processing Order (INT) EN 301 192 */ char *dsmccStrProcessing_order (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "first action" }, { 0x01, 0xfe, "subsequent actions (ascending)" }, { 0xff, 0xff, "no ordering implied" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Payload scrambling control (INT) EN 301 192 -- Address scrambling control (INT) EN 301 192 */ // $$$ TODO according to mpeg/ scrambling control? char *dsmccStrPayload_scrambling_control (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "unscrambled" }, { 0x01, 0x03, "defined by service" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } char *dsmccStrAddress_scrambling_control (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "unscrambled" }, { 0x01, 0x03, "defined by service" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* * -- LinkageDescriptor0x0C Table_type EN301192 * */ char *dsmccStrLinkage0CTable_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "not defined" }, { 0x01, 0x01, "NIT" }, { 0x02, 0x02, "BAT" }, { 0x03, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* * -- MultiProtocolEncapsulationMACAddressRangeField * -- EN 301 192 */ char *dsmccStrMultiProtEncapsMACAddrRangeField (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "6" }, { 0x02, 0x02, "6,5" }, { 0x03, 0x03, "6,5,4" }, { 0x04, 0x04, "6,5,4,3" }, { 0x05, 0x05, "6,5,4,3,2" }, { 0x06, 0x06, "6,5,4,3,2,1" }, { 0x07, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Platform ID ETR 162 */ char *dsmccStrPlatform_ID (u_int id) { STR_TABLE TableIDs[] = { /* $$$ TODO Platform ID ETR 162 ... */ { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Carousel Type ID EN 301 192 */ char *dsmccStrCarouselType_ID (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "one layer carousel" }, { 0x02, 0x02, "two layer carousel" }, { 0x03, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Higher Protocol ID EN 301 192 */ char *dsmccStrHigherProtocol_ID (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "dGNSS data" }, { 0x02, 0x02, "TPEG" }, { 0x03, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Update Type Table TR 102 006 */ char *dsmccStrUpdateType_ID (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "proprietary update solution" }, { 0x01, 0x01, "standard update carousel via broadcast" }, { 0x02, 0x02, "system software update with notification table (UNT) via broadcast" }, { 0x03, 0x03, "system software update using return channel with UNT" }, { 0x04, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Command_ID -- also dsmcc_discriminator -- e.g. from ITU H.222.0 Annex B -- */ char *dsmccStr_Command_ID (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "control" }, { 0x02, 0x02, "Acknownledge" }, { 0x03, 0x7F, "reserved" }, { 0x80, 0x80, "DSMCC_program_stream_descriptor_list" }, { 0x81, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Command_ID -- e.g. from ITU H.222.0 Annex B -- */ char *dsmccStr_SelectMode_ID (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "storage" }, { 0x02, 0x02, "retrieval" }, { 0x03, 0x1F, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- direction_indicator -- e.g. from ITU H.222.0 Annex B -- */ char *dsmccStr_DirectionIndicator (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "Forward" }, { 0x01, 0x01, "Backward" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC (UNT) (Compatibility) Descriptor type -- e.g. from ISO 13818-6 // TS 102006 -- */ char *dsmccStr_DescriptorType (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "Pad descriptor" }, { 0x01, 0x01, "System Hardware descriptor" }, { 0x02, 0x02, "System Software descriptor" }, { 0x03, 0x3F, "ISO/IEC 13818-6 reserved" }, { 0x40, 0x7F, "DVB reserved" }, { 0x80, 0xFF, "User defined" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC (UNT) Specifier type -- e.g. from ISO 13818-6 // TS 102006 -- */ char *dsmccStr_SpecifierType (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "ISO/IEC 13818-6 reserved" }, { 0x01, 0x01, "IEEE OUI" }, { 0x02, 0xFF, "ISO/IEC 13818-6 reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC (INT) AccessMode -- e.g. from ISO 13818-6 // EN 301 192 -- */ char *dsmccStr_AccessMode (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "not used" }, { 0x01, 0x01, "dialup" }, { 0x02, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC (INT) Update_flag -- e.g. from ISO 13818-6 // TS 102 006 -- */ char *dsmccStr_UpdateFlag (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "to be activated manually" }, { 0x01, 0x01, "may be performed automatically" }, { 0x02, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC (INT) Update_method -- e.g. from ISO 13818-6 // TS 102 006 -- */ char *dsmccStr_UpdateMethod (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "immediate update: performed whatever the IRD state" }, { 0x01, 0x01, "IRD available: the update is available in the stream; it will be taken into account when it does not interfere with the normal user operation" }, { 0x02, 0x02, "next restart: the update is available in the stream; it will be taken into account at the next IRD restart" }, { 0x03, 0x07, "reserved" }, { 0x08, 0x0E, "private use" }, { 0x0F, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC (INT) Time Units -- e.g. from ISO 13818-6 // TS 102 006 -- */ char *dsmccStr_TimeUnits (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "second" }, { 0x01, 0x01, "minute" }, { 0x02, 0x02, "hour" }, { 0x03, 0x03, "day" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC Module Link Position -- e.g. from ISO 13818-6 // EN 301 192 -- */ char *dsmccStr_GroupModuleLinkPosition (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "first in list" }, { 0x01, 0x01, "intermediate in list" }, { 0x02, 0x02, "last in list" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC compression_method -- e.g. from ISO 13818-6 // EN 301 192 -- */ char *dsmccStr_compression_method (u_int id) { return (char *) "compression method used, see: RFC 1950"; } /* -- DSM-CC Stream Mode -- ISO 13818-6 (stream desc. 8.5) -- */ char *dsmccStr_streamMode (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "Open" }, { 0x01, 0x01, "Pause" }, { 0x02, 0x02, "Transport" }, { 0x03, 0x03, "Transport Pause" }, { 0x04, 0x04, "Search Transport" }, { 0x05, 0x05, "Search Transport Pause" }, { 0x06, 0x06, "Pause Search Transport" }, { 0x07, 0x07, "End of Stream" }, { 0x08, 0x08, "Pre Search Transport" }, { 0x09, 0x09, "Pre Search Transport Pause" }, { 0x0A, 0xFF, "ISO/IEC 13818-6 reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC postDiscontinuityIndicator -- ISO 13818-6 (stream desc. 8.5) -- */ char *dsmccStr_postDiscontinuityIndicator (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "now valid" }, { 0x01, 0x01, "valid at the next system time base discontinuity" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- OUI Table (e.g.: LLC-SNAP IEEE 802) -- real table is very large!! -- see: http://standards.ieee.org/regauth/oui/index.shtml */ char *dsmccStrOUI (u_int id) { STR_TABLE TableIDs[] = { { 0x000000, 0x000000, "EtherType or routed non-OSI protocol" }, { 0x000979, 0x000979, "ATSC" }, // ATSC a_95 { 0x0080c2, 0x0080c2, "Bridged protocol" }, { 0x000000, 0xFFFFFF, "http://standards.ieee.org/regauth/oui/" }, { 0,0, NULL } }; // http://standards.ieee.org/cgi-bin/ouisearch?hex-id return findTableID (TableIDs, id); } /* -- DSM-CC LLC SNAP protocol */ char *dsmccStr_LLC_SNAP_prot (u_int id) { STR_TABLE TableIDs[] = { { 0x0800, 0x0800, "IP protocol" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- MHP application type */ char *dsmccStrMHP_application_type (u_int id) { STR_TABLE TableIDs[] = { { 0x0000, 0x0000, "reserved" }, { 0x0001, 0x0001, "DVB-J application" }, { 0x0002, 0x0002, "DVB-HTML application" }, { 0x0003, 0x7FFF, "subject to registration with DVB" }, // $$$ TODO ?? { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- MHP application type */ char *dsmccStrMHP_application_id (u_int id) { STR_TABLE TableIDs[] = { { 0x0000, 0x3FFF, "unsigned applications" }, { 0x4000, 0x7FFF, "signed applications" }, { 0x8000, 0xFFFD, "reserved" }, { 0xFFFE, 0xFFFE, "wildcard value for signed applications of an org." }, { 0xFFFF, 0xFFFF, "wildcard value all applications of an org." }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- MHP application control code */ char *dsmccStrMHP_application_control_code (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "AUTOSTART" }, { 0x02, 0x02, "PRESENT" }, { 0x03, 0x03, "DESTROY" }, { 0x04, 0x04, "KILL" }, { 0x05, 0x05, "PREFETCH" }, { 0x06, 0x06, "REMOTE" }, { 0x07, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- MHP visibility state */ char *dsmccStrMHP_visibility_state (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "application not visible to user and appl. listening api" }, { 0x01, 0x01, "application not visible to user, but visible to appl. listening api" }, { 0x02, 0x02, "reserved" }, { 0x03, 0x03, "application visible to user and appl. listening api" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- MHP protocol_id -- ETR162 */ char *dsmccStrMHP_protocol_id (u_int id) { STR_TABLE TableIDs[] = { { 0x0000, 0x0000, "reserved" }, { 0x0001, 0x0001, "MHP Object Carousel" }, { 0x0002, 0x0002, "IP via DVB multiprotocol encapsulation" }, { 0x0003, 0x0003, "Transport via HTTP over the interaction channel" }, { 0x0004, 0x00FF, "Reserved for use by DVB" }, { 0x0100, 0xFFFF, "Subject to registration in ETSI TR 101 162" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- MHP storage property -- ETR162 */ char *dsmccStrMHP_storage_property (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "broadcast related" }, { 0x01, 0x01, "stand alone" }, { 0x02, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC MHP caching transparency level -- ISO/IEC 13816-6 -- TS 102 812 v1.2.1 B.2.7 */ char *dsmccStrMHP_caching_transparency_level (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "transparent caching" }, { 0x02, 0x02, "semi-transparent caching" }, { 0x03, 0x03, "static caching" }, { 0x04, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC Adaptation Type -- ISO/IEC 13816-6 */ char *dsmccStr_adaptationType (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "DSM-CC Conditional Access adaptation format" }, { 0x02, 0x02, "DSM-CC User ID adaptation format" }, { 0x03, 0x7F, "reserved" }, { 0x80, 0xFF, "user defined" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC dsmcc Type -- ISO/IEC 13816-6 */ char *dsmccStr_dsmccType (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "User-to-Network configuration message" }, { 0x02, 0x02, "User-to-Network session message" }, { 0x03, 0x03, "Download message" }, { 0x04, 0x04, "SDB Channel Change Protocol message" }, { 0x05, 0x05, "User-to- Network pass-thru message" }, { 0x06, 0x7F, "reserved" }, { 0x80, 0xFF, "user defined" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC Download Message ID -- ISO/IEC 13816-6 */ char *dsmccStr_messageID (u_int id) { STR_TABLE TableIDs[] = { { 0x1001, 0x1001, "DownloadInfoRequest" }, { 0x1002, 0x1002, "DownloadInfoIndication (DII)" }, // also: DownloadInfoResponse { 0x1003, 0x1003, "DownloadDataBlock (DDB)" }, { 0x1004, 0x1004, "DownloadDataRequest" }, { 0x1005, 0x1005, "DownloadCancel" }, { 0x1006, 0x1006, "DownloadServerInitiate (DSI)" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC TransactionID originator -- ISO/IEC 13816-6 -- TS 102 812 v1.2.1 B.2.7 */ char *dsmccStr_transactionID_originator (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "assigned by the client" }, { 0x01, 0x01, "assigned by the server" }, { 0x02, 0x02, "assigned by the network" }, { 0x03, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC IOP ProfileID -- ISO/IEC 13816-6 -- Profile Tags 0x49534F00 - 0x49534F0F (the first 3 octets spell ISO) -- TR 101 202 -- TS 102 812 */ char *dsmccStrIOP_ProfileID (u_int id) { STR_TABLE TableIDs[] = { { 0x49534f00, 0x49534f00, "TAG_MIN" }, { 0x49534f01, 0x49534f01, "TAG_CHILD" }, { 0x49534f02, 0x49534f02, "TAG_OPTIONS" }, { 0x49534f03, 0x49534f03, "TAG_LITE_MIN" }, { 0x49534f04, 0x49534f04, "TAG_LITE_CHILD" }, { 0x49534f05, 0x49534f05, "TAG_LITE_OPTIONS" }, { 0x49534f06, 0x49534f06, "TAG_BIOP" }, { 0x49534f07, 0x49534f07, "TAG_ONC" }, { 0x49534f40, 0x49534f40, "TAG_ConnBinder" }, { 0x49534f41, 0x49534f41, "TAG_IIOPAddr" }, { 0x49534f42, 0x49534f42, "TAG_Addr" }, { 0x49534f43, 0x49534f43, "TAG_NameId" }, { 0x49534f44, 0x49534f44, "TAG_IntfCode" }, { 0x49534f45, 0x49534f45, "TAG_ObjectKey" }, { 0x49534f46, 0x49534f46, "TAG_ServiceLocation" }, { 0x49534f50, 0x49534f50, "TAG_ObjectLocation" }, { 0x49534f58, 0x49534f58, "TAG_Intf" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- DSM-CC BIOP tap use -- ISO/IEC 13816-6 */ char *dsmccStrBIOP_TAP_Use (u_int id) { STR_TABLE TableIDs[] = { { 0x0000, 0x0000, "UNKNOWN" }, { 0x0001, 0x0001, "MPEG_TS_UP_USE" }, { 0x0002, 0x0002, "MPEG_TS_DOWN_USE" }, { 0x0003, 0x0003, "MPEG_ES_UP_USE" }, { 0x0004, 0x0004, "MPEG_ES_DOWN_USE" }, { 0x0005, 0x0005, "DOWNLOAD_CTRL_USE" }, { 0x0006, 0x0006, "DOWNLOAD_CTRL_UP_USE" }, { 0x0007, 0x0007, "DOWNLOAD_CTRL_DOWN_USE" }, { 0x0008, 0x0008, "DOWNLOAD_DATA_USE" }, { 0x0009, 0x0009, "DOWNLOAD_DATA_UP_USE" }, { 0x000A, 0x000A, "DOWNLOAD_DATA_DOWN_USE" }, { 0x000B, 0x000B, "STR_NPT_USE" }, { 0x000C, 0x000C, "STR_STATUS_AND_EVENT_USE" }, { 0x000D, 0x000D, "STR_EVENT_USE" }, { 0x000E, 0x000E, "STR_STATUS_USE" }, { 0x000F, 0x000F, "RPC_USE" }, { 0x0010, 0x0010, "IP_USE" }, { 0x0011, 0x0011, "SDB_CTRL_USE" }, { 0x0012, 0x0015, "T120_TAP reserved" }, { 0x0016, 0x0016, "BIOP_DELIVERY_PARA_USE" }, { 0x0017, 0x0017, "BIOP_OBJECT_USE" }, { 0x0018, 0x0018, "BIOP_ES_USE" }, { 0x0019, 0x0019, "BIOP_PROGRAM_USE" }, { 0x001A, 0x001A, "BIOP_DNL_CTRL_USE" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- BIOP/DSM::TAP selector_type (MessageSelector) -- ISO/IEC 13816-6 -- ATSC A95, A47 */ char *dsmccStrBIOP_TAP_SelectorType (u_int id) { STR_TABLE TableIDs[] = { { 0x0000, 0x0000, "ISO/IEC reserved" }, { 0x0001, 0x0001, "MessageSelector" }, { 0x0109, 0x0109, "TSFS_Selector" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- BIOP/DSM::TAP selector_type (MessageSelector) -- ISO/IEC 13816-6 -- ATSC A95, A47 */ char *dsmccStrBIOP_EndianType (u_int id) { STR_TABLE TableIDs[] = { { 0x00, 0x00, "Big Endian" }, { 0x01, 0xFF, "Little Endian" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- BIOP ObjectKind / TypeID Aliases -- ISO/IEC 13816-6 */ char *dsmccStrBIOP_TypeID_Alias (u_int id) { STR_TABLE TableIDs[] = { { 0x64697200, 0x64697200, "dir (DSM::Directory)" }, { 0x66696c00, 0x66696c00, "fil (DSM::File)" }, { 0x73726700, 0x73726700, "srg (DSM::ServiceGateway)" }, { 0x73746500, 0x73746500, "ste (DSM::StreamEvent)" }, { 0x73747200, 0x73747200, "str (BIOP::Stream)" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- BIOP BindingType -- e.g. TS 102 812 */ char *dsmccStrBIOP_BindingType (u_int id) { STR_TABLE TableIDs[] = { { 0x01, 0x01, "nobject" }, { 0x02, 0x02, "ncontext" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- BIOP "Magic" ID -- e.g. TS 102 812 */ char *dsmccStrBIOP_MAGIC (u_int id) { STR_TABLE TableIDs[] = { { 0x42494F50, 0x42494F50, "BIOP" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } dvbsnoop-1.4.50/src/strings/tva_str.c0000744000076400001440000000217210356276760013241 /* $Id: tva_str.c,v 1.2 2006/01/02 18:24:32 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- TV-ANYTIME -Strings $Log: tva_str.c,v $ Revision 1.2 2006/01/02 18:24:32 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 */ #include "dvbsnoop.h" #include "tva_str.h" #include "strtable_misc.h" /* -- TVA RNT Descriptors */ char *tvaStrTVA_DescriptorTAG (u_int i) { STR_TABLE Table[] = { { 0x40, 0x40, "RAR_over_DVB_stream_descriptor" }, { 0x41, 0x41, "RAR_over_IP_descriptor" }, { 0x42, 0x42, "RNT_scan_descriptor" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- TVA RNT scheduling flag */ char *tvastr_CRI_DATA_scheduled_flag (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "referenced CRI data is delivered continuously" }, { 0x01, 0x01, "referenced CRI data is scheduled" }, { 0,0, NULL } }; return findTableID (Table, i); } dvbsnoop-1.4.50/src/strings/dvb_str.c0000744000076400001440000036101510457510231013210 /* $Id: dvb_str.c,v 1.76 2006/07/19 20:05:45 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- DVB-Strings -- MPEG-Strings -- dvb decoder helper functions $Log: dvb_str.c,v $ Revision 1.76 2006/07/19 20:05:45 rasc Special handling for null packets Revision 1.75 2006/02/12 23:17:12 rasc TS 101 191 MIP - Mega-Frame Initialization Packet for DVB-T/H (TS Pid 0x15) Revision 1.74 2005/12/27 23:30:30 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.73 2005/12/22 16:21:51 rasc Update and new descriptors EN 300 468 v1.7.1 Revision 1.72 2005/11/23 23:06:10 rasc ISO13818-2 MPEG2 sequence header Revision 1.71 2005/11/10 23:34:38 rasc Some H.222.1 AMD 4+5 update Revision 1.70 2005/11/10 00:05:45 rasc - New: PS MPEG2 UserData + GOP, DVB-S2 fix Revision 1.69 2005/11/08 23:15:26 rasc - New: DVB-S2 Descriptor and DVB-S2 changes (tnx to Axel Katzur) - Bugfix: PES packet stuffing - New: PS/PES read redesign and some code changes Revision 1.68 2005/10/23 22:50:27 rasc - New: started ISO 13818-2 StreamIDs - New: decode multiple PS/PES packets within TS packets (-tssubdecode) Revision 1.67 2005/09/09 14:20:30 rasc TS continuity sequence check (cc verbose output) Revision 1.66 2005/09/02 14:11:36 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.65 2005/08/10 21:28:19 rasc New: Program Stream handling (-s ps) Revision 1.64 2005/07/18 21:11:40 rasc TVA Content Section Revision 1.63 2005/01/17 19:41:24 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.62 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.61 2004/08/25 21:33:41 rasc small fix: Priority wrong in Terr. Sys Delivery descriptor Revision 1.60 2004/08/25 19:51:09 rasc - Update: EN 300 468 v1.6.1 Terrestrial delivery system descriptor Revision 1.59 2004/08/24 21:30:24 rasc more Metadata Revision 1.58 2004/08/13 11:05:29 rasc Metadata_STD_descriptor Revision 1.57 2004/08/13 01:15:54 rasc small change in PID assignment display Revision 1.56 2004/08/12 22:57:19 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.55 2004/08/01 21:33:09 rasc minor TVA stuff (TS 102 323) Revision 1.54 2004/07/26 20:58:03 rasc RNT completed.. (TS 102 323) Revision 1.53 2004/07/25 20:12:59 rasc - New: content_identifier_descriptor (TS 102 323) - New: TVA_id_descriptor (TS 102 323) - New: related_content_descriptor (TS 102 323) - New: default_authority_descriptor (TS 102 323) Revision 1.52 2004/07/24 11:44:45 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes Revision 1.51 2004/04/15 10:53:22 rasc minor changes Revision 1.50 2004/04/05 17:32:13 rasc mass typo fix adaption --> adaptation Revision 1.49 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.48 2004/03/21 00:37:47 rasc Query FrontEnd Info (option: -s feinfo) Revision 1.47 2004/03/10 21:05:53 rasc WSS (Wide Screen Signalling) data decoding Revision 1.46 2004/03/09 20:59:23 rasc VPS decoding (someone check the NPP & PTY code output please...) Revision 1.45 2004/02/15 18:58:31 rasc DSM-CC data/object carousell continued (DSI, DII, DDB, DCancel) Revision 1.44 2004/02/12 21:21:22 rasc MHP AIT descriptors some smaller changes Revision 1.43 2004/02/09 22:57:01 rasc Bugfix VBI Data descriptor Revision 1.42 2004/02/09 21:25:01 rasc AIT descriptors minor redesign on output routines Revision 1.41 2004/02/04 22:36:29 rasc more EBU/teletext stuff Revision 1.40 2004/02/02 23:34:11 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff Revision 1.39 2004/01/25 21:37:28 rasc bugfixes, minor changes & enhancments Revision 1.38 2004/01/12 22:49:53 rasc get rid of stream descriptor module Revision 1.37 2004/01/11 22:49:41 rasc PES restructured Revision 1.36 2004/01/06 14:06:10 rasc no message Revision 1.35 2004/01/06 03:13:25 rasc TS prints PES/Section ID on payload_start Revision 1.34 2004/01/05 02:03:42 rasc no message Revision 1.33 2004/01/01 20:09:40 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.32 2003/12/30 14:05:38 rasc just some annotations, so I do not forget these over Sylvester party... (some alkohol may reformat parts of /devbrain/0 ... ) cheers! Revision 1.31 2003/12/28 00:01:15 rasc some minor changes/adds... Revision 1.30 2003/12/27 18:17:18 rasc dsmcc PES dsmcc_program_stream_descriptorlist Revision 1.29 2003/12/27 00:21:17 rasc dsmcc section tables Revision 1.28 2003/11/26 19:55:34 rasc no message Revision 1.27 2003/11/25 00:17:11 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.26 2003/11/24 23:52:18 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.25 2003/11/24 14:16:07 obi - corrected transport scrambling control bits according to ETSI ETR 289 - fixed lots of broken strings Revision 1.24 2003/11/09 20:48:35 rasc pes data packet (DSM-CC) Revision 1.23 2003/11/07 16:33:32 rasc no message Revision 1.22 2003/11/01 21:40:28 rasc some broadcast/linkage descriptor stuff Revision 1.21 2003/10/29 20:54:57 rasc more PES stuff, DSM descriptors, testdata Revision 1.20 2003/10/27 22:43:50 rasc carousel info descriptor and more Revision 1.19 2003/10/26 23:00:43 rasc fix Revision 1.18 2003/10/25 19:11:50 rasc no message Revision 1.17 2003/10/21 19:54:43 rasc no message Revision 1.16 2003/10/19 22:22:57 rasc - some datacarousell stuff started Revision 1.15 2003/10/19 21:05:53 rasc - some datacarousell stuff started Revision 1.14 2003/10/19 13:54:25 rasc -more table decoding Revision 1.13 2003/10/17 19:04:11 rasc - started more work on newer ISO 13818 descriptors - some reorg/update work started Revision 1.12 2003/10/17 18:16:54 rasc - started more work on newer ISO 13818 descriptors - some reorg work started Revision 1.11 2003/10/16 19:02:28 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.10 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? Revision 1.9 2003/06/24 23:51:03 rasc bugfixes and enhancements Revision 1.8 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.7 2001/12/07 22:17:20 rasc no message Revision 1.6 2001/12/06 15:33:18 rasc some small work on pespacket.c Revision 1.5 2001/12/01 12:34:17 rasc pespacket weitergestrickt, leider z.Zt. zuwenig Zeit um es richtig fertig zu machen. Revision 1.4 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.3 2001/10/05 17:43:37 rasc typo... Revision 1.2 2001/10/02 21:52:44 rasc - init der time_delta - PES erweitert, PES arbeitet im read() noch nicht richtig!! - muss tmbinc fragem, ob ich Mist baue, oder der Treiber (??) Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "dvb_str.h" #include "strtable_misc.h" /* -- PID assignment */ char *dvbstrPID_assignment (u_int id) { STR_TABLE TableIDs[] = { { 0x0000, 0x0000, "ISO 13818-1 Program Association Table (PAT)" }, { 0x0001, 0x0001, "ISO 13818-1 Conditional Access Table (CAT)" }, { 0x0002, 0x0002, "ISO 13818-1 Transport Stream Description Table (TSDT)" }, { 0x0003, 0x0003, "ISO 13818-11 IPMP Control Information " }, { 0x0004, 0x000F, "" }, { 0x0010, 0x0010, "DVB Network Information Table (NIT), Stuffing Table (ST)" }, { 0x0011, 0x0011, "DVB Service Description Table (SDT), Bouquet Association Table (BAT)" }, { 0x0012, 0x0012, "DVB Event Information Table (EIT)" }, { 0x0013, 0x0013, "DVB Running Status Table (RST)" }, { 0x0014, 0x0014, "DVB Time and Date Table (TDT), Time Offset Table (TOT)" }, { 0x0015, 0x0015, "DVB Network Synchronization / Mega-Frame Initialization Packet" }, { 0x0016, 0x0016, "TV ANYTIME Resolution Notification Table (RNT)" }, { 0x0017, 0x001B, "" }, { 0x001C, 0x001C, "DVB Inband Signalling" }, { 0x001D, 0x001D, "DVB Measurement" }, { 0x001E, 0x001E, "DVB Discontinuity Information Table (DIT)" }, { 0x001F, 0x001F, "DVB Selection Information Table (SIT)" }, // $$$ TODO ATSC Pid assignment { 0x0020, 0x1FFE, "" }, { 0x1FFF, 0x1FFF, "Null Packet" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- Table IDs (sections) ETSI EN 468 5.2 EN 301 192 TR 102 006 RE 101 202 ISO 13818-1 TS 102 323 TS 101 191 */ char *dvbstrTableID (u_int id) { STR_TABLE TableIDs[] = { // updated -- 2003-11-04 // -- updated 2004-07-26 from ITU-T Rec H.222.0 | ISO/IEC 13818-1:2000/FDAM 1 // -- updated 2004-08-12 from ITU-T Rec H.222.0 AMD2 // ATSC Table IDs could be included... { 0x00, 0x00, "Program Association Table (PAT)" }, { 0x01, 0x01, "Conditional Access Table (CAT)" }, { 0x02, 0x02, "Program Map Table (PMT)" }, { 0x03, 0x03, "Transport Stream Description Table (TSDT)" }, { 0x04, 0x04, "ISO_IEC_14496_scene_description_section" }, /* $$$ TODO */ { 0x05, 0x05, "ISO_IEC_14496_object_description_section" }, /* $$$ TODO */ { 0x06, 0x06, "Metadata Table" }, // $$$ TODO H.222.0 AMD1 { 0x07, 0x07, "IPMP_Control_Information_section (ISO 13818-11)" }, // $$$ TODO H.222.0 AMD1 { 0x08, 0x37, "ITU-T Rec. H.222.0|ISO/IEC13818 reserved" }, { 0x38, 0x39, "ISO/IEC 13818-6 reserved" }, { 0x3a, 0x3a, "DSM-CC - multiprotocol encapsulated data" }, { 0x3b, 0x3b, "DSM-CC - U-N messages (DSI or DII)" }, { 0x3c, 0x3c, "DSM-CC - Download Data Messages (DDB)" }, /* TR 101 202 */ { 0x3d, 0x3d, "DSM-CC - stream descriptorlist" }, { 0x3e, 0x3e, "DSM-CC - private data section // DVB datagram" }, /* EN 301 192 // ISO 13818-6 */ { 0x3f, 0x3f, "ISO/IEC 13818-6 reserved" }, { 0x40, 0x40, "Network Information Table (NIT) - actual network" }, { 0x41, 0x41, "Network Information Table (NIT) - other network" }, { 0x42, 0x42, "Service Description Table (SDT) - actual transport stream" }, { 0x43, 0x45, "reserved" }, { 0x46, 0x46, "Service Description Table (SDT) - other transport stream" }, { 0x47, 0x49, "reserved" }, { 0x4A, 0x4A, "Bouquet Association Table (BAT)" }, { 0x4B, 0x4B, "Update Notification Table (UNT)" }, /* TR 102 006 */ { 0x4C, 0x4C, "IP/MAC Notification Table (INT) [EN 301 192]" }, /* EN 192 */ { 0x4D, 0x4D, "reserved" }, { 0x4E, 0x4E, "Event Information Table (EIT) - actual transport stream, present/following" }, { 0x4F, 0x4F, "Event Information Table (EIT) - other transport stream, present/following" }, { 0x50, 0x5F, "Event Information Table (EIT) - actual transport stream, schedule" }, { 0x60, 0x6F, "Event Information Table (EIT) - other transport stream, schedule" }, { 0x70, 0x70, "Time Date Table (TDT)" }, { 0x71, 0x71, "Running Status Table (RST)" }, { 0x72, 0x72, "Stuffing Table (ST)" }, { 0x73, 0x73, "Time Offset Table (TOT)" }, { 0x74, 0x74, "MHP- Application Information Table (AIT)" }, /* MHP */ { 0x75, 0x75, "TVA- Container Table (CT)" }, /* TS 102 323 */ { 0x76, 0x76, "TVA- Related Content Table (RCT)" }, /* TS 102 323 */ { 0x77, 0x77, "TVA- Content Identifier Table (CIT)" }, /* TS 102 323 */ { 0x78, 0x78, "MPE-FEC Table (MFT)" }, /* EN 301 192 v1.4.1*/ { 0x79, 0x79, "TVA- Resolution Notification Table (RNT)" }, /* TS 102 323 */ { 0x80, 0x7D, "reserved" }, { 0x7E, 0x7E, "Discontinuity Information Table (DIT)" }, { 0x7F, 0x7F, "Selection Information Table (SIT)" }, { 0x80, 0x8F, "DVB CA message section (EMM/ECM)" }, /* ITU-R BT.1300 ref. */ { 0x90, 0xBF, "User private" }, { 0xC0, 0xFE, "ATSC reserved" }, /* ETR 211e02 */ { 0xFF, 0xFF, "forbidden" }, { 0,0, NULL } }; return findTableID (TableIDs, id); } /* -- ISO Descriptor table tags -- ISO 13818-1, etc. -- 2004-08-11 Updated H.222.0 AMD1 -- 2004-08-12 Updated H.222.0 AMD3 -- 2005-11-10 Updated H.222.0 (2000)/Cor.4 (09/2005) */ char *dvbstrMPEGDescriptorTAG (u_int tag) { STR_TABLE Tags[] = { { 0x00, 0x01, "Reserved" }, { 0x02, 0x02, "video_stream_descriptor" }, { 0x03, 0x03, "audio_stream_descriptor" }, { 0x04, 0x04, "hierarchy_descriptor" }, { 0x05, 0x05, "registration_descriptor" }, { 0x06, 0x06, "data_stream_alignment_descriptor" }, { 0x07, 0x07, "target_background_grid_descriptor" }, { 0x08, 0x08, "video_window_descriptor" }, { 0x09, 0x09, "CA_descriptor" }, { 0x0A, 0x0A, "ISO_639_language_descriptor" }, { 0x0B, 0x0B, "system_clock_descriptor" }, { 0x0C, 0x0C, "multiplex_buffer_utilization_descriptor" }, { 0x0D, 0x0D, "copyright_descriptor" }, { 0x0E, 0x0E, "maximum_bitrate_descriptor" }, { 0x0F, 0x0F, "private_data_indicator_descriptor" }, { 0x10, 0x10, "smoothing_buffer_descriptor" }, { 0x11, 0x11, "STD_descriptor" }, { 0x12, 0x12, "IBP_descriptor" }, /* MPEG DSM-CC */ { 0x13, 0x13, "carousel_identifier_descriptor" }, { 0x14, 0x14, "association_tag_descriptor" }, { 0x15, 0x15, "deferred_association_tag_descriptor" }, { 0x16, 0x16, "ISO/IEC13818-6 Reserved" }, /* DSM-CC stream descriptors */ { 0x17, 0x17, "NPT_reference_descriptor" }, { 0x18, 0x18, "NPT_endpoint_descriptor" }, { 0x19, 0x19, "stream_mode_descriptor" }, { 0x1A, 0x1A, "stream_event_descriptor" }, /* MPEG-4 descriptors */ { 0x1B, 0x1B, "MPEG4_video_descriptor" }, { 0x1C, 0x1C, "MPEG4_audio_descriptor" }, { 0x1D, 0x1D, "IOD_descriptor" }, { 0x1E, 0x1E, "SL_descriptor" }, { 0x1F, 0x1F, "FMC_descriptor" }, { 0x20, 0x20, "External_ES_ID_descriptor" }, { 0x21, 0x21, "MuxCode_descriptor" }, { 0x22, 0x22, "FMXBufferSize_descriptor" }, { 0x23, 0x23, "MultiplexBuffer_descriptor" }, { 0x24, 0x24, "Content_labeling_descriptor" }, /* TV ANYTIME TS 102 323 descriptors, ISO 13818-1 */ { 0x25, 0x25, "metadata_pointer_descriptor" }, { 0x26, 0x26, "metadata_descriptor" }, { 0x27, 0x27, "metadata_STD_descriptor" }, { 0x28, 0x28, "AVC_video_descriptor" }, { 0x29, 0x29, "IPMP_descriptor (MPEG-2 IPMP, ISO 13818-11)" }, { 0x2A, 0x2A, "AVC_timing_and_HRD_descriptor" }, { 0x2B, 0x2B, "MPEG-2_AAC_audio_descriptor" }, { 0x2C, 0x2C, "FlexMuxTiming_descriptor" }, { 0x2D, 0x3F, "ITU-T.Rec.H.222.0|ISO/IEC13818-1 Reserved" }, { 0x40, 0xFF, "Forbidden descriptor in MPEG context" }, // DVB Context { 0,0, NULL } }; return findTableID (Tags, tag); } /* -- Descriptor table tags */ char *dvbstrDVBDescriptorTAG (u_int tag) { STR_TABLE Tags[] = { { 0x00, 0x3F, "Forbidden descriptor in DVB context" }, // MPEG Context // ETSI 300 468 // updated EN 302 192 v 1.4.1 { 0x40, 0x40, "network_name_descriptor" }, { 0x41, 0x41, "service_list_descriptor" }, { 0x42, 0x42, "stuffing_descriptor" }, { 0x43, 0x43, "satellite_delivery_system_descriptor" }, { 0x44, 0x44, "cable_delivery_system_descriptor" }, { 0x45, 0x45, "VBI_data_descriptor" }, { 0x46, 0x46, "VBI_teletext_descriptor" }, { 0x47, 0x47, "bouquet_name_descriptor" }, { 0x48, 0x48, "service_descriptor" }, { 0x49, 0x49, "country_availibility_descriptor" }, { 0x4A, 0x4A, "linkage_descriptor" }, { 0x4B, 0x4B, "NVOD_reference_descriptor" }, { 0x4C, 0x4C, "time_shifted_service_descriptor" }, { 0x4D, 0x4D, "short_event_descriptor" }, { 0x4E, 0x4E, "extended_event_descriptor" }, { 0x4F, 0x4F, "time_shifted_event_descriptor" }, { 0x50, 0x50, "component_descriptor" }, { 0x51, 0x51, "mosaic_descriptor" }, { 0x52, 0x52, "stream_identifier_descriptor" }, { 0x53, 0x53, "CA_identifier_descriptor" }, { 0x54, 0x54, "content_descriptor" }, { 0x55, 0x55, "parental_rating_descriptor" }, { 0x56, 0x56, "teletext_descriptor" }, { 0x57, 0x57, "telephone_descriptor" }, { 0x58, 0x58, "local_time_offset_descriptor" }, { 0x59, 0x59, "subtitling_descriptor" }, { 0x5A, 0x5A, "terrestrial_delivery_system_descriptor" }, { 0x5B, 0x5B, "multilingual_network_name_descriptor" }, { 0x5C, 0x5C, "multilingual_bouquet_name_descriptor" }, { 0x5D, 0x5D, "multilingual_service_name_descriptor" }, { 0x5E, 0x5E, "multilingual_component_descriptor" }, { 0x5F, 0x5F, "private_data_specifier_descriptor" }, { 0x60, 0x60, "service_move_descriptor" }, { 0x61, 0x61, "short_smoothing_buffer_descriptor" }, { 0x62, 0x62, "frequency_list_descriptor" }, { 0x63, 0x63, "partial_transport_stream_descriptor" }, { 0x64, 0x64, "data_broadcast_descriptor" }, { 0x65, 0x65, "scrambling_descriptor" }, { 0x66, 0x66, "data_broadcast_id_descriptor" }, { 0x67, 0x67, "transport_stream_descriptor" }, { 0x68, 0x68, "DSNG_descriptor" }, { 0x69, 0x69, "PDC_descriptor" }, { 0x6A, 0x6A, "AC3_descriptor" }, { 0x6B, 0x6B, "ancillary_data_descriptor" }, { 0x6C, 0x6C, "cell_list_descriptor" }, { 0x6D, 0x6D, "cell_frequency_list_descriptor" }, { 0x6E, 0x6E, "announcement_support_descriptor" }, { 0x6F, 0x6F, "application_signalling_descriptor" }, { 0x70, 0x70, "adaptation_field_data_descriptor" }, { 0x71, 0x71, "service_identifier_descriptor" }, { 0x72, 0x72, "service_availability_descriptor" }, { 0x73, 0x73, "default_authority_descriptor" }, // TS 102 323 { 0x74, 0x74, "related_content_descriptor" }, // TS 102 323 { 0x75, 0x75, "TVA_id_descriptor" }, // TS 102 323 { 0x76, 0x76, "content_identifier_descriptor" }, // TS 102 323 { 0x77, 0x77, "time_slice_fec_identifier_descriptor" }, // EN 300 468 v1.6.1 { 0x78, 0x78, "ECM_repetition_rate_descriptor" }, // EN 300 468 v1.6.1 { 0x79, 0x79, "S2_satellite_delivery_system_descriptor" }, // EN 300 468 v1.7.1 { 0x7A, 0x7A, "enhanced_AC-3_descriptor" }, // EN 300 468 v1.7.1 { 0x7B, 0x7B, "DTS_descriptor" }, // EN 300 468 v1.7.1 { 0x7C, 0x7C, "AAC_descriptor" }, // EN 300 468 v1.7.1 { 0x7D, 0x7E, "reserved_descriptor" }, // EN 300 468 v1.7.1 { 0x7F, 0x7F, "extension_descriptor" }, // EN 300 468 v1.7.1 { 0x80, 0xAF, "User defined/ATSC reserved" }, /* ETR 211e02 */ { 0xB0, 0xFE, "User defined" }, { 0xFF, 0xFF, "Forbidden" }, { 0,0, NULL } }; return findTableID (Tags, tag); } /* -- current_next_indicator -- ISO/IEC13818-1|ITU H.222.0 */ char *dvbstrCurrentNextIndicator (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "valid next" }, { 0x01, 0x01, "valid now" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- delivery desctritor flags -- ETSI EN 468 6.2.12.1 ff */ char *dvbstrWEST_EAST_FLAG (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "WEST" }, { 0x01, 0x01, "EAST" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrPolarisation_FLAG (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "linear - horizontal" }, { 0x01, 0x01, "linear - vertical" }, { 0x02, 0x02, "circular - left" }, { 0x03, 0x03, "circular - right" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrModulationSAT_FLAG (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "Auto" }, { 0x01, 0x01, "QPSK" }, { 0x02, 0x02, "8PSK" }, // EN 300 468 1.7.1 { 0x03, 0x03, "16-QAM" }, // EN 300 468 1.7.1 { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrRollOffSAT_FLAG (u_int flag) { STR_TABLE Table[] = { // EN 300 468 1.7.1 { 0x00, 0x00, "Alpha 0.35" }, { 0x01, 0x01, "Alpha 0.25" }, { 0x02, 0x02, "Alpha 0.20" }, { 0x03, 0x1F, "reserved for future use" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrModulationCable_FLAG (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "not defined" }, { 0x01, 0x01, "16 QAM" }, { 0x02, 0x02, "32 QAM" }, { 0x03, 0x03, "64 QAM" }, { 0x04, 0x04, "128 QAM" }, { 0x05, 0x05, "256 QAM" }, { 0x06, 0xFF, "reserved for future use" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrFECinner_SCHEME (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "not defined" }, { 0x01, 0x01, "1/2 conv. code rate" }, { 0x02, 0x02, "2/3 conv. code rate" }, { 0x03, 0x03, "3/4 conv. code rate" }, { 0x04, 0x04, "5/6 conv. code rate" }, { 0x05, 0x05, "7/8 conv. code rate" }, { 0x06, 0x06, "8/9 conv. code rate" }, // EN 300 468 1.7.1 { 0x07, 0x07, "3/5 conv. code rate" }, // ... { 0x08, 0x08, "4/5 conv. code rate" }, { 0x09, 0x09, "9/10 conv. code rate"}, { 0x0A, 0x0E, "reserved" }, { 0x0F, 0x0F, "No conv. coding" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrFECouter_SCHEME (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "not defined" }, { 0x01, 0x01, "no outer FEC coding" }, { 0x02, 0x02, "RS(204/188)" }, { 0x03, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- Linkage type descriptor */ char *dvbstrLinkage_TYPE (u_int flag) { STR_TABLE Table[] = { /* -- updated 2006-05-28 */ { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "information service" }, { 0x02, 0x02, "EPG service" }, { 0x03, 0x03, "CA replacement service" }, { 0x04, 0x04, "TS containing complete Network/Bouquet SI" }, { 0x05, 0x05, "service replacement service" }, { 0x06, 0x06, "data broadcast service" }, { 0x07, 0x07, "RCS Map" }, { 0x08, 0x08, "mobile handover service" }, { 0x09, 0x09, "system software update service" }, { 0x0A, 0x0A, "TS containing SSU BAT or NIT" }, { 0x0B, 0x0B, "IP/MAC Notification Table" }, { 0x0C, 0x0C, "TS containing INT BAT or NIT" }, { 0x0D, 0x7F, "reserved" }, { 0x80, 0xFE, "user defined" }, { 0xFF, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrHandover_TYPE (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "DVB hand-over to an identical service in a neighbouring country" }, { 0x02, 0x02, "DVB hand-over to local variation to same service" }, { 0x03, 0x03, "DVB hand-over to an associated service" }, { 0,0, NULL } }; return findTableID (Table, flag); } char *dvbstrOrigin_TYPE (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "NIT" }, { 0x01, 0x01, "SDT" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- Service Link Descriptor -- Updated: EN 300 468 1.7.1 */ char *dvbstrService_TYPE (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "digital television service" }, { 0x02, 0x02, "digital radio sound service" }, { 0x03, 0x03, "Teletext service" }, { 0x04, 0x04, "NVOD reference service" }, { 0x05, 0x05, "NVOD time-shifted service" }, { 0x06, 0x06, "mosaic service" }, // -- 0x07 - 0x0B has been changed in EN 300 468 v1.7.1 { 0x07, 0x08, "reserved" }, { 0x0A, 0x0A, "advanced codec digital radio sound service" }, { 0x0B, 0x0B, "advanced codec mosaic service" }, { 0x0C, 0x0C, "data broadcast service" }, { 0x0D, 0x0D, "reserved for Common Interface Usage" }, { 0x0E, 0x0E, "RCS Map" }, { 0x0F, 0x0F, "RCS FLS" }, { 0x10, 0x10, "DVB MHP service" }, { 0x11, 0x11, "MPEG-2 HD digital television service" }, { 0x12, 0x15, "reserved" }, { 0x16, 0x16, "advanced codec SD digital television service" }, { 0x17, 0x17, "advanced codec SD NVOD time-shifted service" }, { 0x18, 0x18, "advanced codec SD NVOD reference service" }, { 0x19, 0x19, "advanced codec HD digital television service" }, { 0x1A, 0x1A, "advanced codec HD NVOD time-shifted service" }, { 0x1B, 0x1B, "advanced codec HD NVOD reference service" }, { 0x1C, 0x7F, "reserved" }, { 0x80, 0xFE, "User defined" }, { 0xFF, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- Programm Map Table Stream Type -- ISO 13818-1 -- 2004-07 updated H.222.0 AMD1 -- 2004-08 updated H.222.0 AMD3 */ char *dvbstrStream_TYPE (u_int flag) { STR_TABLE Table[] = { // -- updated 2003-10-17 from H.220 // -- updated 2003-11-04 from ATSC / ISO13818-6AMD1-2000 // -- updated 2004-07-26 from ITU-T Rec H.222.0 AMD1 // -- updated 2004-08-12 from ITU-T Rec H.222.0 AMD3 { 0x00, 0x00, "ITU-T | ISO-IE Reserved" }, { 0x01, 0x01, "ISO/IEC 11172 Video" }, { 0x02, 0x02, "ITU-T Rec. H.262 | ISO/IEC 13818-2 Video | ISO/IEC 11172-2 constr. parameter video stream" }, { 0x03, 0x03, "ISO/IEC 11172 Audio" }, { 0x04, 0x04, "ISO/IEC 13818-3 Audio" }, { 0x05, 0x05, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 private sections" }, { 0x06, 0x06, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 PES packets containing private data" }, { 0x07, 0x07, "ISO/IEC 13512 MHEG" }, { 0x08, 0x08, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex A DSM CC" }, { 0x09, 0x09, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1/11172-1 auxiliary" }, { 0x0A, 0x0A, "ISO/IEC 13818-6 Multiprotocol encapsulation" }, { 0x0B, 0x0B, "ISO/IEC 13818-6 DSM-CC U-N Messages" }, { 0x0C, 0x0C, "ISO/IEC 13818-6 Stream Descriptors" }, { 0x0D, 0x0D, "ISO/IEC 13818-6 Sections (any type, including private data)" }, { 0x0E, 0x0E, "ISO/IEC 13818-1 auxiliary" }, { 0x0F, 0x0F, "ISO/IEC 13818-7 Audio with ADTS transport sytax" }, { 0x10, 0x10, "ISO/IEC 14496-2 Visual" }, { 0x11, 0x11, "ISO/IEC 14496-3 Audio with LATM transport syntax as def. in ISO/IEC 14496-3/AMD1" }, { 0x12, 0x12, "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in PES packets" }, { 0x13, 0x13, "ISO/IEC 14496-1 SL-packetized stream or FlexMux stream carried in ISO/IEC 14496 sections" }, { 0x14, 0x14, "ISO/IEC 13818-6 DSM-CC synchronized download protocol" }, // Update 2004-07 { 0x15, 0x15, "Metadata carried in PES packets using the Metadata Access Unit Wrapper" }, { 0x16, 0x16, "Metadata carried in metadata_sections" }, { 0x17, 0x17, "Metadata carried in ISO/IEC 13818-6 (DSM-CC) Data Carousel" }, { 0x18, 0x18, "Metadata carried in ISO/IEC 13818-6 (DSM-CC) Object Carousel" }, { 0x19, 0x19, "Metadata carried in ISO/IEC 13818-6 Synchronized Download Protocol using the Metadata Access Unit Wrapper" }, { 0x1A, 0x1A, "IPMP stream (defined in ISO/IEC 13818-11, MPEG-2 IPMP)" }, { 0x1B, 0x1B, "AVC video stream as defined in ITU-T Rec. H.264 | ISO/IEC 14496-10 Video" }, { 0x1C, 0x7E, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved" }, { 0x7F, 0x7F, "IPMP stream" }, // $$$ ATSC ID Names could be includes... // $$$ TODO streamtype == 0x90 at MPE_FEC , see EN 301192 v1.4.1 s9.5 { 0x80, 0xFF, "User private" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- Programm Map Table Stream Type (Short String ID: ""=Unkown, "S"=Section, "P"=PES) -- only important types... -- (short string used for spidering PIDs) */ char *dvbstrStream_TYPE_SHORT (u_int flag) { // see dvbstrStream_TYPE STR_TABLE Table[] = { { 0x00, 0x00, "" }, { 0x01, 0x04, "P" }, { 0x05, 0x05, "S" }, { 0x06, 0x06, "P" }, { 0x07, 0x07, "" }, { 0x08, 0x09, "P" }, { 0x0A, 0x0A, "" }, { 0x0B, 0x0B, "S" }, { 0x0C, 0x0C, "P" }, { 0x0D, 0x0D, "S" }, { 0x0E, 0x0E, "P" }, { 0x0F, 0xFF, "" }, { 0x10, 0x10, "" }, { 0x11, 0x11, "" }, { 0x12, 0x12, "P" }, { 0x13, 0x13, "S" }, { 0x14, 0x14, "" }, // $$$ TODO sect o PES { 0x15, 0x15, "P" }, { 0x16, 0x16, "S" }, { 0x17, 0x7F, "" }, // ??? $$$ TODO { 0,0, NULL } }; return findTableID (Table, flag); } /* -- Audio Types (descriptor e.g. ISO 639) -- Update ISO/IEC 13818-1:2000/Amd.5:2005 (E) */ char *dvbstrAudio_TYPE (u_int flag) { STR_TABLE Table[] = { { 0x00, 0x00, "undefined" }, { 0x01, 0x01, "clean effects" }, { 0x02, 0x02, "hearing impaired" }, { 0x03, 0x03, "visual impaired commentary" }, { 0x04, 0x7F, "user private" }, { 0x80, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- CA-System Identifier (ETSI ETR 162) */ char *dvbstrCASystem_ID (u_int id) { STR_TABLE Table[] = { // -- updated from dvb.org 2003-10-16 { 0x0000, 0x0000, "Reserved" }, { 0x0001, 0x00FF, "Standardized Systems" }, { 0x0100, 0x01FF, "Canal Plus (Seca/MediaGuard)" }, { 0x0200, 0x02FF, "CCETT" }, { 0x0300, 0x03FF, "MSG MediaServices GmbH" }, { 0x0400, 0x04FF, "Eurodec" }, { 0x0500, 0x05FF, "France Telecom (Viaccess)" }, { 0x0600, 0x06FF, "Irdeto" }, { 0x0700, 0x07FF, "Jerrold/GI/Motorola" }, { 0x0800, 0x08FF, "Matra Communication" }, { 0x0900, 0x09FF, "News Datacom (Videoguard)" }, { 0x0A00, 0x0AFF, "Nokia" }, { 0x0B00, 0x0BFF, "Norwegian Telekom (Conax)" }, { 0x0C00, 0x0CFF, "NTL" }, { 0x0D00, 0x0DFF, "Philips (Cryptoworks)" }, { 0x0E00, 0x0EFF, "Scientific Atlanta (Power VU)" }, { 0x0F00, 0x0FFF, "Sony" }, { 0x1000, 0x10FF, "Tandberg Television" }, { 0x1100, 0x11FF, "Thompson" }, { 0x1200, 0x12FF, "TV/COM" }, { 0x1300, 0x13FF, "HPT - Croatian Post and Telecommunications" }, { 0x1400, 0x14FF, "HRT - Croatian Radio and Television" }, { 0x1500, 0x15FF, "IBM" }, { 0x1600, 0x16FF, "Nera" }, { 0x1700, 0x17FF, "Beta Technik (Betacrypt)" }, { 0x1800, 0x18FF, "Kudelski SA"}, { 0x1900, 0x19FF, "Titan Information Systems"}, { 0x2000, 0x20FF, "Telefónica Servicios Audiovisuales"}, { 0x2100, 0x21FF, "STENTOR (France Telecom, CNES and DGA)"}, { 0x2200, 0x22FF, "Scopus Network Technologies"}, { 0x2300, 0x23FF, "BARCO AS"}, { 0x2400, 0x24FF, "StarGuide Digital Networks "}, { 0x2500, 0x25FF, "Mentor Data System, Inc."}, { 0x2600, 0x26FF, "European Broadcasting Union"}, { 0x4700, 0x47FF, "General Instrument"}, { 0x4800, 0x48FF, "Telemann"}, { 0x4900, 0x49FF, "Digital TV Industry Alliance of China"}, { 0x4A00, 0x4A0F, "Tsinghua TongFang"}, { 0x4A10, 0x4A1F, "Easycas"}, { 0x4A20, 0x4A2F, "AlphaCrypt"}, { 0x4A30, 0x4A3F, "DVN Holdings"}, { 0x4A40, 0x4A4F, "Shanghai Advanced Digital Technology Co. Ltd. (ADT)"}, { 0x4A50, 0x4A5F, "Shenzhen Kingsky Company (China) Ltd"}, { 0x4A60, 0x4A6F, "@SKY"}, { 0x4A70, 0x4A7F, "DreamCrypt"}, { 0x4A80, 0x4A8F, "THALESCrypt"}, { 0x4A90, 0x4A9F, "Runcom Technologies"}, { 0x4AA0, 0x4AAF, "SIDSA"}, { 0x4AB0, 0x4ABF, "Beijing Compunicate Technology Inc."}, { 0x4AC0, 0x4ACF, "Latens Systems Ltd"}, { 0,0, NULL } }; return findTableID (Table, id); } /* -- Data Broadcast ID -- ETR 162 */ char *dvbstrDataBroadcast_ID (u_int flag) { STR_TABLE Table[] = { // -- upodated 2003-10-16 // { Data Broadcast ID, Data Broadcast ID, "Data Broadcast Specification Name" }, { 0x0000, 0x0000, "Reserved for future use" }, { 0x0001, 0x0001, "Data pipe" }, { 0x0002, 0x0002, "Asynchronous data stream" }, { 0x0003, 0x0003, "Synchronous data stream" }, { 0x0004, 0x0004, "Synchronised data stream" }, { 0x0005, 0x0005, "Multi protocol encapsulation" }, { 0x0006, 0x0006, "Data Carousel" }, { 0x0007, 0x0007, "Object Carousel" }, { 0x0008, 0x0008, "DVB ATM streams" }, { 0x0009, 0x0009, "Higher Protocols based on asynchronous data streams" }, { 0x000A, 0x000A, "System Software Update" }, // TR 102 006 { 0x000B, 0x00ef, "Reserved for future use by DVB" }, { 0x00F0, 0x00F0, "MHP Object Carousel" }, // from registration at www.dvb.org { 0x00F1, 0x00F1, "reserved for MHP Multi Protocol Encapsulation" }, { 0x00F2, 0x00Fe, "Reserved for MHP use" }, { 0x00FF, 0x00FF, "Reserved for future use by DVB" }, { 0x0100, 0x0100, "Eutelsat Data Piping" }, { 0x0101, 0x0101, "Eutelsat Data Streaming" }, { 0x0102, 0x0102, "SAGEM IP encapsulation in MPEG-2 PES packets" }, { 0x0103, 0x0103, "BARCO Data Broadcasting" }, { 0x0104, 0x0104, "CyberCity Multiprotocol Encapsulation (New Media Communications Ltd.)" }, { 0x0105, 0x0105, "CyberSat Multiprotocol Encapsulation (New Media Communications Ltd.)" }, { 0x0106, 0x0106, "The Digital Network" }, { 0x0107, 0x0107, "OpenTV Data Carousel" }, { 0x0108, 0x0108, "Panasonic" }, { 0x0109, 0x0109, "MSG MediaServices GmbH" }, { 0x010A, 0x010A, "TechnoTrend" }, { 0x010B, 0x010B, "Canal + Technologies system software download" }, { 0x0110, 0x0110, "Televizja Polsat" }, { 0x0111, 0x0111, "UK DTG" }, { 0x0112, 0x0112, "SkyMedia" }, { 0x0113, 0x0113, "Intellibyte DataBroadcasting" }, { 0x0114, 0x0114, "TeleWeb Data Carousel" }, { 0x0115, 0x0115, "TeleWeb Object Carousel" }, { 0x0116, 0x0116, "TeleWeb" }, { 0x4444, 0x4444, "4TV Data Broadcast" }, { 0x4E4F, 0x4E4F, "Nokia IP based software delivery" }, { 0xBBB1, 0xBBB1, "BBG Data Caroussel" }, { 0xBBB2, 0xBBB2, "BBG Object Caroussel" }, { 0xBBBB, 0xBBBB, "Bertelsmann Broadband Group" }, { 0xFFFF, 0xFFFF, "Reserved for future use" }, { 0,0, NULL } }; return findTableID (Table, flag); } /* -- Network Identification coding (ETR 162) */ char *dvbstrOriginalNetwork_ID (u_int i) { STR_TABLE Table[] = { // -- updated 2003-10-16 // -- { Original Network ID, Original Network ID, "Description | Operator" }, { 0x0000, 0x0000, "Reserved | Reserved" }, { 0x0001, 0x0001, "Astra Satellite Network 19,2°E | Société Européenne des Satellites" }, { 0x0002, 0x0002, "Astra Satellite Network 28,2°E | Société Européenne des Satellites" }, { 0x0003, 0x0019, "Astra | Société Européenne des Satellites" }, { 0x001A, 0x001A, "Quiero Televisión | Quiero Televisión" }, { 0x001B, 0x001B, "RAI | RAI" }, { 0x001F, 0x001F, "Europe Online Networks (EON) | Europe Online Networks S.A" }, { 0x0020, 0x0020, "ASTRA | Société Européenne des Satellites" }, { 0x0021, 0x0026, "Hispasat Network | Hispasat S.A." }, { 0x0027, 0x0027, "Hispasat 30°W | Hispasat FSS" }, { 0x0028, 0x0028, "Hispasat 30°W | Hispasat DBS" }, { 0x0029, 0x0029, "Hispasat 30°W | Hispasat America" }, { 0x002E, 0x002E, "Xantic | Xantic BU Broadband" }, { 0x002F, 0x002F, "TVNZ Digital | TVNZ" }, { 0x0030, 0x0030, "Canal+ Satellite Network | Canal+ SA (for Intelsat 601-325°E)" }, { 0x0031, 0x0031, "Hispasat - VIA DIGITAL | Hispasat S.A." }, { 0x0032, 0x0034, "Hispasat Network | Hispasat S.A." }, { 0x0035, 0x0035, "Nethold Main Mux System | NetHold IMS" }, { 0x0036, 0x0036, "TV Cabo | TV Cabo Portugal" }, { 0x0037, 0x0037, "STENTOR | France Telecom, CNES and DGA" }, { 0x0038, 0x0038, "OTE | Hellenic Telecommunications Organization S.A." }, { 0x0040, 0x0040, "Croatian Post and Telecommunications | HPT Croatian Post and Telecommunications" }, { 0x0041, 0x0041, "Mindport network | Mindport" }, { 0x0046, 0x0047, "1 degree W | Telenor" }, { 0x0048, 0x0048, "STAR DIGITAL | STAR DIGITAL A.S." }, { 0x0049, 0x0049, "Sentech Digital Satellite | Sentech" }, { 0x0050, 0x0050, "Croatian Radio and Television | HRT Croatian Radio and Television" }, { 0x0051, 0x0051, "Havas | Havas" }, { 0x0052, 0x0052, "Osaka Yusen Satellite | StarGuide Digital Networks" }, { 0x0054, 0x0054, "Teracom Satellite | Teracom AB Satellite Services" }, { 0x0055, 0x0055, "Sirius Satellite System European Coverage | NSAB (Teracom)" }, { 0x0058, 0x0058, "(Thiacom 1 & 2 co-located 78.5°E) | UBC Thailand" }, { 0x005E, 0x005E, "Sirius Satellite System Nordic Coverage | NSAB" }, { 0x005F, 0x005F, "Sirius Satellite System FSS | NSAB" }, { 0x0060, 0x0060, "MSG MediaServices GmbH | MSG MediaServices GmbH" }, { 0x0069, 0x0069, "(Optus B3 156°E) | (Optus Communications)" }, { 0x0070, 0x0070, "BONUM1; 36 Degrees East | NTV+" }, { 0x0073, 0x0073, "(PanAmSat 4 68.5°E) | (Pan American Satellite System)" }, { 0x007D, 0x007D, "Skylogic | Skylogic Italia" }, { 0x007E, 0x007E, "Eutelsat Satellite System at 7°E | European Telecommunications Satellite Organization" }, { 0x007F, 0x007F, "Eutelsat Satellite System at 7°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x0085, 0x0085, "BetaTechnik | BetaTechnik" }, { 0x0090, 0x0090, "National network | TDF" }, { 0x00A0, 0x00A0, "National Cable Network | News Datacom" }, { 0x00A1, 0x00A5, "News Satellite Network | News Datacom" }, { 0x00A6, 0x00A6, "ART | ART" }, { 0x00A7, 0x00A7, "Globecast | France Telecom" }, { 0x00A8, 0x00A8, "Foxtel | Foxtel" }, { 0x00A9, 0x00A9, "Sky New Zealand | Sky New Zealand" }, { 0x00B0, 0x00B3, "TPS | La Télévision Par Satellite" }, { 0x00B4, 0x00B4, "Telesat 107.3°W | Telesat Canada" }, { 0x00B5, 0x00B5, "Telesat 111.1°W | Telesat Canada" }, { 0x00B6, 0x00B6, "Telstra Saturn | TelstraSaturn Limited" }, { 0x00BA, 0x00BA, "Satellite Express 6 (80°E) | Satellite Express" }, { 0x00C0, 0x00CD, "Canal + | Canal+" }, { 0x00EB, 0x00EB, "Eurovision Network | European Broadcasting Union" }, { 0x0100, 0x0100, "ExpressVu | ExpressVu Inc." }, { 0x010D, 0x010D, "Skylogic | Skylogic Italia" }, { 0x010E, 0x010E, "Eutelsat Satellite System at 10°E | European Telecommunications Satellite Organization" }, { 0x010F, 0x010F, "Eutelsat Satellite System at 10°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x0110, 0x0110, "Mediaset | Mediaset" }, { 0x011F, 0x011F, "visAvision Network | European Telecommunications Satellite Organization" }, { 0x013D, 0x013D, "Skylogic | Skylogic Italia" }, { 0x013E, 0x013E, "Eutelsat Satellite System 13°E | European Telecommunications Satellite Organization" }, { 0x013F, 0x013F, "Eutelsat Satellite System at 13°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x016D, 0x016D, "Skylogic | Skylogic Italia" }, { 0x016E, 0x016E, "Eutelsat Satellite System at 16°E | European Telecommunications Satellite Organization" }, { 0x016F, 0x016F, "Eutelsat Satellite System at 16°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x01F4, 0x01F4, "MediaKabel B.V" }, { 0x022D, 0x022D, "Skylogic | Skylogic Italia" }, { 0x022E, 0x022F, "Eutelsat Satellite System at 21.5°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x026D, 0x026D, "Skylogic | Skylogic Italia" }, { 0x026E, 0x026F, "Eutelsat Satellite System at 25.5°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x029D, 0x029D, "Skylogic | Skylogic Italia" }, { 0x029E, 0x029E, "Eutelsat Satellite System at 29°E | European Telecommunications Satellite Organization" }, { 0x029F, 0x029F, "Eutelsat Satellite System at 28.5°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x02BE, 0x02BE, "Arabsat | Arabsat (Scientific Atlanta, Eutelsat)" }, { 0x033D, 0x033D, "Skylogic at 33°E | Skylogic Italia" }, { 0x033E, 0x033f, "Eutelsat Satellite System at 33°E | Eutelsat" }, { 0x036D, 0x036D, "Skylogic | Skylogic Italia" }, { 0x036E, 0x036E, "Eutelsat Satellite System at 36°E | European Telecommunications Satellite Organization" }, { 0x036F, 0x036F, "Eutelsat Satellite System at 36°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x03E8, 0x03E8, "Telia | Telia, Sweden" }, { 0x047D, 0x047D, "Skylogic | Skylogic Italia" }, { 0x047E, 0x047f, "Eutelsat Satellite System at 12.5°W | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x048D, 0x048D, "Skylogic | Skylogic Italia" }, { 0x048E, 0x048E, "Eutelsat Satellite System at 48°E | European Telecommunications Satellite Organization" }, { 0x048F, 0x048F, "Eutelsat Satellite System at 48°E | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x052D, 0x052D, "Skylogic | Skylogic Italia" }, { 0x052E, 0x052f, "Eutelsat Satellite System at 8°W | EUTELSAT - European Telecommunications Satellite Organization" }, { 0x055D, 0x055D, "Skylogic at 5°W | Skylogic Italia" }, { 0x055E, 0x055f, "Eutelsat Satellite System at 5°W | Eutelsat" }, { 0x0600, 0x0600, "UPC Satellite | UPC" }, { 0x0601, 0x0601, "UPC Cable | UPC" }, { 0x0602, 0x0602, "Tevel | Tevel Cable (Israel)" }, { 0x071D, 0x071D, "Skylogic at 70.5°E | Skylogic Italia" }, { 0x071E, 0x071f, "Eutelsat Satellite System at 70.5°E | Eutelsat" }, { 0x0800, 0x0801, "Nilesat 101 | Nilesat" }, { 0x0880, 0x0880, "MEASAT 1, 91.5°E | MEASAT Broadcast Network Systems SDN. BHD. (Kuala Lumpur, Malaysia)" }, { 0x0882, 0x0882, "MEASAT 2, 91.5°E | MEASAT Broadcast Network Systems SDN. BHD. (Kuala Lumpur, Malaysia)" }, { 0x0883, 0x0883, "MEASAT 2, 148.0°E | Hsin Chi Broadcast Company Ltd." }, { 0x088F, 0x088F, "MEASAT 3 | MEASAT Broadcast Network Systems SDN. BHD. (Kuala Lumpur, Malaysia)" }, { 0x1000, 0x1000, "Optus B3 156°E | Optus Communications" }, { 0x1001, 0x1001, "DISH Network | Echostar Communications" }, { 0x1002, 0x1002, "Dish Network 61.5 W | Echostar Communications" }, { 0x1003, 0x1003, "Dish Network 83 W | Echostar Communications" }, { 0x1004, 0x1004, "Dish Network 119 W | Echostar Communications" }, { 0x1005, 0x1005, "Dish Network 121 W | Echostar Communications" }, { 0x1006, 0x1006, "Dish Network 148 W | Echostar Communications" }, { 0x1007, 0x1007, "Dish Network 175 W | Echostar Communications" }, { 0x1008, 0x1008, "Dish Network W | Echostar Communications" }, { 0x1009, 0x1009, "Dish Network X | Echostar Communications" }, { 0x100A, 0x100A, "Dish Network Y | Echostar Communications" }, { 0x100B, 0x100B, "Dish Network Z | Echostar Communications" }, { 0x1010, 0x1010, "ABC TV | Australian Broadcasting Corporation" }, { 0x1011, 0x1011, "SBS | SBS Australia" }, { 0x1012, 0x1012, "Nine Network Australia | Nine Network Australia" }, { 0x1013, 0x1013, "Seven Network Australia | Seven Network Limited" }, { 0x1014, 0x1014, "Network TEN Australia | Network TEN Limited" }, { 0x1015, 0x1015, "WIN Television Australia | WIN Television Pty Ltd" }, { 0x1016, 0x1016, "Prime Television Australia | Prime Television Limited" }, { 0x1017, 0x1017, "Southern Cross Broadcasting Australia | Southern Cross Broadcasting (Australia) Limited" }, { 0x1018, 0x1018, "Telecasters Australia | Telecasters Australia Limited" }, { 0x1019, 0x1019, "NBN Australia | NBN Limited" }, { 0x101A, 0x101A, "Imparja Television Australia | Imparja Television Australia" }, { 0x101B, 0x101f, "Reserved for Australian broadcasters | Reserved for Australian broadcasters" }, { 0x1100, 0x1100, "GE Americom | GE American Communications" }, { 0x2000, 0x2000, "Thiacom 1 & 2 co-located 78.5°E | Shinawatra Satellite" }, { 0x2024, 0x2024, "Australian Digital Terrestrial Television | Australian Broadcasting Authority" }, { 0x2038, 0x2038, "Belgian Digital Terrestrial Television | BIPT" }, { 0x20CB, 0x20CB, "Czech Republic Digital Terrestrial Television | Czech Digital Group" }, { 0x20D0, 0x20D0, "Danish Digital Terrestrial Television | National Telecom Agency Denmark" }, { 0x20E9, 0x20E9, "Estonian Digital Terrestrial Television | Estonian National Communications Board" }, { 0x20F6, 0x20F6, "Finnish Digital Terrestrial Television | Telecommunicatoins Administratoin Centre, Finland" }, { 0x2114, 0x2114, "German Digital Terrestrial Television | IRT on behalf of the German DVB-T broadcasts" }, { 0x2174, 0x2174, "Irish Digital Terrestrial Television | Irish Telecommunications Regulator" }, { 0x2178, 0x2178, "Israeli Digital Terrestrial Television | BEZEQ (The Israel Telecommunication Corp Ltd.)" }, { 0x2210, 0x2210, "Netherlands Digital Terrestrial Television | Nozema" }, { 0x22BE, 0x22BE, "Singapore Digital Terrestrial Television | Singapore Broadcasting Authority" }, { 0x22D4, 0x22D4, "Spanish Digital Terrestrial Television | Spanish Broadcasting Regulator" }, { 0x22F1, 0x22F1, "Swedish Digital Terrestrial Television | Swedish Broadcasting Regulator" }, { 0x22F4, 0x22F4, "Swiss Digital Terrestrial Television | OFCOM" }, { 0x233A, 0x233A, "UK Digital Terrestrial Television | Independent Television Commission" }, { 0x3000, 0x3000, "PanAmSat 4 68.5°E | Pan American Satellite System" }, { 0x5000, 0x5000, "Irdeto Mux System | Irdeto Test Laboratories" }, { 0x616D, 0x616D, "BellSouth Entertainment | BellSouth Entertainment, Atlanta, GA, USA" }, { 0x6600, 0x6600, "UPC Satellite | UPC" }, { 0x6601, 0x6601, "UPC Cable | UPC" }, { 0xF000, 0xF000, "Small Cable networks | Small cable network network operators" }, { 0xF001, 0xF001, "Deutsche Telekom | Deutsche Telekom AG" }, { 0xF010, 0xF010, "Telefónica Cable | Telefónica Cable SA" }, { 0xF020, 0xF020, "Cable and Wireless Communication | Cable and Wireless Communications" }, { 0xF100, 0xF100, "Casema | Casema N.V." }, { 0xF750, 0xF750, "Telewest Communications Cable Network | Telewest Communications Plc" }, { 0xF751, 0xF751, "OMNE Communications | OMNE Communications Ltd." }, { 0xFBFC, 0xFBFC, "MATAV | MATAV (Israel)" }, { 0xFBFD, 0xFBFD, "Telia Kabel-TV | Telia, Sweden" }, { 0xFBFE, 0xFBFE, "TPS | La Télévision Par Satellite" }, { 0xFBFF, 0xFBFF, "Sky Italia | Sky Italia Spa." }, { 0xFC10, 0xFC10, "Rhône Vision Cable | Rhône Vision Cable" }, { 0xFC41, 0xFC41, "France Telecom Cable | France Telecom" }, { 0xFD00, 0xFD00, "National Cable Network | Lyonnaise Communications" }, { 0xFE00, 0xFE00, "TeleDenmark Cable TV | TeleDenmark" }, { 0xFEC0, 0xFEff, "Network Interface Modules | Common Interface" }, { 0xFF00, 0xFFfe, "Private_temporary_use | ETSI" }, { 0,0, NULL } }; return findTableID (Table, i); } char *dvbstrNetworkIdent_ID (u_int i) { STR_TABLE Table[] = { { 0x0000, 0x0000, "reserved" }, { 0x0001, 0x0001, "Astra Satellite Network 19.2E / Satellite / SES" }, { 0x0002, 0x0002, "Astra Satellite Network 28.2E / Satellite / SES" }, { 0x0002, 0x0020, "Astra Satellite Network / Satellite / SES" }, { 0x0021, 0x0027, "Hispasat Network / Satellite / Hispasat FSS" }, { 0x0027, 0x0028, "Hispasat 30W / Satellite / Hispasat FSS" }, { 0x0028, 0x0028, "Hispasat 30W / Satellite / Hispasat DBS" }, { 0x0029, 0x0029, "Hispasat 30W / Satellite / Hispasat America" }, { 0x002A, 0x002A, "Multicabal / Satellite / Multicanal" }, { 0x0035, 0x0035, "TV Africa / Satellite / Telemedia (PTY) Ltd." }, { 0x0085, 0x0085, "- / Satellite / Beta Technik" }, { 0x013E, 0x013F, "Eutelsat Satellite System 13.0E / Satellite / ETSO" }, { 0x016E, 0x016F, "Eutelsat Satellite System 16.0E / Satellite / ETSO" }, { 0x022E, 0x022F, "Eutelsat Satellite System 21.5E / Satellite / ETSO" }, { 0x047E, 0x047F, "Eutelsat Satellite System 12.5W / Satellite / ETSO" }, { 0x052E, 0x052F, "Eutelsat Satellite System 8.5W / Satellite / ETSO" }, //$$$ lots are missing { 0x0530, 0xFEFF, "--> please lookup at http://www.dvb.org" }, { 0xFF00, 0xFFFF, "Private temporary use" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Teletext type descriptor (ETSI EN 300 468 6.2.38) */ char *dvbstrTeletext_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "initial teletext page" }, { 0x02, 0x02, "teletext subtitle page" }, { 0x03, 0x03, "additional information page" }, { 0x04, 0x04, "program schedule page" }, { 0x05, 0x05, "teletext subtitle page for hearing impaired people" }, { 0x06, 0x1F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Terrestrial Bandwidth descriptor (ETSI EN 300 468) -- see also: EN 300 744 */ // -- updated: EN 300 468 v1.7.1 char *dvbstrTerrBandwidth_SCHEME (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "8 MHz" }, { 0x01, 0x01, "7 MHz" }, { 0x02, 0x02, "6 MHz" }, { 0x03, 0x03, "5 MHz" }, { 0x04, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } char *dvbstrTerrConstellation_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "QPSK" }, { 0x01, 0x01, "16-QAM" }, { 0x02, 0x02, "64-QAM" }, { 0x03, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } // -- updated: EN 300 468 v1.7.1 char *dvbstrTerrHierarchy_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "non-hierarchical (native interleaver)" }, { 0x01, 0x01, "alpha=1 (native interleaver)" }, { 0x02, 0x02, "alpha=2 (native interleaver)" }, { 0x03, 0x03, "alpha=4 (native interleaver)" }, { 0x04, 0x04, "non-hierarchical (in-depth interleaver)" }, { 0x05, 0x05, "alpha=1 (in-depth interleaver)" }, { 0x06, 0x06, "alpha=2 (in-depth interleaver)" }, { 0x07, 0x07, "alpha=4 (in-depth interleaver)" }, { 0,0, NULL } }; return findTableID (Table, i); } char *dvbstrTerrCodeRate_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "1/2" }, { 0x01, 0x01, "2/3" }, { 0x02, 0x02, "3/4" }, { 0x03, 0x03, "5/6" }, { 0x04, 0x04, "7/8" }, { 0x05, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } // -- updated: EN 300 468 v1.7.1 char *dvbstrTerrGuardInterval_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "1/32" }, { 0x01, 0x01, "1/16" }, { 0x02, 0x02, "1/8" }, { 0x03, 0x03, "1/4" }, { 0,0, NULL } }; return findTableID (Table, i); } // Update EN 300 468 1.6.1. char *dvbstrTerrTransmissionMode_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "2k mode" }, { 0x01, 0x01, "8k mode" }, { 0x02, 0x02, "4k mode" }, { 0x03, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } // Update EN 300 468 1.6.1. char *dvbstrTerrPriority (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "LP (low priority)" }, { 0x01, 0x01, "HP (high priority) or Non-hierarch." }, { 0,0, NULL } }; return findTableID (Table, i); } // Update EN 300 468 1.6.1. char *dvbstrTerrTimeSlicingIndicator (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "at least one elementary stream uses Time Slicing" }, { 0x01, 0x01, "Time Slicing is not used.)" }, { 0,0, NULL } }; return findTableID (Table, i); } // Update EN 300 468 1.6.1. char *dvbstrTerrMPE_FEC_Indicator (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "at least one elementary stream uses MPE-FEC" }, { 0x01, 0x01, "MPE-FEC is not used.)" }, { 0,0, NULL } }; return findTableID (Table, i); } // EN 300 744 1.5.1 (Annex F.6.2) char *dvbstrTerr_DVBH_service_indication (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "No time slicing, no MPE-FEC" }, { 0x01, 0x01, "No time slicing, at least one elementary stream use MPE-FEC" }, { 0x02, 0x02, "Time slicing, no MPE-FEC" }, { 0x03, 0x03, "Time slicing, at least one elementary stream use MPE-FEC" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Aspect Ratio (e.g. Target Background Grid) -- ISO 13818-2 Table 6.3 */ char *dvbstrAspectRatioInfo_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, " -- " }, { 0x02, 0x02, "3:4" }, { 0x03, 0x03, "9:16" }, { 0x04, 0x04, "1:2.21" }, { 0x05, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Hierarchy Type -- ISO 13818-1 Table 2.6.7 */ char *dvbstrHierarchy_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "ITU-T Rec.H.262 | ISO/IEC 13818-2 Spatial Scalability" }, { 0x02, 0x02, "ITU-T Rec.H.262 | ISO/IEC 13818-2 SNR Scalability" }, { 0x03, 0x03, "ITU-T Rec.H.262 | ISO/IEC 13818-2 Temporal Scalability" }, { 0x04, 0x04, "ITU-T Rec.H.262 | ISO/IEC 13818-2 Data partioning" }, { 0x05, 0x05, "ISO/IEC 13818-3 Extension bitstream" }, { 0x06, 0x06, "ITU-T Rec.H.222.0 | ISO/IEC 13818-1 Private Stream" }, { 0x07, 0x0E, "reserved" }, { 0x0F, 0x0F, "Base layer" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Running Status (SDT) -- ETSI EN 300 468 5.2.3 */ char *dvbstrRunningStatus_FLAG (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "undefined" }, { 0x01, 0x01, "not running" }, { 0x02, 0x02, "starts in a few seconds (e.g. for VCR)" }, { 0x03, 0x03, "pausing" }, { 0x04, 0x04, "running" }, { 0x05, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Data Stream Alignment Type -- ISO 13818-1 2.6.11 */ char *dvbstrDataStreamVIDEOAlignment_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "Slice or video access unit" }, { 0x02, 0x02, "video access unit" }, { 0x03, 0x03, "GOP or SEQ" }, { 0x04, 0x04, "SEQ" }, { 0x05, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } char *dvbstrDataStreamAUDIOAlignment_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "syncword" }, { 0x02, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- VBI Data Service ID -- ETSI EN 300 468 6.2.43 */ char *dvbstrDataService_ID (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "EBU teletext" }, { 0x02, 0x02, "inverted teletext" }, { 0x03, 0x03, "reserved" }, { 0x04, 0x04, "VPS (Video Programming System)" }, { 0x05, 0x05, "WSS (Wide Screen Signalling)" }, { 0x06, 0x06, "CC (Closed Caption)" }, { 0x07, 0x07, "monochrome 4:2:2 samples" }, { 0x08, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Stream Content & Component Type -- ETSI EN 300 468 6.2.7 -- updated: EN 300 468 v1.7.1 */ char *dvbstrStreamContent_Component_TYPE (u_int i) { STR_TABLE Table[] = { // streamComponentID << 8 | ComponentID { 0x0000, 0x00FF, "reserved" }, { 0x0100, 0x0100, "reserved" }, { 0x0101, 0x0101, "MPEG-2 video, 4:3 aspect ratio, 25 Hz" }, { 0x0102, 0x0102, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 25 Hz" }, { 0x0103, 0x0103, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 25 Hz" }, { 0x0104, 0x0104, "MPEG-2 video, >16:9 aspect ratio, 25 Hz" }, { 0x0105, 0x0105, "MPEG-2 video, 4:3 aspect ratio, 30 Hz" }, { 0x0106, 0x0106, "MPEG-2 video, 16:9 aspect ratio with pan vectors, 30 Hz" }, { 0x0107, 0x0107, "MPEG-2 video, 16:9 aspect ratio without pan vectors, 30 Hz" }, { 0x0108, 0x0108, "MPEG-2 video, >16:9 aspect ratio, 30 Hz" }, { 0x0109, 0x0109, "MPEG-2 high definition video, 4:3 aspect ratio, 25 Hz" }, { 0x010A, 0x010A, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 25 Hz" }, { 0x010B, 0x010B, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 25 Hz" }, { 0x010C, 0x010C, "MPEG-2 high definition video, >16:9 aspect ratio, 25 Hz" }, { 0x010D, 0x010D, "MPEG-2 high definition video, 4:3 aspect ratio, 30 Hz" }, { 0x010E, 0x010E, "MPEG-2 high definition video, 16:9 aspect ratio with pan vectors, 30 Hz" }, { 0x010F, 0x010F, "MPEG-2 high definition video, 16:9 aspect ratio without pan vectors, 30 Hz" }, { 0x0110, 0x0110, "MPEG-2 high definition video, >16:9 aspect ratio, 30 Hz" }, { 0x0111, 0x01AF, "reserved" }, { 0x01B0, 0x01FE, "User defined" }, { 0x01FF, 0x01FF, "reserved" }, { 0x0200, 0x0200, "reserved" }, { 0x0201, 0x0201, "MPEG-1 Layer 2 audio, single mono channel" }, { 0x0202, 0x0202, "MPEG-1 Layer 2 audio, dual mono channel" }, { 0x0203, 0x0203, "MPEG-1 Layer 2 audio, stereo (2 channels)" }, { 0x0204, 0x0204, "MPEG-1 Layer 2 audio, multilingual, multi-channel)" }, { 0x0205, 0x0205, "MPEG-1 Layer 2 audio, surround sound" }, { 0x0206, 0x023F, "reserved" }, { 0x0240, 0x0240, "MPEG-1 Layer 2 audio description for visually impaired" }, { 0x0241, 0x0241, "MPEG-1 Layer 2 audio for the hard of hearing" }, { 0x0242, 0x02AF, "reserved" }, { 0x02B0, 0x02FE, "User defined" }, { 0x02FF, 0x02FF, "reserved" }, { 0x0300, 0x0300, "reserved" }, { 0x0301, 0x0301, "EBU Teletext subtitles" }, { 0x0302, 0x0302, "associated EBU Teletext" }, { 0x0303, 0x0303, "VBI data" }, { 0x0304, 0x030F, "reserved" }, { 0x0310, 0x0310, "DVB subtitles (normal) with no monitor aspect ratio critical" }, { 0x0311, 0x0311, "DVB subtitles (normal) for display 4:3 aspect ratio monitor" }, { 0x0312, 0x0312, "DVB subtitles (normal) for display 16:9 aspect ratio monitor" }, { 0x0313, 0x0313, "DVB subtitles (normal) for display 2.21:1 aspect ratio monitor" }, { 0x0314, 0x031F, "reserved" }, { 0x0320, 0x0320, "DVB subtitles (for the hard hearing) with no monitor aspect ratio critical" }, { 0x0321, 0x0321, "DVB subtitles (for the hard hearing) for display 4:3 aspect ratio monitor" }, { 0x0322, 0x0322, "DVB subtitles (for the hard hearing) for display 16:9 aspect ratio monitor" }, { 0x0323, 0x0323, "DVB subtitles (for the hard hearing) for display 2.21:1 aspect ratio monitor" }, { 0x0324, 0x03AF, "reserved" }, { 0x03B0, 0x03FE, "User defined" }, { 0x03FF, 0x03FF, "reserved" }, { 0x0400, 0x047F, "reserved for AC-3 audio modes" }, // $$$ TODO { 0x0480, 0x04FF, "reserved for enhanced AC-3 audio modes" }, // $$$ TODO { 0x0500, 0x0500, "reserved" }, { 0x0501, 0x0501, "H.264/AVC standard definition video, 4:3 aspect ratio, 25 Hz" }, { 0x0502, 0x0502, "reserved" }, { 0x0503, 0x0503, "H.264/AVC standard definition video, 16:9 aspect ratio, 25 Hz" }, { 0x0504, 0x0504, "H.264/AVC standard definition video, >16:9 aspect ratio, 25 Hz" }, { 0x0505, 0x0505, "H.264/AVC standard definition video, 4:3 aspect ratio, 30 Hz" }, { 0x0506, 0x0506, "reserved" }, { 0x0507, 0x0507, "H.264/AVC standard definition video, 16:9 aspect ratio, 30 Hz" }, { 0x0508, 0x0508, "H.264/AVC standard definition video, >16:9 aspect ratio, 30 Hz" }, { 0x0509, 0x050A, "reserved" }, { 0x050B, 0x050B, "H.264/AVC high definition video, 16:9 aspect ratio, 25 Hz" }, { 0x050C, 0x050C, "H.264/AVC high definition video, >16:9 aspect ratio, 25 Hz" }, { 0x050D, 0x050E, "reserved" }, { 0x050F, 0x050F, "H.264/AVC high definition video, 16:9 aspect ratio, 30 Hz" }, { 0x0510, 0x0510, "H.264/AVC high definition video, >16:9 aspect ratio, 30 Hz" }, { 0x0511, 0x05AF, "reserved" }, { 0x05B0, 0x05FE, "user defined" }, { 0x05FF, 0x05FF, "reserved" }, { 0x0600, 0x0600, "reserved" }, { 0x0601, 0x0601, "HE-AAC audio, single mono channel" }, { 0x0602, 0x0602, "reserved" }, { 0x0603, 0x0603, "HE-AAC audio, stereo" }, { 0x0604, 0x0604, "reserved" }, { 0x0605, 0x0605, "HE-AAC audio, surround sound" }, { 0x0606, 0x063F, "reserved" }, { 0x0640, 0x0640, "HE-AAC audio description for the visually impaired" }, { 0x0641, 0x0641, "HE-AAC audio for the hard of hearing" }, { 0x0642, 0x0642, "HE-AAC audio receiver-mixed supplementary audio" }, { 0x0643, 0x0643, "HE-AAC v2 audio, stereo" }, { 0x0644, 0x0644, "HE-AAC v2 audio description for the visually impaired" }, { 0x0645, 0x0645, "HE-AAC v2 audio for the hard of hearing" }, { 0x0646, 0x0646, "HE-AAC v2 audio receiver-mixed supplementary audio" }, { 0x0647, 0x06AF, "reserved" }, { 0x06B0, 0x65FE, "user defined" }, { 0x06FF, 0x65FF, "reserved" }, { 0x0700, 0x77F, "reserved for DTS audio modes" }, // $$$ TODO { 0x0780, 0x7FF, "reserved" }, { 0x0800, 0x0BFF, "reserved" }, { 0x0C00, 0x0FFF, "User defined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Logical Cell Presentation Info -- ETSI EN 300 468 6.2.18 */ char *dvbstrLogCellPresInfo_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "undefined" }, { 0x01, 0x01, "video" }, { 0x02, 0x02, "still picture (INTRA coded)" }, { 0x03, 0x03, "graphics/text" }, { 0x04, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Cell Linkage Info -- ETSI EN 300 468 6.2.18 */ char *dvbstrCellLinkageInfo_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "undefined" }, { 0x01, 0x01, "bouquet related" }, { 0x02, 0x02, "service related" }, { 0x03, 0x03, "other mosaic related" }, { 0x04, 0x04, "event related" }, { 0x05, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Text Charset Types -- ETSI EN 300 468 ANNEX A */ char *dvbstrTextCharset_TYPE(u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "Latin/Cyrilic alphabet" }, { 0x02, 0x02, "Latin/Arabic alphabet" }, { 0x03, 0x03, "Latin/Greek alphabet" }, { 0x04, 0x04, "Latin/Hebrew alphabet" }, { 0x05, 0x05, "Latin alphabet no. 5" }, { 0x06, 0x0F, "reserved" }, { 0x10, 0x10, "ISO/IEC 8859 special table " }, { 0x11, 0x11, "ISO/IEC 10646-1 2Byte pairs Basic Multilingual Plane" }, { 0x12, 0x12, "Korean Charset KSC 5601" }, { 0x13, 0x1F, "reserved" }, { 0x20, 0xFF, "Latin alphabet" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Content Nibble Types (Content descriptor) -- ETSI EN 300 468 6.2.8 */ char *dvbstrContentNibble_TYPE(u_int i) { STR_TABLE Table[] = { // ContenNibble_1 << 8 | ContentNibble_2 // 4 bit | 4 bit { 0x0000, 0x000F, "reserved" }, // Movie/Drama { 0x0100, 0x0100, "movie/drama (general)" }, { 0x0101, 0x0101, "detective/thriller" }, { 0x0102, 0x0102, "adventure/western/war" }, { 0x0103, 0x0103, "science fiction/fantasy/horror" }, { 0x0104, 0x0104, "comedy" }, { 0x0105, 0x0105, "soap/melodram/folkloric" }, { 0x0106, 0x0106, "romance" }, { 0x0107, 0x0107, "serious/classical/religious/historical movie/drama" }, { 0x0108, 0x0108, "adult movie/drama" }, { 0x0109, 0x010E, "reserved" }, { 0x010F, 0x010F, "user defined" }, // News Current Affairs { 0x0200, 0x0200, "news/current affairs (general)" }, { 0x0201, 0x0201, "news/weather report" }, { 0x0202, 0x0202, "news magazine" }, { 0x0203, 0x0203, "documentary" }, { 0x0204, 0x0204, "discussion/interview/debate" }, { 0x0205, 0x020E, "reserved" }, { 0x020F, 0x020F, "user defined" }, // Show Games show { 0x0300, 0x0300, "show/game show (general)" }, { 0x0301, 0x0301, "game show/quiz/contest" }, { 0x0302, 0x0302, "variety show" }, { 0x0303, 0x0303, "talk show" }, { 0x0304, 0x030E, "reserved" }, { 0x030F, 0x030F, "user defined" }, // Sports { 0x0400, 0x0400, "sports (general)" }, { 0x0401, 0x0401, "special events" }, { 0x0402, 0x0402, "sports magazine" }, { 0x0403, 0x0403, "football/soccer" }, { 0x0404, 0x0404, "tennis/squash" }, { 0x0405, 0x0405, "team sports" }, { 0x0406, 0x0406, "athletics" }, { 0x0407, 0x0407, "motor sport" }, { 0x0408, 0x0408, "water sport" }, { 0x0409, 0x0409, "winter sport" }, { 0x040A, 0x040A, "equestrian" }, { 0x040B, 0x040B, "martial sports" }, { 0x040C, 0x040E, "reserved" }, { 0x040F, 0x040F, "user defined" }, // Children/Youth { 0x0500, 0x0500, "childrens's/youth program (general)" }, { 0x0501, 0x0501, "pre-school children's program" }, { 0x0502, 0x0502, "entertainment (6-14 year old)" }, { 0x0503, 0x0503, "entertainment (10-16 year old)" }, { 0x0504, 0x0504, "information/education/school program" }, { 0x0505, 0x0505, "cartoon/puppets" }, { 0x0506, 0x050E, "reserved" }, { 0x050F, 0x050F, "user defined" }, // Music/Ballet/Dance { 0x0600, 0x0600, "music/ballet/dance (general)" }, { 0x0601, 0x0601, "rock/pop" }, { 0x0602, 0x0602, "serious music/classic music" }, { 0x0603, 0x0603, "folk/traditional music" }, { 0x0604, 0x0604, "jazz" }, { 0x0605, 0x0605, "musical/opera" }, { 0x0606, 0x0606, "ballet" }, { 0x0607, 0x060E, "reserved" }, { 0x060F, 0x060F, "user defined" }, // Arts/Culture { 0x0700, 0x0700, "arts/culture (without music, general)" }, { 0x0701, 0x0701, "performing arts" }, { 0x0702, 0x0702, "fine arts" }, { 0x0703, 0x0703, "religion" }, { 0x0704, 0x0704, "popular culture/traditional arts" }, { 0x0705, 0x0705, "literature" }, { 0x0706, 0x0706, "film/cinema" }, { 0x0707, 0x0707, "experimental film/video" }, { 0x0708, 0x0708, "broadcasting/press" }, { 0x0709, 0x0709, "new media" }, { 0x070A, 0x070A, "arts/culture magazine" }, { 0x070B, 0x070B, "fashion" }, { 0x070C, 0x070E, "reserved" }, { 0x070F, 0x070F, "user defined" }, // Social/Political/Economics { 0x0800, 0x0800, "social/political issues/economics (general)" }, { 0x0801, 0x0801, "magazines/reports/documentary" }, { 0x0802, 0x0802, "economics/social advisory" }, { 0x0803, 0x0803, "remarkable people" }, { 0x0804, 0x080E, "reserved" }, { 0x080F, 0x080F, "user defined" }, // Education/Science/... { 0x0900, 0x0900, "education/science/factual topics (general)" }, { 0x0901, 0x0901, "nature/animals/environment" }, { 0x0902, 0x0902, "technology/natural science" }, { 0x0903, 0x0903, "medicine/physiology/psychology" }, { 0x0904, 0x0904, "foreign countries/expeditions" }, { 0x0905, 0x0905, "social/spiritual science" }, { 0x0906, 0x0906, "further education" }, { 0x0907, 0x0907, "languages" }, { 0x0908, 0x090E, "reserved" }, { 0x090F, 0x090F, "user defined" }, // Leisure hobies { 0x0A00, 0x0A00, "leisure hobbies (general)" }, { 0x0A01, 0x0A01, "tourism/travel" }, { 0x0A02, 0x0A02, "handicraft" }, { 0x0A03, 0x0A03, "motoring" }, { 0x0A04, 0x0A04, "fitness & health" }, { 0x0A05, 0x0A05, "cooking" }, { 0x0A06, 0x0A06, "advertisement/shopping" }, { 0x0A07, 0x0A07, "gardening" }, { 0x0A08, 0x0A0E, "reserved" }, { 0x0A0F, 0x0A0F, "user defined" }, { 0x0B00, 0x0B00, "original language" }, { 0x0B01, 0x0B01, "black & white" }, { 0x0B02, 0x0B02, "unpublished" }, { 0x0B03, 0x0B03, "live broadcast" }, { 0x0B04, 0x0B0E, "reserved" }, { 0x0B0F, 0x0B0F, "user defined" }, { 0x0C00, 0x0E0F, "reserved" }, { 0x0F00, 0x0F0F, "user defined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Parental Rating Info -- ETSI EN 300 468 6.2.25 */ char *dvbstrParentalRating_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "undefined" }, { 0x01, 0x01, "minimum age: 4 years" }, { 0x02, 0x02, "minimum age: 5 years" }, { 0x03, 0x03, "minimum age: 6 years" }, { 0x04, 0x04, "minimum age: 7 years" }, { 0x05, 0x05, "minimum age: 8 years" }, { 0x06, 0x06, "minimum age: 9 years" }, { 0x07, 0x07, "minimum age: 10 years" }, { 0x08, 0x08, "minimum age: 11 years" }, { 0x09, 0x09, "minimum age: 12 years" }, { 0x0A, 0x0A, "minimum age: 13 years" }, { 0x0B, 0x0B, "minimum age: 14 years" }, { 0x0C, 0x0C, "minimum age: 15 years" }, { 0x0D, 0x0D, "minimum age: 16 years" }, { 0x0E, 0x0E, "minimum age: 17 years" }, { 0x0F, 0x0F, "minimum age: 18 years" }, { 0x10, 0xFF, "defined by broadcaster" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Delivery System Coding Type -- ETSI EN 300 468 6.2.15 */ char *dvbstrDelivSysCoding_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "undefined" }, { 0x01, 0x01, "satellite" }, { 0x02, 0x02, "cable" }, { 0x03, 0x03, "terrestrial" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Short Smoothing Buffer Size Type -- ETSI EN 300 468 6.2.29 */ char *dvbstrShortSmoothingBufSize_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "1536 Bytes" }, { 0x02, 0x02, "reserved" }, { 0x03, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } char *dvbstrShortSmoothingBufLeakRate_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "0.0009 Mbit/s" }, { 0x02, 0x02, "0.0018 Mbit/s" }, { 0x03, 0x03, "0.0036 Mbit/s" }, { 0x04, 0x04, "0.0072 Mbit/s" }, { 0x05, 0x05, "0.0108 Mbit/s" }, { 0x06, 0x06, "0.0144 Mbit/s" }, { 0x07, 0x07, "0.0216 Mbit/s" }, { 0x08, 0x08, "0.0288 Mbit/s" }, { 0x09, 0x09, "0.075 Mbit/s" }, { 0x0A, 0x0A, "0.5 Mbit/s" }, { 0x0B, 0x0B, "0.5625 Mbit/s" }, { 0x0C, 0x0C, "0.8437 Mbit/s" }, { 0x0D, 0x0D, "1.0 Mbit/s" }, { 0x0E, 0x0E, "1.1250 Mbit/s" }, { 0x0F, 0x0F, "1.5 Mbit/s" }, { 0x10, 0x10, "1.6875 Mbit/s" }, { 0x11, 0x11, "2.0 Mbit/s" }, { 0x12, 0x12, "2.25 Mbit/s" }, { 0x13, 0x13, "2.5 Mbit/s" }, { 0x14, 0x14, "3.0 Mbit/s" }, { 0x15, 0x15, "3.3750 Mbit/s" }, { 0x16, 0x16, "3.5 Mbit/s" }, { 0x17, 0x17, "4.0 Mbit/s" }, { 0x18, 0x18, "4.5 Mbit/s" }, { 0x19, 0x19, "5.0 Mbit/s" }, { 0x1A, 0x1A, "5.5 Mbit/s" }, { 0x1B, 0x1B, "6.0 Mbit/s" }, { 0x1C, 0x1C, "6.5 Mbit/s" }, { 0x1D, 0x1D, "6.75 Mbit/s" }, { 0x1E, 0x1E, "7.0 Mbit/s" }, { 0x1F, 0x1F, "7.5 Mbit/s" }, { 0x20, 0x20, "8.0 Mbit/s" }, { 0x21, 0x21, "9 Mbit/s" }, { 0x22, 0x22, "10 Mbit/s" }, { 0x23, 0x23, "11 Mbit/s" }, { 0x24, 0x24, "12 Mbit/s" }, { 0x25, 0x25, "13 Mbit/s" }, { 0x26, 0x26, "13.5 Mbit/s" }, { 0x27, 0x27, "14.0 Mbit/s" }, { 0x28, 0x28, "15 Mbit/s" }, { 0x29, 0x29, "16 Mbit/s" }, { 0x2A, 0x2A, "17 Mbit/s" }, { 0x2B, 0x2B, "18 Mbit/s" }, { 0x2C, 0x2C, "20 Mbit/s" }, { 0x2D, 0x2D, "22 Mbit/s" }, { 0x2E, 0x2E, "24 Mbit/s" }, { 0x2F, 0x2F, "26 Mbit/s" }, { 0x30, 0x30, "27 Mbit/s" }, { 0x31, 0x31, "28 Mbit/s" }, { 0x32, 0x32, "30 Mbit/s" }, { 0x33, 0x33, "32 Mbit/s" }, { 0x34, 0x34, "34 Mbit/s" }, { 0x35, 0x35, "36 Mbit/s" }, { 0x36, 0x36, "38 Mbit/s" }, { 0x37, 0x37, "40 Mbit/s" }, { 0x38, 0x38, "44 Mbit/s" }, { 0x39, 0x39, "48 Mbit/s" }, { 0x3A, 0x3A, "54 Mbit/s" }, { 0x3B, 0x3B, "72 Mbit/s" }, { 0x3C, 0x3C, "108 Mbit/s" }, { 0x3D, 0x3F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- AC3 Component Type -- ETSI EN 300 468, TS 102 114 */ char *dvbstrDVB_AC3_ComponentType (u_int i) { char *s = "TODO: $$$ - AC3 Component type"; // $$$ TODO return s; } /* -- AUDIO DTS Sample Rate Code -- ETSI EN 300 468, TS 102 114 */ char *dvbstrDVB_DTS_Audio_SampleRateCode (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "invalid" }, { 0x01, 0x01, "8 kHz" }, { 0x02, 0x02, "16 kHz" }, { 0x03, 0x03, "32 kHz" }, { 0x04, 0x04, "64 kHz" }, { 0x05, 0x05, "128 kHz" }, { 0x06, 0x06, "11.025 kHz" }, { 0x07, 0x07, "22.05 kHz" }, { 0x08, 0x08, "44.1 kHz" }, { 0x09, 0x09, "88.02 kHz" }, { 0x0A, 0x0A, "176.4 kHz" }, { 0x0B, 0x0B, "18 kHz" }, { 0x0C, 0x0C, "24 kHz" }, { 0x0D, 0x0D, "48 kHz" }, { 0x0E, 0x0E, "96 kHz" }, { 0x0F, 0x0F, "192 kHz" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- AUDIO DTS Bit Rate -- ETSI EN 300 468, TS 102 114 */ char *dvbstrDVB_DTS_Audio_BitRate (u_int i) { STR_TABLE Table[] = { { 0x05, 0x05, "128 kbps" }, { 0x06, 0x06, "192 kbps" }, { 0x07, 0x07, "224 kbps" }, { 0x08, 0x08, "256 kbps" }, { 0x09, 0x09, "320 kbps" }, { 0x0A, 0x0A, "384 kbps" }, { 0x0B, 0x0B, "448 kbps" }, { 0x0C, 0x0C, "512 kbps" }, { 0x0D, 0x0D, "576 kbps" }, { 0x0E, 0x0E, "640 kbps" }, { 0x0F, 0x0F, "768 kbps" }, { 0x10, 0x10, "960 kbps" }, { 0x11, 0x11, "1024 kbps" }, { 0x12, 0x12, "1152 kbps" }, { 0x13, 0x13, "1280 kbps" }, { 0x14, 0x14, "1344 kbps" }, { 0x15, 0x15, "1408 kbps" }, { 0x16, 0x16, "1411.2 kbps" }, { 0x17, 0x17, "1472 kbps" }, { 0x18, 0x18, "1536 kbps" }, { 0x19, 0x19, "1920 kbps" }, { 0x1A, 0x1A, "2048 kbps" }, { 0x1B, 0x1B, "3072 kbps" }, { 0x1C, 0x1C, "3840 kbps" }, { 0x1D, 0x1D, "open" }, { 0x1E, 0x1E, "variable" }, { 0x1F, 0x1F, "lossless" }, { 0,0, NULL } }; i &= 0x1F; // ignore bit 6 (En 300 468 v1.7.1 Table G.3) return findTableID (Table, i); } /* -- AUDIO DTS Surround Mode -- ETSI EN 300 468, TS 102 114 */ char *dvbstrDVB_DTS_Audio_SurroundMode (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "1 / mono" }, { 0x02, 0x02, "2 / L+R (stereo)" }, { 0x03, 0x03, "2 / (L+R)+(L-R)" }, { 0x04, 0x04, "2 / LT+RT (left and right total)" }, { 0x05, 0x05, "3 / L+R+C" }, { 0x06, 0x06, "3 / L+R+S" }, { 0x07, 0x07, "4 / C+L+R+S" }, { 0x08, 0x08, "4 / L+R+SL+SR" }, { 0x09, 0x09, "5 / C+L+R+SL+SR" }, { 0x0A, 0x0F, "user defined" }, { 0x10, 0x1F, "user defined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- AUDIO DTS Extended Surround Mode -- ETSI EN 300 468, TS 102 114 */ char *dvbstrDVB_DTS_Audio_ExtendedSurroundFlag (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no extended surround" }, { 0x01, 0x01, "matrixed extended surround" }, { 0x02, 0x02, "discrete extended surround" }, { 0x03, 0x03, "undefined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Ancillary Data ID -- ETSI EN 300 468 6.2.1 */ char *dvbstrAncillaryData_ID (u_int i) { // $$$ coded in descriptor return NULL; } /* -- Announcement Type -- ETSI EN 300 468 6.2.2 */ char *dvbstrAnnouncement_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "Emergency alarm" }, { 0x01, 0x01, "Road Traffic Flash" }, { 0x02, 0x02, "Public Transport Flash" }, { 0x03, 0x03, "Warning message" }, { 0x04, 0x04, "News flash" }, { 0x05, 0x05, "Weather flash" }, { 0x06, 0x06, "Event announcement" }, { 0x07, 0x07, "Personal call" }, { 0x08, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } char *dvbstrAnnouncementReference_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "Announcement is broadcast in the usual audio stream of the service" }, { 0x01, 0x01, "Announcement is broadcast in the separate audio stream that is part of the service" }, { 0x02, 0x02, "Announcement is broadcast by means of a different service within the same transport stream" }, { 0x03, 0x03, "Announcement is broadcast by means of a different service within a different transport stream" }, { 0x04, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* ------------------------------------------------------------------------ Transport Stream Stuff ------------------------------------------------------------------------ */ /* -- Transport Stream PID Table ISO 13818-1 2.4.3.2 */ char *dvbstrTSpid_ID (u_int i) { STR_TABLE Table[] = { { 0x0000, 0x0000, "Programm Association Table" }, { 0x0001, 0x0001, "Conditional Access Table" }, { 0x0002, 0x000F, "reserved" }, { 0x0010, 0x1FFE, "NIT, PMT or Elementary PID, etc." }, { 0x1FFF, 0x1FFF, "Null-packet" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Transport Error Indicator [TEI] ISO 13818-1 */ char *dvbstrTS_TEI (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "packet ok" }, { 0x01, 0x01, "Packet has uncorrectable errors" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- PayLoad Unit Start Indicator[PUSI] ISO 13818-1 */ char *dvbstrTS_PUSI (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "Packet data continues" }, { 0x01, 0x01, "Packet data starts" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Scrambling Control Table ISO 13818-1 -- Scrambling Control Table ETSI ETR 289 5.1, ETSI ETR 154 4.1.4.2.3 */ char *dvbstrTS_ScramblingCtrl_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "No scrambling of TS packet payload" }, { 0x01, 0x01, "Reserved for future DVB use" }, { 0x02, 0x02, "TS packet scrambled with Even Key" }, { 0x03, 0x03, "TS packet scrambled with Odd Key" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Adaptation Field Type ISO 13818-1 2.4.3.2 */ char *dvbstrTS_AdaptationField_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "no adaptation_field, payload only" }, { 0x02, 0x02, "adaptation_field only, no payload" }, { 0x03, 0x03, "adaptation_field followed by payload" }, { 0,0, NULL } }; return findTableID (Table, i); } /* ------------------------------------------------------------------------ PES Stuff ------------------------------------------------------------------------ */ /* -- PES Stream_id ISO 13818-1 2.4.3.6 -- PS Stream_id ISO 13818-2 */ char *dvbstrPESstream_ID (u_int i) { STR_TABLE Table[] = { // -- updated 2004-07-26 from ITU-T Rec H.222.0 | ISO/IEC 13818-1:2000/FDAM 1 // -- updated 2004-08-11 from ITU-T Rec H.222.0 AMD3 // -- updated 2005-10-22 ISO13818-2 (code 0x00-0xB8) // // on changes: adapt dmx_pes.c!!! etc. (search for PESstream_ID) // streamID 00-B8 (ISO 13818-2) { 0x00, 0x00, "picture_start_code"}, { 0x01, 0xAF, "slice_start_code"}, { 0xB0, 0xB1, "reserved"}, { 0xB2, 0xB2, "user_data_start_code"}, { 0xB3, 0xB3, "sequence_header_code"}, { 0xB4, 0xB4, "sequence_error_code"}, { 0xB5, 0xB5, "extension_start_code"}, { 0xB6, 0xB6, "reserved"}, { 0xB7, 0xB7, "sequence_end_code"}, { 0xB8, 0xB8, "group_start_code"}, // special PS_stream_IDs (these are not PES stream IDs) { 0xB9, 0xB9, "MPEG_program_stream_end (PS)" }, { 0xBA, 0xBA, "MPEG_pack_start (PS)" }, { 0xBB, 0xBB, "MPEG_system_header_start (PS)" }, // PES_stream_IDs { 0xBC, 0xBC, "program_stream_map" }, { 0xBD, 0xBD, "private_stream_1" }, { 0xBE, 0xBE, "padding_stream" }, { 0xBF, 0xBF, "private_stream_2" }, { 0xC0, 0xDF, "ISO/IEC 13818-3 or ISO/IEC 11172-3 audio stream" }, { 0xE0, 0xEF, "ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 video stream" }, { 0xF0, 0xF0, "ECM_stream" }, { 0xF1, 0xF1, "EMM_stream" }, { 0xF2, 0xF2, "ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Annex-A or ISO/IEC 13818-6_DSMCC stream" }, { 0xF3, 0xF3, "ISO/IEC 13522 stream" }, { 0xF4, 0xF4, "ITU-T Rec. H.222.1 type A" }, { 0xF5, 0xF5, "ITU-T Rec. H.222.1 type B" }, { 0xF6, 0xF6, "ITU-T Rec. H.222.1 type C" }, { 0xF7, 0xF7, "ITU-T Rec. H.222.1 type D" }, { 0xF8, 0xF8, "ITU-T Rec. H.222.1 type E" }, { 0xF9, 0xF9, "ancillary_stream" }, { 0xFA, 0xFA, "ISO/IEC14496-1_SL-packetized_stream" }, { 0xFB, 0xFB, "ISO/IEC14496-1_FlexMux_stream" }, { 0xFC, 0xFC, "metadata stream" }, { 0xFD, 0xFD, "extended_stream_id" }, { 0xFE, 0xFE, "reserved data stream" }, { 0xFF, 0xFF, "program_stream_directory" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- PES Stream_id H.222.0 AMD2 -- 2004-08-11 ITU-T Rec H.222.0 AMD2 */ char *dvbstrPESstream_ID_Extension (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "IPMP Control Information stream" }, { 0x01, 0x01, "IPMP stream" }, { 0x02, 0x7F, "reserved_data_stream" }, { 0x80, 0xFF, "private_stream" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- PES Scrambling CTRL ISO 13818-1 2.4.3.7 -- --> ETR 289 5.1 */ char *dvbstrPESscrambling_ctrl_TYPE (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "not scrambled" }, { 0x01, 0x01, "Reserved for future DVB use" }, { 0x02, 0x02, "PES packet scrambled with Even Key" }, { 0x03, 0x03, "PES packet scrambled with Odd Key" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Private Data Specifier Table (from dvb.org) -- ETR 162 */ char *dvbstrPrivateDataSpecifier_ID (u_int i) { STR_TABLE Table[] = { // { Private Data Value, Private Data Value // Organisation" }, // -- updated 2003-10-16 { 0x00000000, 0x00000000, "Reserved" }, { 0x00000001, 0x00000001, "SES" }, { 0x00000002, 0x00000002, "BskyB 1" }, { 0x00000003, 0x00000003, "BskyB 2" }, { 0x00000004, 0x00000004, "BskyB 3" }, { 0x00000005, 0x00000005, "ARD, ZDF, ORF" }, { 0x00000006, 0x00000006, "Nokia Multimedia Network Terminals" }, { 0x00000007, 0x00000007, "AT Entertainment Ltd." }, { 0x00000008, 0x00000008, "TV Cabo Portugal  " }, { 0x00000009, 0x0000000D, "Nagravision SA // Kudelski " }, { 0x0000000E, 0x0000000E, "Valvision SA  " }, { 0x0000000F, 0x0000000F, "Quiero Televisión  " }, { 0x00000010, 0x00000010, "La Télévision Par Satellite (TPS)" }, { 0x00000011, 0x00000011, "Echostar Communications" }, { 0x00000012, 0x00000012, "Telia AB" }, { 0x00000013, 0x00000013, "Viasat  " }, { 0x00000014, 0x00000014, "Senda (Swedish Terrestrial TV )" }, { 0x00000015, 0x00000015, "MediaKabel " }, { 0x00000016, 0x00000016, "Casema  " }, { 0x00000017, 0x00000017, "Humax Electronics Co. Ltd ." }, { 0x00000018, 0x00000018, "@Sky  " }, { 0x00000019, 0x00000019, "Singapore Digital Terrestrial Television  " }, { 0x0000001A, 0x0000001A, "Télédiffusion de France (TDF)" }, { 0x0000001B, 0x0000001B, "Intellibyte Inc." }, { 0x0000001C, 0x0000001C, "Digital Theater Systems Ltd" }, { 0x0000001D, 0x0000001D, "Finlux Ltd." }, { 0x0000001E, 0x0000001E, "Sagem SA" }, { 0x00000020, 0x00000023, "Lyonnaise Cable" }, { 0x00000025, 0x00000025, "MTV Europe " }, { 0x00000026, 0x00000026, "Pansonic  " }, { 0x00000027, 0x00000027, "Mentor Data System, Inc ." }, { 0x00000028, 0x00000028, "EACEM  " }, { 0x00000029, 0x00000029, "NorDig  " }, { 0x0000002A, 0x0000002A, "Intelsis Sistemas Inteligentes S.A ." }, { 0x0000002D, 0x0000002D, "Alpha Digital Synthesis S.A." }, { 0x0000002F, 0x0000002F, "Conax A.S." }, { 0x00000030, 0x00000030, "Telenor" }, { 0x00000031, 0x00000031, "TeleDenmark " }, { 0x00000035, 0x00000035, "Europe Online Networks S.A ." }, { 0x00000038, 0x00000038, "OTE  " }, { 0x00000039, 0x00000039, "Telewizja Polsat  " }, { 0x000000A0, 0x000000A0, "Sentech  " }, { 0x000000A1, 0x000000A1, "TechniSat Digital GmbH  " }, { 0x000000BE, 0x000000BE, "BetaTechnik" }, { 0x000000C0, 0x000000C0, "Canal+" }, { 0x000000D0, 0x000000D0, "Dolby Laboratories Inc." }, { 0x000000E0, 0x000000E0, "ExpressVu Inc." }, { 0x000000F0, 0x000000F0, "France Telecom, CNES and DGA (STENTOR)" }, { 0x00000100, 0x00000100, "OpenTV" }, { 0x00000150, 0x00000150, "Loewe Opta GmbH " }, { 0x00000600, 0x00000601, "UPC 1  " }, { 0x00000ACE, 0x00000ACE, "Ortikon Interactive Oy" }, { 0x00001000, 0x00001000, "La Télévision Par Satellite (TPS )" }, { 0x000022D4, 0x000022D4, "Spanish Broadcasting Regulator " }, { 0x000022F1, 0x000022F1, "Swedish Broadcasting Regulator " }, { 0x0000233A, 0x0000233A, "Independent Television Commission " }, { 0x00003200, 0x0000320f, "Australian Terrestrial Television Networks" }, { 0x00006000, 0x00006000, "News Datacom" }, { 0x00006001, 0x00006006, "NDC " }, { 0x00362275, 0x00362275, "Irdeto" }, { 0x004E544C, 0x004E544C, "NTL" }, { 0x00532D41, 0x00532D41, "Scientific Atlanta" }, { 0x00600000, 0x00600000, "Rhône Vision Cable" }, { 0x44414E59, 0x44414E59, "News Datacom (IL) 1" }, { 0x46524549, 0x46524549, "News Datacom (IL) 1" }, { 0x46545600, 0x46545620, "FreeTV " }, { 0x4A4F4A4F, 0x4A4F4A4F, "MSG MediaServices GmbH  " }, { 0x4F545600, 0x4F5456ff, "OpenTV " }, { 0x50484900, 0x504849ff, "Philips DVS" }, { 0x53415053, 0x53415053, "Scientific Atlanta" }, { 0x5347444E, 0x5347444E, "StarGuide Digital Networks " }, { 0x56444700, 0x56444700, "Vía Digital" }, { 0xBBBBBBBB, 0xBBBBBBBB, "Bertelsmann Broadband Group  " }, { 0xECCA0001, 0xECCA0001, "ECCA (European Cable Communications Association )" }, { 0xFCFCFCFC, 0xFCFCFCFC, "France Telecom" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Country Code Table (from dvb.org) */ char *dvbstrCountryCode_ID (u_int i) { STR_TABLE Table[] = { { 0x0004, 0x0004, "Afghanistan" }, { 0x0008, 0x0008, "Albania" }, { 0x000a, 0x000a, "Antarctica (the territory South of 60 deg S)" }, { 0x000c, 0x000c, "Algeria" }, { 0x0010, 0x0010, "American Samoa" }, { 0x0014, 0x0014, "Andorra" }, { 0x0018, 0x0018, "Angola" }, { 0x001c, 0x001c, "Antigua and Barbuda" }, { 0x001f, 0x001f, "Azerbaijan" }, { 0x0020, 0x0020, "Argentina" }, { 0x0024, 0x0024, "Australia" }, { 0x0028, 0x0028, "Austria" }, { 0x002c, 0x002c, "Bahamas" }, { 0x0030, 0x0030, "Bahrain" }, { 0x0032, 0x0032, "Bangladesh" }, { 0x0033, 0x0033, "Armenia" }, { 0x0034, 0x0034, "Barbados" }, { 0x0038, 0x0038, "Belgium" }, { 0x003c, 0x003c, "Bermuda" }, { 0x0040, 0x0040, "Bhutan" }, { 0x0044, 0x0044, "Bolivia" }, { 0x0046, 0x0046, "Bosnia and Herzegowina [sic]" }, { 0x0048, 0x0048, "Botswana" }, { 0x004a, 0x004a, "Bouvet Island (Bouvetoya)" }, { 0x004c, 0x004c, "Brazil" }, { 0x0054, 0x0054, "Belize" }, { 0x0056, 0x0056, "British Indian Ocean Territory (Chagos Archipelago)" }, { 0x005a, 0x005a, "solomon Islands (was British Solomon Islands)" }, { 0x005c, 0x005c, "British Virgin Islands" }, { 0x0060, 0x0060, "Brunei Darussalam" }, { 0x0064, 0x0064, "Bulgaria" }, { 0x0068, 0x0068, "Myanmar (was Burma)" }, { 0x006c, 0x006c, "Burundi" }, { 0x0070, 0x0070, "Belarus" }, { 0x0074, 0x0074, "Cambodia" }, { 0x0078, 0x0078, "Cameroon" }, { 0x007c, 0x007c, "Canada" }, { 0x0084, 0x0084, "Cape Verde" }, { 0x0088, 0x0088, "Cayman Islands" }, { 0x008c, 0x008c, "Central African Republic" }, { 0x0090, 0x0090, "sri Lanka" }, { 0x0094, 0x0094, "Chad" }, { 0x0098, 0x0098, "Chile" }, { 0x009c, 0x009c, "China" }, { 0x009e, 0x009e, "Taiwan" }, { 0x00a2, 0x00a2, "Christmas Island" }, { 0x00a6, 0x00a6, "Cocos (Keeling) Islands" }, { 0x00aa, 0x00aa, "Colombia" }, { 0x00ae, 0x00ae, "Comoros" }, { 0x00af, 0x00af, "Mayotte" }, { 0x00b2, 0x00b2, "Congo" }, { 0x00b4, 0x00b4, "Congo (was Zaire)" }, { 0x00b8, 0x00b8, "Cook Islands" }, { 0x00bc, 0x00bc, "Costa Rica" }, { 0x00bf, 0x00bf, "Hrvatska (Croatia)" }, { 0x00c0, 0x00c0, "Cuba" }, { 0x00c4, 0x00c4, "Cyprus" }, { 0x00cb, 0x00cb, "Czech Republic" }, { 0x00cc, 0x00cc, "Benin (was Dahomey)" }, { 0x00d0, 0x00d0, "Denmark" }, { 0x00d4, 0x00d4, "Dominica" }, { 0x00d6, 0x00d6, "Dominican Republic" }, { 0x00da, 0x00da, "Ecuador" }, { 0x00de, 0x00de, "El Salvador" }, { 0x00e2, 0x00e2, "Equatorial Guinea" }, { 0x00e7, 0x00e7, "Ethiopia" }, { 0x00e8, 0x00e8, "Eritrea" }, { 0x00e9, 0x00e9, "Estonia" }, { 0x00ea, 0x00ea, "Faeroe Islands" }, { 0x00ee, 0x00ee, "Falkland Islands (Malvinas)" }, { 0x00ef, 0x00ef, "south Georgia and the South Sandwich Islands" }, { 0x00f2, 0x00f2, "Fiji" }, { 0x00f6, 0x00f6, "Finland" }, { 0x00fa, 0x00fa, "France" }, { 0x00fe, 0x00fe, "French Guiana" }, { 0x0102, 0x0102, "French Polynesia" }, { 0x0104, 0x0104, "French Southern Territories" }, { 0x0106, 0x0106, "Djibouti" }, { 0x010a, 0x010a, "Gabon" }, { 0x010c, 0x010c, "Georgia" }, { 0x010e, 0x010e, "Gambia" }, { 0x0113, 0x0113, "Palestinian Territory" }, { 0x0114, 0x0114, "Germany" }, { 0x0120, 0x0120, "Ghana" }, { 0x0124, 0x0124, "Gibraltar" }, { 0x0128, 0x0128, "Kiribati (was Gilbert Islands)" }, { 0x012c, 0x012c, "Greece" }, { 0x0130, 0x0130, "Greenland" }, { 0x0134, 0x0134, "Grenada" }, { 0x0138, 0x0138, "Guadaloupe" }, { 0x013c, 0x013c, "Guam" }, { 0x0140, 0x0140, "Guatemala" }, { 0x0144, 0x0144, "Guinea" }, { 0x0148, 0x0148, "Guyana" }, { 0x014c, 0x014c, "Haiti" }, { 0x014e, 0x014e, "Heard and McDonald Islands" }, { 0x0150, 0x0150, "Holy See (Vatican City State)" }, { 0x0154, 0x0154, "Honduras" }, { 0x0158, 0x0158, "Hong Kong" }, { 0x015c, 0x015c, "Hungary" }, { 0x0160, 0x0160, "Iceland" }, { 0x0164, 0x0164, "India" }, { 0x0168, 0x0168, "Indonesia" }, { 0x016c, 0x016c, "Iran" }, { 0x0170, 0x0170, "Iraq" }, { 0x0174, 0x0174, "Ireland" }, { 0x0178, 0x0178, "Israel" }, { 0x017c, 0x017c, "Italy" }, { 0x0180, 0x0180, "Ivory Coast" }, { 0x0184, 0x0184, "Jamaica" }, { 0x0188, 0x0188, "Japan" }, { 0x018e, 0x018e, "Kazakhstan" }, { 0x0190, 0x0190, "Jordan" }, { 0x0194, 0x0194, "Kenya" }, { 0x0198, 0x0198, "Korea" }, { 0x019a, 0x019a, "Korea" }, { 0x019e, 0x019e, "Kuwait" }, { 0x01a1, 0x01a1, "Kyrgyz Republic" }, { 0x01a2, 0x01a2, "Lao People´s Democratic Republic" }, { 0x01a6, 0x01a6, "Lebanon" }, { 0x01aa, 0x01aa, "Lesotho" }, { 0x01ac, 0x01ac, "Latvia" }, { 0x01ae, 0x01ae, "Liberia" }, { 0x01b2, 0x01b2, "Libyan Arab Jamahiriya" }, { 0x01b6, 0x01b6, "Liechtenstein" }, { 0x01b8, 0x01b8, "Lithuania" }, { 0x01ba, 0x01ba, "Luxembourg" }, { 0x01be, 0x01be, "Macau" }, { 0x01c2, 0x01c2, "Madagascar" }, { 0x01c6, 0x01c6, "Malawi" }, { 0x01ca, 0x01ca, "Malaysia" }, { 0x01ce, 0x01ce, "Maldives" }, { 0x01d2, 0x01d2, "Mali" }, { 0x01d6, 0x01d6, "Malta" }, { 0x01da, 0x01da, "Martinique" }, { 0x01de, 0x01de, "Mauritania" }, { 0x01e0, 0x01e0, "Mauritius" }, { 0x01e4, 0x01e4, "Mexico" }, { 0x01ec, 0x01ec, "Monaco" }, { 0x01f0, 0x01f0, "Mongolia" }, { 0x01f2, 0x01f2, "Moldova" }, { 0x01f4, 0x01f4, "Montserrat" }, { 0x01f8, 0x01f8, "Morocco" }, { 0x01fc, 0x01fc, "Mozambique" }, { 0x0200, 0x0200, "Oman (was Muscat and Oman)" }, { 0x0204, 0x0204, "Namibia" }, { 0x0208, 0x0208, "Nauru" }, { 0x020c, 0x020c, "Nepal" }, { 0x0210, 0x0210, "Netherlands" }, { 0x0212, 0x0212, "Netherlands Antilles" }, { 0x0215, 0x0215, "Aruba" }, { 0x021c, 0x021c, "New Caledonia" }, { 0x0224, 0x0224, "Vanuatu (was New Hebrides)" }, { 0x022a, 0x022a, "New Zealand" }, { 0x022e, 0x022e, "Nicaragua" }, { 0x0232, 0x0232, "Niger" }, { 0x0236, 0x0236, "Nigeria" }, { 0x023a, 0x023a, "Niue" }, { 0x023e, 0x023e, "Norfolk Island" }, { 0x0242, 0x0242, "Norway" }, { 0x0244, 0x0244, "Northern Mariana Islands" }, { 0x0245, 0x0245, "United States Minor Outlying Islands" }, { 0x0247, 0x0247, "Micronesia" }, { 0x0248, 0x0248, "Marshall Islands" }, { 0x0249, 0x0249, "Palau" }, { 0x024a, 0x024a, "Pakistan" }, { 0x024f, 0x024f, "Panama" }, { 0x0256, 0x0256, "Papua New Guinea" }, { 0x0258, 0x0258, "Paraguay" }, { 0x025c, 0x025c, "Peru" }, { 0x0260, 0x0260, "Philippines" }, { 0x0264, 0x0264, "Pitcairn Island" }, { 0x0268, 0x0268, "Poland" }, { 0x026c, 0x026c, "Portugal" }, { 0x0270, 0x0270, "Guinea-Bissau" }, { 0x0272, 0x0272, "East Timor (was Portuguese Timor)" }, { 0x0276, 0x0276, "Puerto Rico" }, { 0x027a, 0x027a, "Qatar" }, { 0x027e, 0x027e, "Reunion" }, { 0x0282, 0x0282, "Romania" }, { 0x0283, 0x0283, "Russian Federation" }, { 0x0286, 0x0286, "Rwanda" }, { 0x028e, 0x028e, "st. Helena" }, { 0x0293, 0x0293, "saint Kitts and Nevis" }, { 0x0294, 0x0294, "Anguilla" }, { 0x0296, 0x0296, "saint Lucia" }, { 0x029a, 0x029a, "st. Pierre and Miquelon" }, { 0x029e, 0x029e, "saint Vincent and the Grenadines" }, { 0x02a2, 0x02a2, "san Marino" }, { 0x02a6, 0x02a6, "sao Tome and Principe" }, { 0x02aa, 0x02aa, "saudi Arabia" }, { 0x02ae, 0x02ae, "senegal" }, { 0x02b2, 0x02b2, "seychelles" }, { 0x02b6, 0x02b6, "sierra Leone" }, { 0x02be, 0x02be, "singapore" }, { 0x02bf, 0x02bf, "slovakia (Slovak Republic)" }, { 0x02c0, 0x02c0, "Viet Nam" }, { 0x02c1, 0x02c1, "slovenia" }, { 0x02c2, 0x02c2, "somalia" }, { 0x02c6, 0x02c6, "south Africa" }, { 0x02cc, 0x02cc, "Zimbabwe (was Southern Rhodesia)" }, { 0x02d4, 0x02d4, "spain" }, { 0x02dc, 0x02dc, "Western Sahara (was Spanish Sahara)" }, { 0x02e0, 0x02e0, "sudan" }, { 0x02e4, 0x02e4, "suriname" }, { 0x02e8, 0x02e8, "svalbard & Jan Mayen Islands" }, { 0x02ec, 0x02ec, "swaziland" }, { 0x02f0, 0x02f0, "sweden" }, { 0x02f4, 0x02f4, "switzerland" }, { 0x02f8, 0x02f8, "syrian Arab Republic" }, { 0x02fa, 0x02fa, "Tajikistan" }, { 0x02fc, 0x02fc, "Thailand" }, { 0x0300, 0x0300, "Togo" }, { 0x0304, 0x0304, "Tokelau (Tokelau Islands)" }, { 0x0308, 0x0308, "Tonga" }, { 0x030c, 0x030c, "Trinidad and Tobago" }, { 0x0310, 0x0310, "United Arab Emirates (was Trucial States)" }, { 0x0314, 0x0314, "Tunisia" }, { 0x0318, 0x0318, "Turkey" }, { 0x031b, 0x031b, "Turkmenistan" }, { 0x031c, 0x031c, "Turks and Caicos Islands" }, { 0x031e, 0x031e, "Tuvalu (was part of Gilbert & Ellice Islands)" }, { 0x0320, 0x0320, "Uganda" }, { 0x0324, 0x0324, "Ukraine" }, { 0x0327, 0x0327, "Macedonia" }, { 0x0332, 0x0332, "Egypt" }, { 0x033a, 0x033a, "United Kingdom of Great Britain & N. Ireland" }, { 0x0342, 0x0342, "Tanzania" }, { 0x0348, 0x0348, "United States of America" }, { 0x0352, 0x0352, "US Virgin Islands" }, { 0x0356, 0x0356, "Burkina Faso (was Upper Volta)" }, { 0x035a, 0x035a, "Uruguay" }, { 0x035c, 0x035c, "Uzbekistan" }, { 0x035e, 0x035e, "Venezuela" }, { 0x036c, 0x036c, "Wallis and Futuna Islands" }, { 0x0372, 0x0372, "samoa" }, { 0x0377, 0x0377, "Yemen" }, { 0x037b, 0x037b, "ex Yugoslavia" }, { 0x037e, 0x037e, "Zambia" }, { 0x0384, 0x0384, "Scandinavia" }, { 0x0385, 0x0385, "North America (Canada, Carribbean,Mexico,United States of America)" }, { 0x0386, 0x0386, "All countries" }, { 0x0387, 0x0387, "South America" }, { 0x0388, 0x0388, "Latin America" }, { 0x0389, 0x0389, "Europe" }, { 0x0389, 0x0389, "Middle East" }, { 0x038a, 0x038a, "North Africa" }, { 0x038b, 0x038b, "Oceania (Australia, New Zealand, Melanesia, Micronesia, Polynesia)" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Bouquet ID Table (from dvb.org) -- ETR 162 */ char *dvbstrBouquetTable_ID (u_int i) { STR_TABLE Table[] = { // -- updated 2003-10-16 // -- { Bouquet ID, Bouquet ID, "Name | Country Code | Operator" }, { 0x0000, 0x0000, "Reserved | 902 | Reserved" }, { 0x002F, 0x002F, "TVNZ Digital | 902 | TNVZ  " }, { 0x0030, 0x0030, "TT Data Services | 902 | TechnoTrend AG" }, { 0x0031, 0x0031, "Balon | 100 | Interactive Technologies PLC" }, { 0x006E, 0x006E, "Europe Online Networks (EON) | 902 | Europe Online Networks S.A  " }, { 0x006F, 0x006F, "WRN D-Radiosat | 902 | WRN (World Radio Network )" }, { 0x0070, 0x007f, "Eutelsat Satellite System n° 1 | 902 | EUTELSAT - European Telecommunications Satellite Organization " }, { 0x0080, 0x0080, "Digital Platform DIGITURK1 | 902 | Digital Platform  " }, { 0x0081, 0x0081, "TV Polsat | 902 | Telewizja Polsat  " }, { 0x0082, 0x0082, "TV Cabo Portugal | 902 | TV Cabo Portugal  " }, { 0x0083, 0x0083, "Dijital Yayýn Pazarlama ve Ticaret A.Þ. | 902 | Dijital Yayýn Pazarlama ve Ticaret A.Þ ." }, { 0x0084, 0x0084, "Digital Platform DIGITURK2 | 902 | DIGITURK" }, { 0x0130, 0x013f, "Eutelsat Service Guide | 902 | Eutelsat" }, { 0x061F, 0x061F, "BellSouth Entertainment | 902 | BellSouth Entertainment, Atlanta, GA, USA" }, { 0x1000, 0x101f, "BskyB | 902 | British Sky Broadcasting" }, { 0x1020, 0x103f, "DISH Network | 902 | Echostar Communications" }, { 0x1040, 0x107f, "ARD | 902 | ARD" }, { 0x1080, 0x109f, "ZDF | 902 | ZDF" }, { 0x10A0, 0x10bf, "ORF | 902 | ORF" }, { 0x10C0, 0x10C0, "NTV+ | 902 | NTV +" }, { 0x10C1, 0x10C1, "RTL Television | 902 | RTL Television " }, { 0x10D1, 0x10D7, "Primacom | 276 | Primacom A.G ." }, { 0x10D8, 0x10Db, "Viasat | 900 | Viasat  " }, { 0x10DC, 0x10Df, "Teracom | 900 | Teracom AB  " }, { 0x1500, 0x150f, "ExpressVu | 902 | ExpressVu Inc." }, { 0x2000, 0x2000, "Kaleidascope Multichoice | 902 | Filmnet" }, { 0x2001, 0x2001, "Osaka Yusen | 902 | StarGuide Networks " }, { 0x2010, 0x2013, "WIZJATV | 902 | AT Entertainment Ltd." }, { 0x2100, 0x212f, "TSA | 902 | Telefónica Servicios Audiovisuales" }, { 0x2130, 0x2130, "Galaxis | 905 | Galaxis Technology AG  " }, { 0x3000, 0x300f, "TPS | 902 | La Télévision Par Satellite" }, { 0x3010, 0x3015, "Sentech | 902 | Sentech" }, { 0x3100, 0x3100, "STENTOR | 902 | France Telecom, CNES and DGA" }, { 0x3200, 0x320f, "Australian Digital Television | 36 | Australian Terrestrial Television Networks" }, { 0x322B, 0x322B, "Telstra Saturn Satellite | 902 | TelstraSaturn Limited  " }, { 0x332B, 0x332B, "Telstra Saturn Cable | 907 | TelstraSaturn Limited  " }, { 0x3622, 0x3622, "Irdeto Bouquet of Download data Services | 902 | Irdeto" }, { 0x3623, 0x3623, "To be defined (see Wim Mooij) | 902 | Mindport " }, { 0x3800, 0x3800, "OTE | 902 | OTE  " }, { 0x4000, 0x4000, "HPT | 902 | HPT" }, { 0x4001, 0x4001, "visAvision | 905 | European Telecommunications Satellite Organization" }, { 0x4010, 0x4010, "HRT | 902 | HRT" }, { 0x4040, 0x407f, "OpenTV | 902 | OpenTV Inc ." }, { 0x5000, 0x501f, "BetaTechnik | 902 | BetaTechnik" }, { 0x6000, 0x60bf, "NDC | 902 | News Datacom" }, { 0x60C0, 0x60ff, "NDS | 0 | NDS" }, { 0x6180, 0x61ff, "Information Network Centre (INC) | 156 | Information Network Centre (China)" }, { 0x6600, 0x6601, "UPC | 902 | UPC  " }, { 0x7000, 0x700f, "MediaServices | 902 | MSG MediaServices GmbH  " }, { 0xBBB1, 0xBBBb, "BBG | 902 | Bertelsmann Broadband Group" }, { 0xBBBC, 0xBBBC, "SISAL | 905 | SISAL  " }, { 0xC000, 0xC01f, "Canal+ | 902 | Canal +" }, { 0xFC00, 0xFCff, "France Telecom | 902 | France Telecom" }, { 0xFD08, 0xFD08, "Xtra Music | 902 | Xtra Music " }, { 0xFFFF, 0xFFFF, "?????? whatever this is..." }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Trick Mode Control -- ISO 13818-1 */ char *dvbstrPESTrickModeControl (u_int i) { STR_TABLE Table[] = { { 0x0, 0x0, "fast forward" }, { 0x1, 0x1, "slow motion" }, { 0x2, 0x2, "freeze frame" }, { 0x3, 0x3, "fast reverse" }, { 0x4, 0x4, "slow reverse" }, { 0x5, 0x7, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Data Identifier -- ETR 162 and EN 300 472 and EN 301 775). */ char *dvbstrPESDataIdentifier (u_int i) { STR_TABLE Table[] = { { 0x00, 0x0F, "reserved" }, { 0x10, 0x1F, "EBU data EN 300 472 (teletext)" }, { 0x20, 0x20, "DVB subtitling EN 300 743" }, { 0x21, 0x21, "DVB synchronous data stream" }, { 0x22, 0x22, "DVB synchronized data stream" }, { 0x23, 0x7F, "reserved" }, { 0x80, 0x98, "user defined" }, { 0x99, 0x9B, "EBU teletext/VPS/WSS/closed caption/VBI sample data" }, // EN 301 775 { 0x9C, 0xFF, "user defined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- dvbstrPES_EBUDataUnitID (Teletext, VPS, WSS, etc.) -- EN 300 472 and EN 301 775. */ // $$$ TODO same as data_service_id ?? (EN 300 468) char *dvbstrPES_EBUDataUnitID (u_int i) { STR_TABLE Table[] = { { 0x00, 0x01, "reserved" }, { 0x02, 0x02, "EBU Teletext non-subtitle data" }, { 0x03, 0x03, "EBU Teletext subtitle data" }, { 0x04, 0x7F, "reserved" }, { 0x80, 0xBE, "user defined" }, { 0xC0, 0xC0, "inverted teletext" }, { 0xC1, 0xC2, "reserved" }, { 0xC3, 0xC3, "VPS (Video Programming System)" }, { 0xC4, 0xC4, "WSS (Wide Screen Signalling)" }, { 0xC5, 0xC5, "CC (Closed Caption)" }, { 0xC6, 0xC6, "monochrome 4:2:2 samples" }, { 0xC7, 0xFE, "reserved" }, { 0xFF, 0xFF, "data_unit for stuffing" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- dvbstrTELETEXT_framingcode -- EN 300 472 and EN 301 775. */ char *dvbstrTELETEXT_framingcode (u_int i) { STR_TABLE Table[] = { { 0xE4, 0xE4, "EBU Teletext" }, { 0x1B, 0x1B, "inverted EBU Teletext" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- dvbstrTELETEXT_packetnr -- EN 300 472 and EN 301 775. */ char *dvbstrTELETEXT_packetnr (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "page header" }, { 0x01, 0x19, "normal packet intended for direct display" }, { 0x1A, 0x1F, "non-displayable packet (see: EN 300 706)" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- dvbstrTELETEXT_lang_code -- EN 300 472 and EN 301 775. */ char *dvbstrTELETEXT_lang_code (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "English (?)" }, { 0x01, 0x01, "French (?)" }, { 0x02, 0x02, "Swedish/Finnish/Hungarian (?)" }, { 0x03, 0x03, "Czech/Slovak/Turkish (?)" }, { 0x04, 0x04, "German (?)" }, { 0x05, 0x05, "Portuguese/Spanish (?)" }, { 0x06, 0x06, "Italian (?)" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- dvbstrVPS_pcs_audio -- EN 300 231 */ char *dvbstrVPS_pcs_audio (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "unknown" }, { 0x01, 0x01, "mono" }, { 0x02, 0x02, "stereo" }, { 0x03, 0x03, "dual channel" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- dvbstrVPS_pcs_audio -- EN 300 231 */ char *dvbstrVPS_cni_countrycode (u_int i) { int b_1_4; int b_5_8; char *s = ""; // $$$ TODO check if b_1_4 start really at "1" char *t[6][16] = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F /*0*/ { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }, /*1*/ { "", "", "DZ", "AD", "IL", "IT", "BE", "BY", "AZR","AL", "AT", "HU", "MT", "DE", "CNR","EG" }, /*2*/ { "", "GR", "CY", "SM", "CH", "JO", "FI", "LU", "BG", "DK", "GI", "IQ", "GB", "LY", "RO", "FR" }, /*3*/ { "", "MA", "CZ", "PL", "VA", "", "SY", "TN", "MA", "LI", "IS", "MC", "", "", "ES", "NO" }, /*4*/ { "", "", "IE", "TR", "", "", "YU", "UA", "NL", "", "LB", "", "", "", "SE", "" }, /*5*/ { "", "", "", "", "", "", "", "RU", "PT", "", "", "", "", "", "", "" } }; b_1_4 = i & 0x0F; b_5_8 = (i >> 4) & 0x0F; if (b_1_4 < 5) { s = t[b_1_4][b_5_8]; } return s; } /* -- VPS PTY Content Nibble Types -- ETSI EN 300 231 */ char *dvbstrVPS_pty (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no information" }, { 0x00, 0x0F, "undefined content" }, { 0x10, 0x7F, "see: ETSI EN 300 231" }, // $$$ TODO { 0x80, 0xFE, "provider specific" }, { 0xFF, 0xFF, "PTY not used" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- VPS Network/Program Provider -- ETSI EN 300 231 */ char *dvbstrVPS_npp (u_int i) { STR_TABLE Table[] = { { 0x00, 0xFF, "see: ETSI TR 101 231" }, // $$$ TODO { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS Aspect Ratio b0..b3 -- Warning! Bitvalues are reversed due to lsb...msb issue -- values includes parity bit! -- see: ETSI EN 300 294 */ char *dvbstrWSS_aspect_ratio (u_int i) { STR_TABLE Table[] = { { 0x01, 0x01, "4:3 // full format // pos. not applicable // active lines: 576" }, { 0x02, 0x02, "16:9 // letterbox // top // active lines: 430" }, { 0x04, 0x04, "14:9 // letterbox // top // active lines: 504" }, { 0x07, 0x07, "14:9 // full format // center // active lines: 576" }, { 0x08, 0x08, "14:9 // letterbox // center // active lines: 504" }, { 0x0B, 0x0B, ">16:9 // letterbox // center // active lines: not defined" }, { 0x0D, 0x0D, "16:9 // letterbox // center // active lines: 430" }, { 0x0E, 0x0E, "16:9 // full format (anamorphic) // pos. not applicable // active lines: 576" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS film bit -- ETSI EN 300 294 */ char *dvbstrWSS_film_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "camera mode" }, { 0x01, 0x01, "film mode" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS color coding bit -- ETSI EN 300 294 */ char *dvbstrWSS_color_coding_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "standard coding" }, { 0x01, 0x01, "Motion Adaptive Color Plus" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS helper bit -- ETSI EN 300 294 */ char *dvbstrWSS_helper_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no helper" }, { 0x01, 0x01, "Modulated helper" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS subtitles within teletext bit -- ETSI EN 300 294 */ char *dvbstrWSS_subtitleTeletext_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no subtitles within teletext" }, { 0x01, 0x01, "subtitles within Teletext" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS subtitling mode -- ETSI EN 300 294 */ char *dvbstrWSS_subtitling_mode (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no open subtitles" }, { 0x01, 0x01, "subtitles out of active image area" }, { 0x02, 0x02, "subtitles in active image area" }, { 0x03, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS surround bit -- ETSI EN 300 294 */ char *dvbstrWSS_surround_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no surround sound information" }, { 0x01, 0x01, "surround sound mode" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS copyright bit -- ETSI EN 300 294 */ char *dvbstrWSS_copyright_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "no copyright asserted or status unknown" }, { 0x01, 0x01, "copyright asserted" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- WSS copyright generation bit -- ETSI EN 300 294 */ char *dvbstrWSS_copy_generation_bit (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "copying not restricted" }, { 0x01, 0x01, "copying restricted" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Timeslice used bit -- ETSI EN 301 192 v1.4.1 */ char *dvbstrTimeSlice_bit_used (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "not used" }, { 0x01, 0x01, "used" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPE_FEC algo -- ETSI EN 301 192 v1.4.1 */ char *dvbstrMPE_FEC_algo (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "MPE-FEC not used" }, { 0x01, 0x01, "MPE-FEC used // Reed-Solomon (255,191,64)" }, { 0x02, 0x03, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPE_FEC max burst size -- ETSI EN 301 192 v1.4.1 */ char *dvbstrMPE_FEC_max_burst_size (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "512 kbits" }, { 0x01, 0x01, "1024 kbits" }, { 0x02, 0x02, "1536 kbits" }, { 0x03, 0x03, "2048 kbits" }, { 0x04, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPE_FEC frame rows -- ETSI EN 301 192 v1.4.1 */ char *dvbstrMPE_FEC_frame_rows (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "256" }, { 0x01, 0x01, "512" }, { 0x02, 0x02, "768" }, { 0x03, 0x03, "1024" }, { 0x04, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPE_FEC max average rate -- ETSI EN 301 192 v1.4.1 */ char *dvbstrMPE_FEC_max_average_rate (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "16 kbps" }, { 0x01, 0x01, "32 kbps" }, { 0x02, 0x02, "64 kbps" }, { 0x03, 0x03, "128 kbps" }, { 0x04, 0x04, "256 kbps" }, { 0x05, 0x05, "512 kbps" }, { 0x06, 0x06, "1024 kbps" }, { 0x07, 0x07, "2048 kbps" }, { 0x08, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPE_FEC table_frame_boundary -- ETSI EN 301 192 v1.4.1 */ char *dvbstrMPE_FEC_table_frame_boundary (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "" }, { 0x01, 0x01, "last section (current burst or MEC_FEC frame)" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Running Status (TV ANYTIME) -- ETSI TS 102 323 v1.1.1 TV ANYTIME */ char *dvbstrTVA_RunningStatus(u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "not yet running" }, { 0x02, 0x02, "(re-)starts shortly" }, { 0x03, 0x03, "paused" }, { 0x04, 0x04, "running" }, { 0x05, 0x05, "cancelled" }, { 0x06, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- CRID type (TV ANYTIME) -- ETSI TS 102 323 v1.1.1 TV ANYTIME */ char *dvbstrTVA_crid_type (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "not defined" }, { 0x01, 0x01, "CRID references the item of content that this event is an instance of" }, { 0x02, 0x02, "CRID references a series that this event belongs to" }, { 0x03, 0x03, "CRID references a recommendation. This CRID can be a group or a single item of content" }, { 0x04, 0x1F, "DVB reserved" }, { 0x20, 0x3F, "user defined" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- CRID location (TV ANYTIME) -- ETSI TS 102 323 v1.1.1 TV ANYTIME */ char *dvbstrTVA_crid_location (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "Carried explicitly within descriptor" }, { 0x01, 0x01, "Carried in Content Identifier Table (CIT)" }, { 0x02, 0x03, "DVB reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- content id type (TV ANYTIME) -- ETSI TS 102 323 v1.1.1 TV ANYTIME */ char *dvbstrTVA_content_id_type (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "context_id is a value of bouquet_id" }, { 0x01, 0x01, "context_id is a value of original_network_id" }, { 0x02, 0x02, "context_id is a value of a value of network_id" }, { 0x03, 0x7F, "DVB reserved" }, { 0x80, 0xFF, "user defined" }, { 0,0, NULL } }; return findTableID (Table, i); } // // H.222.0 AMD1 - AMD3 update // /* -- metadata_application_format -- H.222.0 AMD1 */ char *dvbstrMPEG_metadata_application_format (u_int i) { STR_TABLE Table[] = { { 0x0000, 0x00FF, "reserved" }, { 0x0100, 0xFFFE, "User defined" }, { 0xFFFF, 0xFFFF, "Defined by the metadata_application_format_identifier" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Content_time_base_indicator values -- H.222.0 AMD1 */ char *dvbstrMPEG_Content_time_base_indicator (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "No content time base defined" }, { 0x01, 0x01, "Use of STC" }, { 0x02, 0x02, "Use of NPT" }, { 0x03, 0x07, "reserved" }, { 0x08, 0x0F, "private use" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- metadata section_fragmentation_indication -- H.222.0 AMD1 */ char *dvbstrMPEG_metadata_section_frag_indication (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "next metadata section with data from one metadata Access Unit" }, { 0x01, 0x01, "last metadata section with data from one metadata Access Unit" }, { 0x02, 0x02, "first metadata section with data from one metadata Access Unit" }, { 0x03, 0x03, "single metadata section carrying a complete metadata Access Unit" }, { 0,0, NULL } }; return findTableID (Table, i); } /* * ------------------------------------------------------------------------------ */ /* -- frame_rate_code -- ISO 13818-2 Table 6.4 */ char *dvbstrMPEG_FrameRateCode (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "23.976" }, { 0x02, 0x02, "24" }, { 0x03, 0x03, "25" }, { 0x04, 0x04, "29.97" }, { 0x05, 0x05, "30" }, { 0x06, 0x06, "50" }, { 0x07, 0x07, "59.94" }, { 0x08, 0x08, "60" }, { 0x09, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- Picture Coding Type -- ISO 13818-2 */ char *dvbstrMPEG_PictureCodingType (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "intra-coded (I)" }, { 0x02, 0x02, "predictive-coded (P)" }, { 0x03, 0x03, "bidirectionally-predictive-coded (B)" }, { 0x04, 0x04, "dc-intra-coded (D) (ISO/IEC 11172-2)" }, { 0x05, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG-2 Extension Start Code Identifier -- ISO 13818-2 */ char *dvbstrMPEG_ExtensionStartCodeIdentifier (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "Sequence Extension ID" }, { 0x02, 0x02, "Sequence Display Extension ID" }, { 0x03, 0x03, "Quant Matrix Extension ID" }, { 0x04, 0x04, "Copyright Extension ID" }, { 0x05, 0x05, "Sequence Scalable Extension ID" }, { 0x06, 0x06, "reserved" }, { 0x07, 0x07, "Picture Display Extension ID" }, { 0x08, 0x08, "Picture Coding Extension ID" }, { 0x09, 0x09, "Picture Spatial Scalable Extension ID" }, { 0x0A, 0x0A, "Picture Temporal Scalable Extension ID" }, { 0x0B, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG-2 Profile Indication -- profile_and_level_indication -- ISO 13818-2 */ char *dvbstrMPEG_ProfileIndication (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "High" }, { 0x02, 0x02, "Spatially Scalable" }, { 0x03, 0x03, "SNR Scalable" }, { 0x04, 0x04, "Main" }, { 0x05, 0x05, "Simple" }, { 0x06, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG-2 Level Indication -- profile_and_level_indication -- ISO 13818-2 */ char *dvbstrMPEG_LevelIndication (u_int i) { STR_TABLE Table[] = { { 0x00, 0x03, "reserved" }, { 0x04, 0x04, "High" }, { 0x05, 0x05, "reserved" }, { 0x06, 0x06, "High 1440" }, { 0x07, 0x07, "reserved" }, { 0x08, 0x08, "Main" }, { 0x09, 0x09, "reserved" }, { 0x0A, 0x0A, "Low" }, { 0x0B, 0x0F, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Chroma Format -- ISO 13818-2 */ char *dvbstrMPEG_ChromaFormat (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "4:2:0" }, { 0x02, 0x02, "4:2:2" }, { 0x03, 0x03, "4:4:4" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG VideoFormat -- ISO 13818-2 */ char *dvbstrMPEG_VideoFormat (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "component" }, { 0x01, 0x01, "PAL" }, { 0x02, 0x02, "NTSC" }, { 0x03, 0x03, "SECAM" }, { 0x04, 0x04, "MAC" }, { 0x05, 0x05, "Unspecified video format" }, { 0x06, 0x07, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Color Primaries -- ISO 13818-2 */ char *dvbstrMPEG_ColorPrimaries (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "Recommendation ITU-R BT.709" }, { 0x02, 0x02, "Unspecified Video" }, { 0x03, 0x03, "reserved" }, { 0x04, 0x04, "Recommendation ITU-R BT.470-2 System M" }, { 0x05, 0x05, "Recommendation ITU-R BT.470-2 System B,G" }, { 0x06, 0x06, "SMPTE 170M" }, { 0x07, 0x07, "SMPTE 240M (1987)" }, { 0x08, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Transfer Characteristics -- ISO 13818-2 */ char *dvbstrMPEG_TransferCharacteristics (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "Recommendation ITU-R BT.709" }, { 0x02, 0x02, "Unspecified Video" }, { 0x03, 0x03, "reserved" }, { 0x04, 0x04, "Recommendation ITU-R BT.470-2 System M" }, { 0x05, 0x05, "Recommendation ITU-R BT.470-2 System B,G" }, { 0x06, 0x06, "SMPTE 170M" }, { 0x07, 0x07, "SMPTE 240M (1987)" }, { 0x08, 0x08, "Linear transfer characteristics" }, { 0x09, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Matrix Coefficients -- ISO 13818-2 */ char *dvbstrMPEG_MatrixCoefficients (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "forbidden" }, { 0x01, 0x01, "Recommendation ITU-R BT.709" }, { 0x02, 0x02, "Unspecified Video" }, { 0x03, 0x03, "reserved" }, { 0x04, 0x04, "FCC" }, { 0x05, 0x05, "Recommendation ITU-R BT.470-2 System B,G" }, { 0x06, 0x06, "SMPTE 170M" }, { 0x07, 0x07, "SMPTE 240M (1987)" }, { 0x08, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Scalable Mode -- ISO 13818-2 */ char *dvbstrMPEG_ScalableMode (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "data partitioning" }, { 0x01, 0x01, "spatial scalability" }, { 0x02, 0x02, "SNR scalability" }, { 0x03, 0x03, "temporal scalability" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Intra DC Precision -- ISO 13818-2 */ char *dvbstrMPEG_Intra_DC_Precision (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "8 bits" }, { 0x01, 0x01, "9 bits" }, { 0x02, 0x02, "10 bits" }, { 0x03, 0x03, "11 bits" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Picture Structure -- ISO 13818-2 */ char *dvbstrMPEG_PictureStructure (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "reserved" }, { 0x01, 0x01, "top field" }, { 0x02, 0x02, "bottom field" }, { 0x03, 0x03, "frame picture" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- MPEG Copyright Extension original_or_copy -- ISO 13818-2 */ char *dvbstrMPEG_Original_Or_Copy (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "copy" }, { 0x01, 0x01, "original" }, { 0,0, NULL } }; return findTableID (Table, i); } /* -- TS MIP Synchronization -- TS 101 191 */ char *dvbstrTS_MIP_Syncronization (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "SFN synchronization" }, { 0x01, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* * -- MegaFrame Iniialization Packet Functions * -- TS 101 191 */ char *dvbstrTS_MIP_FunctionTag (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "tx_time_offset_function" }, { 0x01, 0x01, "tx_frequency_offset_function" }, { 0x02, 0x02, "tx_power_function" }, { 0x03, 0x03, "private_data_function" }, { 0x04, 0x04, "cell_id_function" }, { 0x05, 0x05, "enable_function" }, { 0x06, 0x06, "bandwidth_function" }, { 0x07, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* * -- MIP, Channel bandwidth * -- TS 101 191 */ char *dvbstrTS_MIP_ChannelBandwidth (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "5 MHz" }, { 0x01, 0xFF, "reserved" }, { 0,0, NULL } }; return findTableID (Table, i); } /* Annotation: --- $$$ TODO: store table strings in external text files, to be --- more flexible */ /* $$$ TODO ISO/IEC 13818-1:2000/Amd.5:2005 (E): Table 2-62 – MPEG-4_audio_profile_and_level assignment values Table Amd.5-2 – MPEG-2_AAC_additional_information field values */ dvbsnoop-1.4.50/src/strings/net_str.c0000644000076400001440000000155510500020400013201 /* $Id: net_str.c,v 1.1 2006/09/07 13:39:12 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Network strings (IP, UDP, ICMP) $Log: net_str.c,v $ Revision 1.1 2006/09/07 13:39:12 rasc net string module */ #include "dvbsnoop.h" #include "net_str.h" #include "strtable_misc.h" /* -- Assigned Internet Protocol Numbers -- RFC 790 -- (incomplete, only stuff used with DVB) */ char *netStr_RFC790_protocol_nr (u_int i) { STR_TABLE Table[] = { { 0x00, 0x00, "Reserved" }, { 0x01, 0x01, "ICMP" }, { 0x03, 0x03, "Gateway-to-Gateway" }, { 0x06, 0x06, "TCP" }, { 0x11, 0x11, "UDP" }, { 0x00, 0xFF, "see: RFC790" }, // filler to match all entries { 0,0, NULL } }; return findTableID (Table, i); } dvbsnoop-1.4.50/src/strings/strtable_misc.c0000744000076400001440000000165010362514570014401 /* $Id: strtable_misc.c,v 1.3 2006/01/15 17:50:31 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- String table misc. $Log: strtable_misc.c,v $ Revision 1.3 2006/01/15 17:50:31 rasc no message Revision 1.2 2006/01/02 18:24:32 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/07/24 11:47:08 rasc EN 301 192 update - New: ECM_repetition_rate_descriptor (EN 301 192 v1.4.1) - New: time_slice_fec_identifier_descriptor (EN 301 192 v1.4.1) - New: Section MPE_FEC EN 301 192 v1.4 - Bugfixes */ #include "strtable_misc.h" /* -- match id in range from STR_TABLE */ char *findTableID (STR_TABLE *t, u_int id) { while (t->str) { if (t->from <= id && t->to >= id) return (char *) t->str; t++; } return (char *) ">>ERROR: not (yet) defined... Report!<<"; } dvbsnoop-1.4.50/src/misc/0000777000076400001440000000000010630324350010716 5dvbsnoop-1.4.50/src/misc/cmdline.h0000744000076400001440000000470110402705266012427 /* $Id: cmdline.h,v 1.33 2006/03/06 00:04:54 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __CMDLINE_H #define __CMDLINE_H #include "dvb_api/dvb_api.h" /* -- defs... */ enum PACKET_MODE {SECT, TS, PES, PS, PIDSCAN, PIDBANDWIDTH, SCAN_FE_SIGNAL, SCAN_FE_INFO}; enum TIME_MODE {NO_TIME, FULL_TIME, DELTA_TIME}; typedef struct _OPTIONS { int packet_mode; int packet_header_sync; // Try to do a softsync of packet sync bytes -- $$$ OBSOLETE!!! int buffer_hexdump; // 0/1: print hexdump prior to decoding int printhex; // hexdump mode int printdecode; // decode verbose mode int binary_out; // binary output? char *outPidFile; // write to file (implies binary_out) char *inpPidFile; // read from file instead of dmux if not NULL char *devDemux; // input device DMX char *devDvr; // input device DVR char *devFE; // input device Frontend int dvbAdapterNr; // /dev/dvb/adapterN/... (Api3) int dvbDeviceNr; // z.B. /dev/dvb/.../demuxN long rd_buffer_size; // read buffer size in (0L = default) u_int pid; // decode PID int filterLen; // bytelength of section filter u_char filter[DMX_FILTER_SIZE]; // section byte filter u_char mask[DMX_FILTER_SIZE]; // section byte mask int crc; // section CRC check? int soft_crc; // section CRC soft check? int max_dmx_filter; // max dmx filter use? (pidscan) long timeout_ms; // read timeout in ms long rd_packet_count; // read max. n packets long dec_packet_count; // decode max. n packets int rd_all_sections; // read all sections no. for a pid int spider_pid; // Section PID spider mode int ts_subdecode; // sub decode PES or SEC in TS stream int ts_raw_mode; // Read full TS in TS stream mode (if hardware supported) int time_mode; // time print mode char *privateProviderStr; // Private Provider ID str (usedef tables, descr) int dsmcc_save; // save modules from DSM-CC to file int hide_copyright; // suppress message at prog start int help; } OPTION; /* -- prototypes */ int cmdline_options (int argc, char **argv, OPTION *opt); OPTION *getOptionPtr (void); #endif dvbsnoop-1.4.50/src/misc/helper.h0000744000076400001440000000457610356274530012310 /* DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __HELPER_H #define __HELPER_H u_long outBit_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); u_long outBit_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); u_long outBit_S2x_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen, char *(*f)(u_long) ); u_long outBit_S2Tx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen, const char *text2 ); unsigned long long outBit64_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); unsigned long long outBit64_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); u_long getBits (u_char *buf, int byte_offset, int startbit, int bitlen); long long getBits48 (u_char *buf, int byte_offset, int startbit, int bitlen); unsigned long long getBits64 (u_char *buf, int byte_offset, int startbit, int bitlen); u_char *getISO639_3 (u_char *str, u_char *buf); void print_text_468A (int v, const char *s, u_char *b, u_int len); void print_text_UTF8 (int v, const char *s, u_char *b, u_int len); void print_std_ascii (int v, const char *s, u_char *b, u_int len); void print_time_utc (int v, u_long utc); void print_time_mjd (int v, u_long mjd); void print_time40 (int verbose, u_long mjd, u_long utc); void print_timebase90kHz (int v, long long time90kHz); void print_pcr_time (int v, long long time90kHz, int ext_27MHz); void print_databytes (int verbose, const char *str, u_char *b, u_int len); void print_databytes_line (int v, const char *str, u_char *b, u_int len); void print_private_data (int verbose, u_char *b, u_int len); void print_BitMatrix (int v, char *str, u_char *b, int bitoffset, int matrix_x, int matrix_y); long str2i (char *s); int str2barray (char *s, u_char *barray, int max_len); char *str_cell_latitude (long latitude); char *str_cell_longitude (long longitude); struct IPv6ADDR { u_long ip[4]; // 32 bit: ip[0] ip[1] ip[2] ip[3] }; void displ_mac_addr (int v, long mac_H24, long mac_L24); void displ_IPv4_addr (int v, u_long ip); struct IPv6ADDR *getIPv6Addr (u_char *b, struct IPv6ADDR *x); void displ_IPv6_addr (int v, struct IPv6ADDR *ip); char *str_bit32 (u_long value, int bits); int lenCheckErrOut (int v, int len); #endif dvbsnoop-1.4.50/src/misc/hexprint.h0000744000076400001440000000071410356276724012667 /* $Id: hexprint.h,v 1.9 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __HEXPRINT_H #define __HEXPRINT_H void setHexPrintMode (int i); void printhex_buf (int verbose, u_char *buf, int len); void printhexline_buf (int verbose, u_char *buf, int len); void printasciiline_buf (int verbose, u_char *buf, int n); #endif dvbsnoop-1.4.50/src/misc/output.h0000744000076400001440000000724610356276724012375 /* $Id: output.h,v 1.13 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: output.h,v $ Revision 1.13 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.12 2005/09/02 14:11:35 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.11 2004/12/07 21:01:42 rasc Large file support (> 2 GB) for -if cmd option. (tnx to K.Zheng, Philips.com for reporting) Revision 1.10 2004/01/13 21:04:21 rasc BUGFIX: getbits overflow fixed... Revision 1.9 2004/01/02 16:40:37 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.8 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.7 2003/11/26 23:54:48 rasc -- bugfixes on Linkage descriptor Revision 1.6 2003/11/26 19:55:33 rasc no message Revision 1.5 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.4 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #ifndef __OUTPUT_H #define __OUTPUT_H void indent (int v); void setVerboseLevel (int v); int getVerboseLevel (); void out(int verbose, const char *msgfmt,...); void out_nl(int verbose, const char *msgfmt,...); void out_nl2(int verbose); void print_indent(void); /* * Warning: following macros are violating C conventions: * macro params are used more than once in a macro!! * avoid stuff like out_L (4,"xxx",i++); * $$$ ^^^^ * (but i use this for convenience...) */ #define out_NL(v) out_nl2(v) // L = long (32 bit) output // T = TriByte (24 bit) // W = Word (16 bit) // B = Byte ( 8 bit) /* out "128 (0x80)" */ #define out_LL(v,hex) out((v),"%lld (0x%llx)",(long long)(hex),(long long)(hex)) #define out_L(v,hex) out((v),"%lu (0x%08lx)",(hex),(hex)) #define out_T(v,hex) out((v),"%lu (0x%06x)",(hex),(hex)) #define out_W(v,hex) out((v),"%u (0x%04x)",(hex),(hex)) #define out_B(v,hex) out((v),"%u (0x%02x)",(hex),(hex)) /* out "String 128 (=0x80)" */ #define out_SLL(v,str,hex) out((v),"%s%lld (0x%llx)",(str),(long long)(hex),(long long)(hex)) #define out_SL(v,str,hex) out((v),"%s%lu (0x%08lx)",(str),(hex),(hex)) #define out_ST(v,str,hex) out((v),"%s%lu (0x%06x)",(str),(hex),(hex)) #define out_SW(v,str,hex) out((v),"%s%u (0x%04x)",(str),(hex),(hex)) #define out_SB(v,str,hex) out((v),"%s%u (0x%02x)",(str),(hex),(hex)) /* out "String 128 (=0x80)\n" */ #define out_SLL_NL(v,str,hex) out_nl((v),"%s%lld (0x%llx)",(str),(long long)(hex),(long long)(hex)) #define out_SL_NL(v,str,hex) out_nl((v),"%s%lu (0x%08lx)",(str),(hex),(hex)) #define out_ST_NL(v,str,hex) out_nl((v),"%s%lu (0x%06x)",(str),(hex),(hex)) #define out_SW_NL(v,str,hex) out_nl((v),"%s%u (0x%04x)",(str),(hex),(hex)) #define out_SB_NL(v,str,hex) out_nl((v),"%s%u (0x%02x)",(str),(hex),(hex)) /* out "String 128 (=0x80) [=string]\n" */ #define out_S2LL_NL(v,str,hex,str2) out_nl((v),"%s%lld (0x%llx) [= %s]",(str),(long long)(hex),(long long)(hex),(str2)) #define out_S2L_NL(v,str,hex,str2) out_nl((v),"%s%lu (0x%08lx) [= %s]",(str),(hex),(hex),(str2)) #define out_S2T_NL(v,str,hex,str2) out_nl((v),"%s%lu (0x%06x) [= %s]",(str),(hex),(hex),(str2)) #define out_S2W_NL(v,str,hex,str2) out_nl((v),"%s%u (0x%04x) [= %s]",(str),(hex),(hex),(str2)) #define out_S2B_NL(v,str,hex,str2) out_nl((v),"%s%u (0x%02x) [= %s]",(str),(hex),(hex),(str2)) #endif dvbsnoop-1.4.50/src/misc/pkt_time.h0000744000076400001440000000275610356276724012652 /* $Id: pkt_time.h,v 1.10 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: pkt_time.h,v $ Revision 1.10 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.9 2004/12/07 21:01:42 rasc Large file support (> 2 GB) for -if cmd option. (tnx to K.Zheng, Philips.com for reporting) Revision 1.8 2004/01/11 21:01:32 rasc PES stream directory, PES restructured Revision 1.7 2004/01/02 16:40:37 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.6 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/12/14 23:38:46 rasc - bandwidth reporting for a PID Revision 1.4 2003/11/26 19:55:33 rasc no message Revision 1.3 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.2 2001/10/02 21:52:44 rasc - init der time_delta - PES erweitert, PES arbeitet im read() noch nicht richtig!! - muss tmbinc fragem, ob ich Mist baue, oder der Treiber (??) Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #ifndef __PKT_TIME #define __PKT_TIME #include "cmdline.h" #include "sys/time.h" void out_receive_time (int verbose, OPTION *opt); void init_receive_time (void); long delta_time_ms (struct timeval *tv, struct timeval *tv_last); #endif dvbsnoop-1.4.50/src/misc/pid_mem.h0000744000076400001440000000116210356276724012436 /* $Id: pid_mem.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: pid_mem.h,v $ Revision 1.2 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes */ #ifndef __PID_MEM #define __PID_MEM void init_PidMemory (void); int store_PidToMem (int pid); int get_UnusedPidFromMem (void); void mark_PidMem_as_used (int pid); #endif dvbsnoop-1.4.50/src/misc/packet_mem.h0000744000076400001440000000101610356276724013127 /* $Id: packet_mem.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de */ #ifndef __PACKET_MEM_H #define __PACKET_MEM_H int packetMem_acquire (u_long requested_length); void packetMem_free (int handle); void packetMem_clear (int handle); u_long packetMem_length (int handle); u_char *packetMem_buffer_start (int handle); int packetMem_add_data (int handle, u_char *buf, u_long len); #endif dvbsnoop-1.4.50/src/misc/print_header.h0000744000076400001440000000060610356276724013472 /* $Id: print_header.h,v 1.4 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) */ #ifndef __PRINT_HEADER_H #define __PRINT_HEADER_H #include "misc/cmdline.h" void print_packet_header (OPTION *opt, char *packetTyp, u_int pid, int count, int length); #endif dvbsnoop-1.4.50/src/misc/crc32.h0000744000076400001440000000051310356276724011737 /* $Id: crc32.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Code Module CRC32 taken von linuxtv.org */ #ifndef __CRC32_H #define __CRC32_H u_long crc32 (char *data, int len); #endif dvbsnoop-1.4.50/src/misc/sig_abort.h0000744000076400001440000000120310356276724012771 /* $Id: sig_abort.h,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Handle Kill/Interrupt Signals from User/OS -- (e.g. Kill -1) $Log: sig_abort.h,v $ Revision 1.2 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2005/09/06 23:39:04 rasc catch OS signals (kill ...) for smooth program termination */ #ifndef __SIG_ABORT_H #define __SIG_ABORT_H void initOSSigHandler (void); int isSigAbort (void); void restoreOSSigHandler (void); #endif dvbsnoop-1.4.50/src/misc/Makefile.am0000744000076400001440000000057610307410710012674 AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libmisc.a noinst_HEADERS = \ cmdline.h \ helper.h \ hexprint.h \ output.h \ pkt_time.h \ pid_mem.h \ packet_mem.h \ print_header.h \ crc32.h \ sig_abort.h libmisc_a_SOURCES = \ cmdline.c \ helper.c \ hexprint.c \ output.c \ pkt_time.c \ pid_mem.c \ packet_mem.c \ print_header.c \ crc32.c \ sig_abort.c dvbsnoop-1.4.50/src/misc/Makefile.in0000644000076400001440000003104410630302141012673 # Makefile.in generated by automake 1.8.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(libmisc_a_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = src/misc DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(mkdir_p) CONFIG_CLEAN_FILES = AR = ar ARFLAGS = cru LIBRARIES = $(noinst_LIBRARIES) libmisc_a_AR = $(AR) $(ARFLAGS) libmisc_a_LIBADD = am_libmisc_a_OBJECTS = cmdline.$(OBJEXT) helper.$(OBJEXT) \ hexprint.$(OBJEXT) output.$(OBJEXT) pkt_time.$(OBJEXT) \ pid_mem.$(OBJEXT) packet_mem.$(OBJEXT) print_header.$(OBJEXT) \ crc32.$(OBJEXT) sig_abort.$(OBJEXT) libmisc_a_OBJECTS = $(am_libmisc_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/cmdline.Po ./$(DEPDIR)/crc32.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/helper.Po ./$(DEPDIR)/hexprint.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/output.Po ./$(DEPDIR)/packet_mem.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/pid_mem.Po ./$(DEPDIR)/pkt_time.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/print_header.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sig_abort.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libmisc_a_SOURCES) DIST_SOURCES = $(libmisc_a_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I$(top_srcdir)/src noinst_LIBRARIES = libmisc.a noinst_HEADERS = \ cmdline.h \ helper.h \ hexprint.h \ output.h \ pkt_time.h \ pid_mem.h \ packet_mem.h \ print_header.h \ crc32.h \ sig_abort.h libmisc_a_SOURCES = \ cmdline.c \ helper.c \ hexprint.c \ output.c \ pkt_time.c \ pid_mem.c \ packet_mem.c \ print_header.c \ crc32.c \ sig_abort.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/misc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libmisc.a: $(libmisc_a_OBJECTS) $(libmisc_a_DEPENDENCIES) -rm -f libmisc.a $(libmisc_a_AR) libmisc.a $(libmisc_a_OBJECTS) $(libmisc_a_LIBADD) $(RANLIB) libmisc.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hexprint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet_mem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pid_mem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkt_time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_header.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig_abort.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: dvbsnoop-1.4.50/src/misc/cmdline.c0000744000076400001440000004576210402705266012436 /* $Id: cmdline.c,v 1.51 2006/03/06 00:04:54 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: cmdline.c,v $ Revision 1.51 2006/03/06 00:04:54 rasc More DSM-CC stuff: BIOP::FileMessage, BIOP::DirectoryMessage, BIOP::Stream::BIOP::StreamEvent, BIOP::ServiceGateway, DSM-TAPs, etc. this is a preparation for a patch sent in by Richard Case (DSMCC-Save). Attention: Code is still untested and may considered to be buggy (some teststreams are needed)... Revision 1.50 2005/12/29 02:43:38 rasc gcc fixes, man page update Revision 1.49 2005/10/20 22:25:07 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.48 2005/08/12 23:02:35 rasc New shortcut options: -adapter and -devnr to select dvb cards/adapters or device numbers on a card. This is a shortcut for -demux -dvr and -frontend... Revision 1.47 2005/08/11 21:02:16 rasc minor changes, man page Revision 1.46 2005/08/10 21:28:18 rasc New: Program Stream handling (-s ps) Revision 1.45 2005/08/02 22:57:46 rasc Option -N, rewrite offline filters (TS & Section) Revision 1.44 2005/07/31 21:47:59 rasc soft CRC for sections... Revision 1.43 2005/07/11 23:06:47 rasc Multibyte section filter redesign: -f 0x4F.22.33.44.55.66 -m 0x.FF.FF.FF etc. Manpage update Revision 1.42 2005/06/27 20:28:17 rasc first version for a man page Revision 1.41 2005/01/17 19:41:22 rasc Bugfix: data broadcast descriptor (tnx to Sergio SAGLIOCCO, SecureLAB) Revision 1.40 2004/12/07 21:01:42 rasc Large file support (> 2 GB) for -if cmd option. (tnx to K.Zheng, Philips.com for reporting) Revision 1.39 2004/11/16 23:02:50 rasc cmd option "-tsraw" for full/raw TS read (if supported by hard-/firmware) Revision 1.38 2004/11/03 21:00:59 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.37 2004/10/12 21:12:05 rasc no message Revision 1.36 2004/10/12 20:37:48 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.35 2004/09/01 20:20:34 rasc new cmdline option: -buffersize KB (set demux buffersize in KBytes) Revision 1.34 2004/04/15 03:38:50 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets Revision 1.33 2004/04/01 19:19:06 rasc cmdline options renamed... Revision 1.32 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes Revision 1.31 2004/03/21 00:37:47 rasc Query FrontEnd Info (option: -s feinfo) Revision 1.30 2004/03/09 20:59:23 rasc VPS decoding (someone check the NPP & PTY code output please...) Revision 1.29 2004/02/28 12:13:03 rasc minor stuff Revision 1.28 2004/02/21 00:50:41 rasc bugfix: MHP AIT descriptors Revision 1.27 2004/02/20 22:18:40 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.26 2004/02/16 22:45:37 rasc small bugfix: crc is 32 bit Revision 1.25 2004/02/15 22:22:28 rasc cmd option: -hexdumpbuffer -nohexdumpbuffer Revision 1.24 2004/01/29 22:34:49 rasc -sync: default now Revision 1.23 2004/01/22 22:26:35 rasc pes_pack_header section read timeout Revision 1.22 2004/01/06 14:06:09 rasc no message Revision 1.21 2004/01/03 15:40:47 rasc simple frontend signal status query added "-s signal" Revision 1.20 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.19 2003/12/28 22:53:41 rasc some minor changes/cleanup Revision 1.18 2003/12/28 14:00:26 rasc bugfix: section read from input file some changes on packet header output Revision 1.17 2003/12/28 00:01:14 rasc some minor changes/adds... Revision 1.16 2003/12/17 23:57:29 rasc add. hexdump mode, different layout for some purpose option: -ph 4 Revision 1.15 2003/12/15 22:29:27 rasc pidscan improved, problems with max filters on demux Revision 1.14 2003/12/15 20:09:49 rasc no message Revision 1.13 2003/12/14 23:38:46 rasc - bandwidth reporting for a PID Revision 1.12 2003/12/10 20:07:15 rasc minor stuff Revision 1.11 2003/12/09 21:02:31 rasc transponder pid-scan improved (should be sufficient now) Revision 1.10 2003/12/07 23:36:13 rasc pidscan on transponder - experimental(!) Revision 1.9 2003/12/03 20:06:35 obi - reduced auto* to minimal required checks, obsoletes acinclude.m4 - added version number to configure.ac, removed it from version.h (needed for "make dist" anyway) - removed autoheader dependency Revision 1.8 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.7 2003/11/24 23:52:17 rasc -sync option, some TS and PES stuff; dsm_addr inactive, may be wrong - due to missing ISO 13818-6 Revision 1.6 2003/11/01 17:05:46 rasc no message Revision 1.5 2003/10/16 20:45:47 rasc no message Revision 1.4 2003/10/16 19:02:27 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.3 2003/07/06 05:28:52 obi compatibility stuff.. now there is only one version for old and new drivers which selects the api at configure time Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include "dvbsnoop.h" #include "cmdline.h" #include "dvb_api/dvb_api.h" #include "private/userdefs.h" static void title (void); static void usage (void); static char *set_DVB_device (char *str, const char *path_mask, int adapter, int devnr); // -- GetOptionPtr static OPTION *opt_ptr = NULL; // -- mem for dvb devices static char strDEV_DEMUX[DVB_MAX_DEV_PATH_LEN]; static char strDEV_DVR[DVB_MAX_DEV_PATH_LEN]; static char strDEV_FRONTEND[DVB_MAX_DEV_PATH_LEN]; /* -- set default options and decode cmdline -- return 0=abort, 1= ok (&opt set) */ int cmdline_options (int argc, char **argv, OPTION *opt) { char *s; int i; /* -- init options */ opt->buffer_hexdump = 1; opt->printhex = -1; // see below opt->printdecode = -1; // see below opt->binary_out = 0; opt->outPidFile = (char *) NULL; opt->inpPidFile = (char *) NULL; opt->devDemux = (char *) NULL; opt->devDvr = (char *) NULL; opt->devFE = (char *) NULL; opt->dvbAdapterNr = DVB_STD_ADAPTER_NR; // default opt->dvbDeviceNr = DVB_STD_DEVICE_NR; // default opt->rd_buffer_size = 0L; // use default read buffersize opt->pid = INVALID_PID; opt->timeout_ms = 0; // no timeout (0) or default timeout in ms (SECTIONS) opt->max_dmx_filter = 0; // use module default (pidscan) opt->crc = 0; opt->soft_crc = 0; opt->spider_pid = 0; opt->ts_subdecode = 0; opt->rd_all_sections = 0; // read all section no. for a pid opt->ts_raw_mode = 0; opt->rd_packet_count = 0; opt->dec_packet_count = 0; opt->packet_header_sync = 1; // $$$ OBSOLETE! opt->packet_mode = SECT; opt->time_mode = FULL_TIME; opt->hide_copyright= 0; opt->help = 0; opt->privateProviderStr = (char *)NULL; // decoding known private tables/descriptors, ProviderStr opt->dsmcc_save = 0; opt->filterLen = 0; memset(opt->filter, 0, DMX_FILTER_SIZE); memset(opt->mask, 0, DMX_FILTER_SIZE); // -- store for getOption opt_ptr = opt; /* -- Simple parse of cmdline */ i = 0; while (++i < argc) { if (!strcmp (argv[i],"-demux")) opt->devDemux = argv[++i]; else if (!strcmp (argv[i],"-dvr")) opt->devDvr = argv[++i]; else if (!strcmp (argv[i],"-frontend")) opt->devFE = argv[++i]; else if (!strcmp (argv[i],"-adapter")) opt->dvbAdapterNr = str2i(argv[++i]); else if (!strcmp (argv[i],"-devnr")) opt->dvbDeviceNr = str2i(argv[++i]); else if (!strcmp (argv[i],"-maxdmx")) opt->max_dmx_filter = str2i(argv[++i]); else if (!strcmp (argv[i],"-crc")) opt->crc = 1; else if (!strcmp (argv[i],"-nocrc")) opt->crc = 0; else if (!strcmp (argv[i],"-softcrc")) opt->soft_crc = 1; else if (!strcmp (argv[i],"-nosoftcrc")) opt->soft_crc = 0; else if (!strcmp (argv[i],"-sync")) opt->packet_header_sync = 1; else if (!strcmp (argv[i],"-nosync")) opt->packet_header_sync = 0; // -- obsolete else if (!strcmp (argv[i],"-n")) opt->rd_packet_count = str2i(argv[++i]); else if (!strcmp (argv[i],"-N")) opt->dec_packet_count = str2i(argv[++i]); else if (!strcmp (argv[i],"-b")) opt->binary_out = 1; else if (!strcmp (argv[i],"-ph")) opt->printhex = str2i(argv[++i]); else if (!strcmp (argv[i],"-pd")) opt->printdecode = str2i(argv[++i]); else if (!strcmp (argv[i],"-npd")) opt->printdecode = 0; else if (!strcmp (argv[i],"-hideproginfo")) opt->hide_copyright= 1; else if (!strcmp (argv[i],"-timeout")) opt->timeout_ms = str2i(argv[++i]); else if (!strcmp (argv[i],"-buffersize")) opt->rd_buffer_size = str2i(argv[++i]) * 1024; else if (!strcmp (argv[i],"-tf")) opt->time_mode = FULL_TIME; else if (!strcmp (argv[i],"-td")) opt->time_mode = DELTA_TIME; else if (!strcmp (argv[i],"-tn")) opt->time_mode = NO_TIME; else if (!strcmp (argv[i],"-hexdumpbuffer")) opt->buffer_hexdump = 1; else if (!strcmp (argv[i],"-nohexdumpbuffer")) opt->buffer_hexdump = 0; else if (!strcmp (argv[i],"-nph")) opt->buffer_hexdump = 0; // old option use -ph and -nhdb/-hdb else if (!strcmp (argv[i],"-help")) opt->help = 1; else if (!strcmp (argv[i],"-privateprovider")) opt->privateProviderStr = argv[++i]; else if (!strcmp (argv[i],"-tssubdecode")) opt->ts_subdecode = 1; else if (!strcmp (argv[i],"-allsections")) opt->rd_all_sections = 1; else if (!strcmp (argv[i],"-dsmccsave")) opt->dsmcc_save = 1; else if (!strcmp (argv[i],"-f")) { opt->filterLen = str2barray(argv[++i], opt->filter, DMX_FILTER_SIZE); } else if (!strcmp (argv[i],"-m")) { int x = str2barray(argv[++i], opt->mask, DMX_FILTER_SIZE); if (x<0) opt->filterLen = -1; } else if (!strcmp (argv[i],"-tsraw")) { opt->ts_raw_mode = 1; opt->pid = DUMMY_PID; // dummy to avoid usage output } else if (!strcmp (argv[i],"-spiderpid")) { opt->spider_pid = 1; opt->rd_packet_count = 1; } else if (!strcmp (argv[i],"-of")) { opt->binary_out = 1; opt->outPidFile = argv[++i]; // binary output filename if (!opt->outPidFile) opt->outPidFile = ""; if (!strcmp(opt->outPidFile,"-")) opt->outPidFile = "/dev/stdout"; } else if (!strcmp (argv[i],"-if")) { opt->inpPidFile = argv[++i]; // input filename if (!opt->inpPidFile) opt->inpPidFile = ""; if (!strcmp(opt->inpPidFile,"-")) opt->inpPidFile = "/dev/stdin"; opt->pid = DUMMY_PID; // dummy to avoid usage output } else if (!strcmp (argv[i],"-s")) { s = argv[++i]; if (!s ) s = ""; if (!strcmp (s,"sec")) opt->packet_mode = SECT; else if (!strcmp (s,"ts")) opt->packet_mode = TS; else if (!strcmp (s,"pes")) opt->packet_mode = PES; else if (!strcmp (s,"ps")) opt->packet_mode = PS; // ProgramStream else if (!strcmp (s,"bandwidth")) opt->packet_mode = PIDBANDWIDTH; else if (!strcmp (s,"pidscan")) { opt->packet_mode = PIDSCAN; opt->pid = DUMMY_PID; // dummy to avoid usage output } else if (!strcmp (s,"signal")) { opt->packet_mode = SCAN_FE_SIGNAL; opt->pid = DUMMY_PID; // dummy to avoid usage output } else if (!strcmp (s,"feinfo")) { opt->packet_mode = SCAN_FE_INFO; opt->pid = DUMMY_PID; // dummy to avoid usage output } else opt->help = 1; } else if (isdigit (argv[i][0])) { opt->pid = str2i(argv[i]); // PID if (opt->pid > MAX_PID) opt->help = 1; } else { opt->help = 1; break; } } // while /* -- standard if no print decode or printhex given */ if (opt->printhex < 0) opt->printhex = 4; if (opt->printdecode < 0) opt->printdecode = 7; if (opt->filterLen < 0) { printf("Error: Illegal filter/mask value: use e.g. 0x4F or 0x12.5F.2A. etc...\n"); return(0); } // // -- set default DVB devices // -- (e.g. printed by help) // set_DVB_device (strDEV_DEMUX, DEMUX_DEVICE_MASK, DVB_STD_ADAPTER_NR, DVB_STD_DEVICE_NR); set_DVB_device (strDEV_DVR, DVR_DEVICE_MASK, DVB_STD_ADAPTER_NR, DVB_STD_DEVICE_NR); set_DVB_device (strDEV_FRONTEND, FRONTEND_DEVICE_MASK, DVB_STD_ADAPTER_NR, DVB_STD_DEVICE_NR); // // -- help ? (and return abort) // if (opt->help) { usage (); printf("\nKnown private providers for private sections and descriptors:\n"); list_PRIVATE_ProviderStrs (); return(0); } // // -- set private scope id strings (if specified) // if (opt->privateProviderStr) { set_PRIVATE_ProviderStr (opt->privateProviderStr); } // // -- set DVB devices demux, dvr and frontend // -- if not set by cmdline, set by 1.) default, 2.) adapterNr & deviceNr // if ( opt->dvbAdapterNr < 0 || opt->dvbAdapterNr > 9 || opt->dvbDeviceNr < 0 || opt->dvbDeviceNr > 9) { printf("Error: Illegal DVB adapter/card number or illegal DVB device number. \n"); return(0); } if (!opt->devDemux) { opt->devDemux = set_DVB_device (strDEV_DEMUX, DEMUX_DEVICE_MASK, opt->dvbAdapterNr, opt->dvbDeviceNr); } if (!opt->devDvr) { opt->devDvr = set_DVB_device (strDEV_DVR, DVR_DEVICE_MASK, opt->dvbAdapterNr, opt->dvbDeviceNr); } if (!opt->devFE) { opt->devFE = set_DVB_device (strDEV_FRONTEND, FRONTEND_DEVICE_MASK, opt->dvbAdapterNr, opt->dvbDeviceNr); } // // -- PID check // if ((argc==1) || ((opt->pid > MAX_PID) && (opt->pid != DUMMY_PID)) ) { title (); printf("For help type 'dvbsnoop -help' ...\n"); return(0); } return 1; } // // -- Get pointer to cmdline Option structure // OPTION *getOptionPtr (void) { return opt_ptr; } static void title (void) { printf("dvbsnoop - a dvb/mpeg2 stream analyzer tool\n"); printf("Version: %s/api-%d (%s %s)\n", DVBSNOOP_VERSION,DVB_API_VERSION,__DATE__,__TIME__); printf(" %s \n",DVBSNOOP_URL); printf(" %s \n",DVBSNOOP_COPYRIGHT); printf("\n"); } static void usage (void) { title (); printf("Usage: dvbsnoop [opts] pid \n"); printf("Options: \n"); printf(" -s type: snoop type or mode [-s sec]\n"); printf(" stream type: sec, pes, ps or ts\n"); printf(" or special scan type:\n"); printf(" pidscan = transponder pid scan,\n"); printf(" bandwidth = data rate statistics for pid\n"); printf(" signal = signal rate statistics \n"); printf(" feinfo = frontend information\n"); printf(" stream type or pidscan\n"); printf(" -demux device: demux device [%s]\n",strDEV_DEMUX); printf(" -dvr device: dvr device [%s]\n",strDEV_DVR); printf(" -frontend device: frontend device [%s]\n",strDEV_FRONTEND); printf(" -adapter n: select dvb adapter/card no. using default path\n"); printf(" -devnr n: select device no. using default dvb adapter/card\n"); // $$$ TODO -of cmd option // printf(" -of file: output file, writes binary (implies -b)\n"); // printf(" =\"-\" = /dev/stdout \n"); printf(" -if file: input file, reads from binary instead of demux device \n"); printf(" =\"-\" = /dev/stdin \n"); printf(" -timeout ms: section/signal read timeout in msec. [-timeout 0]\n"); printf(" -maxdmx n: max demux filters to use in pidscan mode (0=max) [-maxdmx 0]\n"); printf(" -buffersize kb: read buffersize in KBytes [-buffersize 0]\n"); printf(" (0 = use default read buffer size)\n"); printf(" -f filter: filtervalue for 'sec' demux [-f 0]\n"); printf(" multibyte filter syntax: 0x1A.34.56.7F.01\n"); printf(" -m mask: maskvalue for 'sec' demux [-m 0]\n"); printf(" multibyte mask syntax: 0x1A.00.F6.55\n"); printf(" -crc: CRC check when reading 'sec' [-nocrc]\n"); printf(" -nocrc: no CRC check when reading 'sec' [-nocrc]\n"); printf(" -softcrc: internal soft CRC check when reading 'sec' [-nosoftcrc]\n"); printf(" -nosoftcrc: no internal soft CRC check when reading 'sec' [-nosoftcrc]\n"); printf(" -sync: simple packet header sync when reading 'ts' or 'pes' [-snyc]\n"); printf(" -nosync: (obsolete option) \n"); printf(" -n count: receive/read max. packets (0=no limit) [-n 0]\n"); printf(" -N count: decode max. packets (0=no limit) [-N 0]\n"); printf(" this will limit -n, e.g. when using soft filters.\n"); printf(" -spiderpid: snoop referenced section pids (sets -n 1) \n"); // $$$ TODO // printf(" -allsections: read all sections in sequence on pid (limited by -n ..) \n"); printf(" -tssubdecode: sub-decode sections or pes from ts stream decoding\n"); printf(" -tsraw: read raw/full TS in TS snoop mode\n"); printf(" -b: binary output of packets (disables other output)\n"); printf(" -ph mode: data hex dump mode, modes: [-ph 4]\n"); printf(" 0=none, 1=hexdump, 2=hex line 3=ascii line 4=hexdump2\n"); printf(" -hexdumpbuffer: print hex dump of read buffer [-hexdumpbuffer]\n"); printf(" -nohexdumpbuffer: don't print hex dump of read buffer [-hexdumpbuffer]\n"); printf(" -nph: don't print hex dump of buffer [= -nohexdumpbuffer]\n"); printf(" -pd verbose: print stream decode (verbose level 0..9) [-pd 7]\n"); printf(" -npd: don't print decoded stream (= -pd 0) \n"); printf(" -t[n|d|f]: print timestamp (no, delta, full) [-tf] \n"); printf(" -privateprovider id: set provider string for decoding private tables and descriptors\n"); // $$$ TODO // printf(" -dsmccsave: Save of Digital Storage Media Command and Control objects, section modes only\n"); // printf(" (currently only processing of BIOP Files and Directories is supported)\n"); printf(" -hideproginfo: hide copyright and program info header at program start\n"); printf(" -help: this usage info...\n"); printf("\n"); return; } static char *set_DVB_device (char *str, const char *path_mask, int adapter, int devnr) { sprintf (str, path_mask, adapter, devnr); return str; } // $$$ TODO commandline handling needs a redesign dvbsnoop-1.4.50/src/misc/helper.c0000744000076400001440000005131510356276724012303 /* $Id: helper.c,v 1.42 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: helper.c,v $ Revision 1.42 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.41 2005/12/27 23:30:28 rasc PS MPEG-2 Extension data packets, MPEG-2 decoding Revision 1.40 2005/11/23 23:06:09 rasc ISO13818-2 MPEG2 sequence header Revision 1.39 2005/09/12 20:56:16 rasc Make dvbsnoop compile on Cygwin / Windows Revision 1.38 2005/09/02 14:11:35 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.37 2005/07/11 23:06:47 rasc Multibyte section filter redesign: -f 0x4F.22.33.44.55.66 -m 0x.FF.FF.FF etc. Manpage update Revision 1.36 2004/11/04 19:21:11 rasc Fixes and changes on "premiere.de" private sections Cleaning up "premiere.de" private descriptors (should be final now) Revision 1.35 2004/11/03 21:00:59 rasc - New: "premiere.de" private tables and descriptors (tnx to Peter.Pavlov, Premiere) - New: cmd option "-privateprovider " - New: Private provider sections and descriptors decoding - Changed: complete restructuring of private descriptors and sections Revision 1.34 2004/10/12 20:37:48 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.33 2004/08/12 22:57:18 rasc - New: MPEG Content Labeling descriptor (H.222.0 AMD1) - New: PES update ITU-T H.222.0 AMD2 H.222.0 AMD3 updates started Revision 1.32 2004/08/08 17:00:25 rasc Bugfix: Cell List descriptor (tnx to Karsten Siebert) Revision 1.31 2004/08/06 22:21:38 rasc New: TV-Anytime (TS 102 323) RNT descriptors 0x40 - 0x42 Revision 1.30 2004/04/19 22:09:33 rasc minor change Revision 1.29 2004/03/13 23:22:14 obi helper.c: In function `str_bit32': helper.c:784: warning: initialization from incompatible pointer type helper.c:797: warning: return from incompatible pointer type Revision 1.28 2004/03/09 20:59:23 rasc VPS decoding (someone check the NPP & PTY code output please...) Revision 1.27 2004/02/28 12:13:03 rasc minor stuff Revision 1.26 2004/02/20 22:18:40 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.25 2004/02/12 21:21:20 rasc MHP AIT descriptors some smaller changes Revision 1.24 2004/02/09 21:25:00 rasc AIT descriptors minor redesign on output routines Revision 1.23 2004/01/17 23:06:09 rasc minor stuff, some restructs in output Revision 1.22 2004/01/13 23:23:38 rasc new getBits routine (hopfully more optimized) Revision 1.21 2004/01/13 21:04:21 rasc BUGFIX: getbits overflow fixed... Revision 1.20 2004/01/02 22:25:38 rasc DSM-CC MODULEs descriptors complete Revision 1.19 2004/01/02 16:40:37 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.18 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.17 2003/12/30 14:05:37 rasc just some annotations, so I do not forget these over Sylvester party... (some alkohol may reformat parts of /devbrain/0 ... ) cheers! Revision 1.16 2003/12/29 22:14:53 rasc more dsm-cc INT UNT descriptors Revision 1.15 2003/12/27 22:02:44 rasc dsmcc INT UNT descriptors started Revision 1.14 2003/12/27 14:35:01 rasc dvb-t descriptors DSM-CC: SSU Linkage/DataBroadcast descriptors Revision 1.13 2003/11/26 23:54:48 rasc -- bugfixes on Linkage descriptor Revision 1.12 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.11 2003/10/24 22:17:19 rasc code reorg... Revision 1.10 2003/10/16 19:02:29 rasc some updates to dvbsnoop... - small bugfixes - tables updates from ETR 162 Revision 1.9 2003/06/24 23:51:03 rasc bugfixes and enhancements Revision 1.8 2003/02/26 16:45:16 obi - make dvbsnoop work on little endian machines again - fixed mask in getBits for bitlen >= 32 Revision 1.7 2003/02/09 23:11:07 rasc no message Revision 1.6 2003/02/09 23:02:47 rasc -- endian check (bug fix) Revision 1.5 2003/02/09 23:01:10 rasc -- endian check (bug fix) Revision 1.4 2003/02/09 22:59:33 rasc -- endian check (bug fix) Revision 1.3 2002/08/17 20:36:12 obi no more compiler warnings Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include #include #include #include #include #include "dvbsnoop.h" #include "helper.h" #include "hexprint.h" #include "output.h" #include "strings/dvb_str.h" /* -- output bits -- get bits and print decode -- return: (unsigned long) value */ // out text and values without CR/LF u_long outBit_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen) { u_long value; value = getBits(buf,0,startbit,bitlen); if (bitlen <= 8) { out_SB (verbosity,text,(int)value); } else if (bitlen <= 16) { out_SW (verbosity,text,(int)value); } else if (bitlen <= 24) { out_ST (verbosity,text,(int)value); } else { out_SL (verbosity,text,value); } return value; } // out text and values u_long outBit_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen) { u_long value; value = outBit_Sx (verbosity,text,buf,startbit,bitlen); out_NL (verbosity); return value; } // out text, values and string related to value (string table function) u_long outBit_S2x_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen, char *(*f)(u_long) ) { u_long value; value = getBits(buf,0,startbit,bitlen); if (bitlen <= 8) { out_S2B_NL (verbosity,text,(int)value, (*f)(value)); } else if (bitlen <= 16) { out_S2W_NL (verbosity,text,(int)value, (*f)(value)); } else if (bitlen <= 24) { out_S2T_NL (verbosity,text,(int)value, (*f)(value)); } else { out_S2L_NL (verbosity,text, value, (*f)(value)); } return value; } // out text, values and text2 u_long outBit_S2Tx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen, const char *text2 ) { u_long value; value = getBits(buf,0,startbit,bitlen); if (bitlen <= 8) { out_S2B_NL (verbosity,text,(int)value, text2); } else if (bitlen <= 16) { out_S2W_NL (verbosity,text,(int)value, text2); } else if (bitlen <= 24) { out_S2T_NL (verbosity,text,(int)value, text2); } else { out_S2L_NL (verbosity,text, value, text2); } return value; } /* -- same for bitlen > 32 -- return unsigned long long */ unsigned long long outBit64_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen) { unsigned long long value; if (bitlen <= 48) { value = getBits48 (buf,0,startbit,bitlen); out_SLL (verbosity,text,(int)value); } else { value = getBits64 (buf,0,startbit,bitlen); out_SLL (verbosity,text,value); } return value; } unsigned long long outBit64_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen) { unsigned long long value; value = outBit64_Sx (verbosity,text,buf,startbit,bitlen); out_NL (verbosity); return value; } /* ----------------------------------------------------------------------------------- */ /* -- get bits out of buffer (max 32 bit!!!) -- return: value $$$ TODO to be performance optimized!! */ //unsigned long XXgetBits (u_char *buf, int byte_offset, int startbit, int bitlen) //{ // u_char *b; // unsigned long v; // unsigned long mask; // unsigned long tmp_long; // // // b = &buf[byte_offset + (startbit / 8)]; // startbit %= 8; // // if (bitlen > 24) { // // -- 24..32 bit // return (unsigned long) getBits48 (b, 0, startbit, bitlen); // } // // // -- safe is 24 bitlen // tmp_long = (unsigned long)( // (*(b )<<24) + (*(b+1)<<16) + // (*(b+2)<< 8) + *(b+3) ); // // startbit = 32 - startbit - bitlen; // // tmp_long = tmp_long >> startbit; // mask = (1ULL << bitlen) - 1; // 1ULL !!! // v = tmp_long & mask; // // return v; //} /* -- get bits out of buffer (max 32 bit!!!) -- return: value */ unsigned long getBits (u_char *buf, int byte_offset, int startbit, int bitlen) { u_char *b; unsigned long v; unsigned long mask; unsigned long tmp_long; int bitHigh; b = &buf[byte_offset + (startbit >> 3)]; startbit %= 8; switch ((bitlen-1) >> 3) { case -1: // -- <=0 bits: always 0 return 0L; break; case 0: // -- 1..8 bit tmp_long = (unsigned long)( (*(b )<< 8) + *(b+1) ); bitHigh = 16; break; case 1: // -- 9..16 bit tmp_long = (unsigned long)( (*(b )<<16) + (*(b+1)<< 8) + *(b+2) ); bitHigh = 24; break; case 2: // -- 17..24 bit tmp_long = (unsigned long)( (*(b )<<24) + (*(b+1)<<16) + (*(b+2)<< 8) + *(b+3) ); bitHigh = 32; break; case 3: // -- 25..32 bit // -- to be safe, we need 32+8 bit as shift range return (unsigned long) getBits48 (b, 0, startbit, bitlen); break; default: // -- 33.. bits: fail, deliver constant fail value out_nl (1," Error: getBits() request out of bound!!!! (report!!) \n"); return (unsigned long) 0xFEFEFEFE; break; } startbit = bitHigh - startbit - bitlen; tmp_long = tmp_long >> startbit; mask = (1ULL << bitlen) - 1; // 1ULL !!! v = tmp_long & mask; return v; } /* -- get bits out of buffer (max 48 bit) -- extended bitrange, so it's slower -- return: value */ long long getBits48 (u_char *buf, int byte_offset, int startbit, int bitlen) { u_char *b; unsigned long long v; unsigned long long mask; unsigned long long tmp; if (bitlen > 48) { out_nl (1," Error: getBits48() request out of bound!!!! (report!!) \n"); return 0xFEFEFEFEFEFEFEFELL; } b = &buf[byte_offset + (startbit / 8)]; startbit %= 8; // -- safe is 48 bitlen tmp = (unsigned long long)( ((unsigned long long)*(b )<<48) + ((unsigned long long)*(b+1)<<40) + ((unsigned long long)*(b+2)<<32) + ((unsigned long long)*(b+3)<<24) + (*(b+4)<<16) + (*(b+5)<< 8) + *(b+6) ); startbit = 56 - startbit - bitlen; tmp = tmp >> startbit; mask = (1ULL << bitlen) - 1; // 1ULL !!! v = tmp & mask; return v; } /* -- get bits out of buffer (max 64 bit) -- extended bitrange, so it's slower -- return: value */ unsigned long long getBits64 (u_char *buf, int byte_offset, int startbit, int bitlen) { unsigned long long x1,x2,x3; if (bitlen <= 32) { x3 = getBits (buf,byte_offset,startbit,bitlen); } else { x1 = getBits (buf,byte_offset,startbit,32); x2 = getBits (buf,byte_offset,startbit+32,bitlen-32); x3 = (x1<<(bitlen-32)) + x2; } return x3; } /* ----------------------------------------------------------------------------------- */ /* -- get ISO 639 (3char) language code into string[4] -- terminate string with \0 -- return ptr to buf; */ u_char *getISO639_3 (u_char *str, u_char *buf) { int i; strncpy ((char *) str, (char *)buf, 3); *(str+3) = '\0'; // secure print of string for (i=0; i<3; i++) { if (!isprint(*(str+i))) { *(str+i) = '.'; } } return str; } /* ----------------------------------------------------------------------------------- */ /* -- print_text_468A -- ETSI EN 300 468 Annex A -- evaluate string and look on DVB control codes -- print the string */ static void print_text2_468A (int v, u_char *b, u_int len); void print_text_468A (int v, const char *s, u_char *b, u_int len) { out (v, s); if (len <= 0) { out_nl (v,"\"\""); } else { out (v,"\""); print_text2_468A (v, b,len); out (v,"\""); out_nl (v," -- Charset: %s", dvbstrTextCharset_TYPE (*b)); } } static void print_text2_468A (int v, u_char *b, u_int len) { int in_emphasis = 0; int i; u_char c; u_char em_ON = 0x86; u_char em_OFF = 0x87; for (i=0; i"); continue; } if (c == em_OFF) { in_emphasis = 0; out (v,""); continue; } if (c == 0x8A) out (v, "
"); else if (c < 0x20) out (v, "."); else out (v, "%c", c); } // for } /* -- print_text_UTF8 -- print the string using UTF8 -- (use std_ascii) */ void print_text_UTF8 (int v, const char *s, u_char *b, u_int len) { print_std_ascii (v, s, b, len); } /* -- print standard ascii text */ void print_std_ascii (int v, const char *s, u_char *b, u_int len) { int i; u_char c; out (v,"%s\"",s); for (i=0; i 0) { long y,m,d ,k; // algo: ETSI EN 300 468 - ANNEX C y = (long) ((mjd - 15078.2) / 365.25); m = (long) ((mjd - 14956.1 - (long)(y * 365.25) ) / 30.6001); d = (long) (mjd - 14956 - (long)(y * 365.25) - (long)(m * 30.6001)); k = (m == 14 || m == 15) ? 1 : 0; y = y + k + 1900; m = m - 1 - k*12; out (v, "%02d-%02d-%02d",y,m,d); } } static void _print_time_utc (int v, u_long utc) { out (v, "%02lx:%02lx:%02lx (UTC)", (utc>>16) &0xFF, (utc>>8) &0xFF, (utc) &0xFF); } void print_time_mjd (int v, u_long mjd) { out (v, "0x%04lx [= ",mjd); _print_time_mjd (v, mjd); out (v,"]"); } void print_time_utc (int v, u_long utc) { out (v, "0x%06lx [= ",utc); _print_time_utc (v, utc); out (v,"]"); } void print_time40 (int v, u_long mjd, u_long utc) { out (v, "0x%lx%06lx [= ",mjd, utc); _print_time_mjd (v, mjd); out (v," "); _print_time_utc (v, utc); out (v,"]"); } /* -- print 90kHz timebase -- 33 bit z.B. xTS */ void print_timebase90kHz (int v, long long time90kHz) { long long ull = time90kHz; int h,m,s,u; u_long p = ull/9; // -- following lines basically taken from "dvbtextsubs Dave Chapman" h=(p/(10000L*60*60)); m=(p/(10000L*60))-(h*60); s=(p/10000L)-(h*3600)-(m*60); u=p-(h*10000L*60*60)-(m*10000L*60)-(s*10000L); out (v,"%llu (0x%08llx)", ull,ull); out (v," [= 90 kHz-Timestamp: %d:%02d:%02d.%04d]", h,m,s,u); } /* -- print PCR timebase, 27 MHz */ void print_pcr_time (int v, long long time90kHz, int ext_27MHz) { long long ull = time90kHz * 300 + ext_27MHz; int h,m,s; long u; long long p = ull/27; long long fa = 1000000; // -- following lines basically taken from "dvbtextsubs Dave Chapman" h=(p/(fa*60*60)); m=(p/(fa*60))-(h*60); s=(p/fa)-(h*3600)-(m*60); u=p-(h*fa*60*60)-(m*fa*60)-(s*fa); out (v,"%llu (0x%08llx)", ull,ull); out (v," [= PCR-Timestamp: %d:%02d:%02d.%06ld]", h,m,s,u); } /* -- print data bytes (str + hexdump) -- print "Private Data" and Hex-Dump */ void print_databytes (int v, const char *str, u_char *b, u_int len) { if (len > 0) { out_nl (v,str); indent (+1); printhex_buf (v+1,b,len); indent (-1); } } void print_private_data (int v, u_char *b, u_int len) { print_databytes (v,"Private Data:",b,len); } void print_databytes_line (int v, const char *str, u_char *b, u_int len) { if (len > 0) { out (v,"%s ",str); printhexline_buf (v+1,b,len); } } /* -- print Bit Matrix x * y -- print Hex-Value and Bit-String -- Matrix may start at any bit position -- x <= 64 bits !! */ void print_BitMatrix (int v, char *str, u_char *b, int bitoffset, int matrix_x, int matrix_y) { unsigned long long c; int i; if (matrix_x <= 0 || matrix_y <= 0) return; out_nl (v,"%s (%d x %d)",str,matrix_x,matrix_y); indent (1); while (matrix_y-- > 0) { if (matrix_x <= 32) { c = outBit_Sx (v, "", b, bitoffset , matrix_x); } else { c = outBit64_Sx (v, "", b, bitoffset , matrix_x); } out (v," [= "); i = matrix_x; while (--i >= 0) { out (v, (c & 1<0 = count filter bytes */ int str2barray (char *s, u_char *barray, int max_len) { int i = 0; long v; int base = 10; char *endptr = NULL; if (!s) s = ""; // -- get base if (*s == '0') { base = 8; // octal if (*s && *(s+1) == 'x') base = 16; // hex } while (1) { if ( i >= max_len) break; v = strtol (s, &endptr, base); if ( v < 0 || v > 0xFF) return -1; if (s == endptr) return -1; // illegal char... barray[i++] = v; if (! *endptr) break; // end of string s = endptr + 1; } return i; } /* -- latitude coordinates (Cell Descriptors) -- longitude coordinates (Cell Descriptors) -- ETSI EN 300 468 */ static char *_str_cell_latitude_longitude (long ll, int angle); char *str_cell_latitude (long latitude) { // cell_latitude: This 16-bit field, coded as a two's complement number, // shall specify the latitude of the corner of a spherical rectangle that // approximately describes the coverage area of the cell indicated. It shall // be calculated by multiplying the value of the latitude field by // (90 ° /2^15 ). Southern latitudes shall be considered negative and // northern latitudes positive. return _str_cell_latitude_longitude (latitude, 90); } char *str_cell_longitude (long longitude) { // cell_longitude: This 16-bit field, coded as a two's complement number, shall // specify the longitude of the corner of a spherical rectangle that approximately // describes the coverage area of the cell indicated. It shall be calculated by // multiplying the value of the longitude field by (180 ° /2^15 ). Western // longitudes shall be considered negative and eastern longitudes positive. return _str_cell_latitude_longitude (longitude, 180); } static char *_str_cell_latitude_longitude (long ll, int angle) { long long x; long g1,g2; static char s[40]; // $$$ not thread safe! x = (long long) ll * angle * 1000; x = x / (1<<15); g1 = x / 1000; g2 = x % 1000; if (g2 <0) g2 = 0 - g2; sprintf (s,"%ld.%03ld degree",g1,g2); return s; } /* ----------------------------------------------------------------------------------- */ /* * -- display MAC-Address format * -- input: High- and Low Word (each 24bit) */ void displ_mac_addr (int v, long mac_H24, long mac_L24) { out (v,"%02x:%02x:%02x", (mac_H24>>16) & 0xFF, (mac_H24>>8) & 0xFF, mac_H24 & 0xFF); out (v,":%02x:%02x:%02x", (mac_L24>>16) & 0xFF, (mac_L24>>8) & 0xFF, mac_L24 & 0xFF); } /* * -- display IP-Address format * -- input: IP-Addr. */ void displ_IPv4_addr (int v, u_long ip) { out (v,"%d.%d.%d.%d", (ip>>24) & 0xFF, (ip>>16) & 0xFF, (ip>>8) & 0xFF, ip & 0xFF); } struct IPv6ADDR *getIPv6Addr (u_char *b, struct IPv6ADDR *x) { x->ip[0] = getBits (b, 0, 0, 32); x->ip[1] = getBits (b, 0, 32, 32); x->ip[2] = getBits (b, 0, 64, 32); x->ip[3] = getBits (b, 0, 96, 32); return x; } /* * -- display IPv6-Address format * -- input: IPv6-Addr. */ void displ_IPv6_addr (int v, struct IPv6ADDR *a) { out (v,"%x:%x:%x:%x:%x:%x:%x:%x", (a->ip[0]>>16) & 0xFFFF, (a->ip[0]) & 0xFFFF, (a->ip[1]>>16) & 0xFFFF, (a->ip[1]) & 0xFFFF, (a->ip[2]>>16) & 0xFFFF, (a->ip[2]) & 0xFFFF, (a->ip[3]>>16) & 0xFFFF, (a->ip[3]) & 0xFFFF ); } /* ----------------------------------------------------------------------------------- */ /* * -- return a bit string for value, len bits * -- NOT thread-safe !!! $$$ */ char *str_bit32 (u_long value, int bits) { static char bitstr[65]; char *s = bitstr; if (bits > 64) bits = 64; s += bits; // reverse bit shift to get real order *s = '\0'; while (bits-- > 0) { *(--s) = (value & 0x01) ? '1' :'0'; value = value >> 1; } return bitstr; } // // // -- Length Check Helper // -- return 1: ok, 0 = len<0 // int lenCheckErrOut (int v, int len) { const char *err_str="==> Something is seriously wrong (length overrun check)!!!"; if (len < 0) { out_nl (v,err_str); return 0; } return 1; } dvbsnoop-1.4.50/src/misc/hexprint.c0000744000076400001440000000775510356276724012676 /* $Id: hexprint.c,v 1.9 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: hexprint.c,v $ Revision 1.9 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.8 2005/09/12 20:56:16 rasc Make dvbsnoop compile on Cygwin / Windows Revision 1.7 2004/03/09 20:59:23 rasc VPS decoding (someone check the NPP & PTY code output please...) Revision 1.6 2004/02/20 22:18:40 rasc DII complete (hopefully) BIOP::ModuleInfo (damned, who is spreading infos over several standards???) maybe someone give me a hint on the selector_byte info!!! some minor changes... Revision 1.5 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.4 2003/12/17 23:57:29 rasc add. hexdump mode, different layout for some purpose option: -ph 4 Revision 1.3 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.2 2001/10/06 18:19:18 Toerli Steuerzeichen entfernt. rasc wuerdest du mal bitte nen gescheiten unix-konformen Editor verwenden... windows editoren sind ungeeignet Revision 1.1 2001/09/30 13:05:20 rasc dvbsnoop v0.7 -- Commit to CVS */ #include #include #include #include #include "dvbsnoop.h" #include "hexprint.h" #include "output.h" /* -- global static data */ int HexPrintmode = 0; static void printhexdump_buf (int verbose, u_char *buf, int len); static void printhexdump2_buf (int verbose, u_char *buf, int len); /* -- print-modus setzen */ void setHexPrintMode (int i) { HexPrintmode = i; } /* - print buffer as Hex Printout */ void printhex_buf (int verbose, u_char *buf, int n) { switch (HexPrintmode) { case 0: return; break; case 1: printhexdump_buf (verbose,buf,n); break; case 2: printhexline_buf (verbose,buf,n); break; case 3: printasciiline_buf (verbose,buf,n); break; case 4: printhexdump2_buf (verbose,buf,n); break; default: printhexdump_buf (verbose,buf,n); break; } return; } /* -- multi line dump HEX+ASCII 0000: 42 f1 59 04 41 f1 00 00 00 01 ff 2e e3 ff 80 1f 0000: B . Y . A . . . . . . . . . . . */ static void printhexdump_buf (int verbose, u_char *buf, int n) { int i, j; u_char c; int WID=16; j = 0; while (j*WID < n) { out (verbose," %04x: ",j*WID); for (i=0; i= n) break; c = buf[i+j*WID]; out (verbose,"%02x ",(int)c); } out_NL (verbose); out (verbose," %04x: ",j*WID); for (i=0; i= n) break; c = buf[i+j*WID]; out (verbose," %c ",isprint((int)c) ?c:'.'); } out_NL (verbose); j++; } } /* -- single line dump HEX 42 f1 59 04 41 f1 00 00 00 01 ff 2e e3 ff 80 1f 4 */ void printhexline_buf (int verbose, u_char *buf, int n) { int i; for (i=0; i= n) break; c = buf[i+j*WID]; out (verbose,"%02x ",(int)c); if ((i+1)%8 == 0) out (verbose," "); } for (k=i; k= n) break; c = buf[i+j*WID]; out (verbose,"%c",isprint((int)c) ?c:'.'); } out_NL (verbose); j++; } } dvbsnoop-1.4.50/src/misc/output.c0000744000076400001440000000632710356276724012367 /* $Id: output.c,v 1.11 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Output Module $Log: output.c,v $ Revision 1.11 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.10 2005/09/12 20:56:16 rasc Make dvbsnoop compile on Cygwin / Windows Revision 1.9 2005/09/02 14:11:35 rasc TS code redesign, xPCR and DTS timestamps decoding Revision 1.8 2004/02/02 23:34:07 rasc - output indent changed to avoid \r (which sucks on logged output) - EBU PES data started (teletext, vps, wss, ...) - bugfix: PES synch. data stream - some other stuff Revision 1.7 2004/01/02 16:40:37 rasc DSM-CC INT/UNT descriptors complete minor changes and fixes Revision 1.6 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.5 2003/11/26 23:54:48 rasc -- bugfixes on Linkage descriptor Revision 1.4 2003/11/26 16:27:46 rasc - mpeg4 descriptors - simplified bit decoding and output function Revision 1.3 2003/07/08 19:59:50 rasc restructuring... some new, some fixes, trying to include DSM-CC, Well someone a ISO13818-6 and latest version of ISO 18313-1 to spare? */ #include #include #include #include #include #include "dvbsnoop.h" #include "output.h" /* -- Module Global Vars */ static int verbose_level = 0; static int col0 = 0; //2 static int indent_level = 0; int table_indent [] = {0,4,8,12,15,18,21,24,27,30}; #define MAX_INDENT_LEVEL ( (sizeof(table_indent)/sizeof(int)) - 1) /* -- set indent-level -- and sends a '\r' to reset indent prints - +1 = indent plus one level - -1 = unindent one level - 0 = reset to Level 0 */ void indent (int v) { if (v == 0) indent_level = 0; else indent_level += v; if (indent_level < 0) indent_level = 0; if (indent_level >= MAX_INDENT_LEVEL) indent_level = MAX_INDENT_LEVEL; //2 fputc ('\r',stdout); //2 print_indent(); // out_nl2 (0); } /* -- set verbosity level -- 0 = highest, 9 = lowest level -- print message upto (including) this verbosity level */ void setVerboseLevel (int v) { verbose_level = v; } int getVerboseLevel () { return verbose_level; } /* -- output special printf -- out_nl will append \n at the end of the output */ void out(int verbose, const char *msgfmt,...) { va_list args; if (verbose <= verbose_level) { print_indent(); //2 va_start (args,msgfmt); vfprintf (stdout, msgfmt, args); va_end (args); } } void out_nl(int verbose, const char *msgfmt,...) { va_list args; if (verbose <= verbose_level) { print_indent(); //2 va_start (args,msgfmt); vfprintf (stdout, msgfmt, args); va_end (args); out_nl2(verbose); } } /* -- just print a NL */ void out_nl2 (int verbose) { if (verbose <= verbose_level) { fputc ('\n',stdout); col0 = 1; //2 //2 print_indent(); } } void print_indent (void) { int i; if (! col0) return; //2 for (i=0; i #include static struct timeval last_tv = {0,0}; /* -- Print receive time of Packet */ static unsigned long timeval_to_ms(const struct timeval *tv) { return (tv->tv_sec * 1000) + ((tv->tv_usec + 500) / 1000); } long delta_time_ms (struct timeval *tv, struct timeval *last_tv) { return timeval_to_ms(tv) - timeval_to_ms(last_tv); } void out_receive_time (int verbose, OPTION *opt) { struct timeval tv; time_t t; long ms; char tstr[128]; switch (opt->time_mode) { case FULL_TIME: t = time (&t); strftime (tstr,sizeof(tstr)-1,"%a %Y-%m-%d %H:%M:%S", localtime(&t)); gettimeofday (&tv, NULL); out (verbose,"Time received: %s.%03ld\n", tstr, tv.tv_usec/1000 ); break; case DELTA_TIME: gettimeofday (&tv, NULL); ms = delta_time_ms(&tv, &last_tv); out (verbose,"Time (delta) received: %0ld.%03ld (sec)\n", ms / 1000, ms % 1000); last_tv.tv_sec = tv.tv_sec; last_tv.tv_usec = tv.tv_usec; break; case NO_TIME: default: break; } return; } void init_receive_time (void) { gettimeofday (&last_tv, NULL); } dvbsnoop-1.4.50/src/misc/pid_mem.c0000744000076400001440000000304510356276724012433 /* $Id: pid_mem.c,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- PID Memory for spidering PIDs $Log: pid_mem.c,v $ Revision 1.2 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2004/03/31 21:14:23 rasc New: Spider section pids (snoop referenced section pids), some minor changes */ #include "dvbsnoop.h" enum PIDMEM_STATUS { PIDMEM_UNUSED, PIDMEM_STORED, PIDMEM_ISUSED }; static int pidMEM[MAX_PID+1]; void init_PidMemory (void) { int i; for (i=0; i <= MAX_PID; i++) { pidMEM[i] = PIDMEM_UNUSED; } } /* -- store a pid in PID Memory -- return: 1: stored, 0 = already in mem or illegal */ int store_PidToMem (int pid) { if (pid >= 0 && pid <= MAX_PID) { if (pidMEM[pid] == PIDMEM_UNUSED) { pidMEM[pid] = PIDMEM_STORED; return 1; } } return 0; } /* -- get a Pid from PID Memory -- return: or INVALID_PID = no more PIDs */ int get_UnusedPidFromMem (void) { int i; for (i=0; i <= MAX_PID; i++) { if (pidMEM[i] == PIDMEM_STORED) { return i; } } return INVALID_PID; } /* -- mark Pid in PID Memory as retrieved... */ void mark_PidMem_as_used (int pid) { if (pid >= 0 && pid <= MAX_PID) { pidMEM[pid] = PIDMEM_ISUSED; } return; } // $$$TODO // // Future version may store stream type to distinguish between SECTION & PES // --> Spider may also spider to PES streams // dvbsnoop-1.4.50/src/misc/packet_mem.c0000744000076400001440000000576010356276724013134 /* $Id: packet_mem.c,v 1.4 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de -- Collect packet data buffer/memory $Log: packet_mem.c,v $ Revision 1.4 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.3 2005/09/12 20:56:16 rasc Make dvbsnoop compile on Cygwin / Windows Revision 1.2 2005/09/06 23:13:51 rasc catch OS signals (kill ...) for smooth program termination Revision 1.1 2004/04/15 03:40:39 rasc new: TransportStream sub-decoding (ts2PES, ts2SEC) [-tssubdecode] checks for continuity errors, etc. and decode in TS enclosed sections/pes packets */ #include #include #include "dvbsnoop.h" typedef struct _PACKET_MEM_DATA { u_char *buf; u_long max_length; // requested mem length u_long length; // current length and next_add_pos; } PACKET_MD; static PACKET_MD pmd[] = { { NULL, 0UL, 0UL }, { NULL, 0UL, 0UL }, { NULL, 0UL, 0UL }, { NULL, 0UL, 0UL } }; // // -- acquire and initialize packet storage // -- return: handle or -1 (no avail) // int packetMem_acquire (u_long requested_length) { int i; // -- is a handle available? for (i=0; i= 0) && (handle < sizeof(pmd)/sizeof(PACKET_MD)) ) { free (pmd[handle].buf); pmd[handle].buf = NULL; pmd[handle].max_length = 0; pmd[handle].length = 0; } } // // -- clear packet storage for reusage // void packetMem_clear (int handle) { if ( (handle >= 0) && (handle < sizeof(pmd)/sizeof(PACKET_MD)) ) { pmd[handle].length = 0; } } // // -- packet storage has data // -- return: length or 0 // u_long packetMem_length (int handle) { if ( (handle >= 0) && (handle < sizeof(pmd)/sizeof(PACKET_MD)) ) { return pmd[handle].length; } return 0; } // // -- packet storage buffer start // -- return: bufferstart or NULL // u_char *packetMem_buffer_start (int handle) { if ( (handle >= 0) && (handle < sizeof(pmd)/sizeof(PACKET_MD)) ) { return pmd[handle].buf; } return NULL; } // // -- add data to packet storage // -- copies data to packet storage // -- return 1: ok 0: fail (illegal handle, no mem, out of storage, etc.) // int packetMem_add_data (int handle, u_char *buf, u_long len) { u_long l; if ( (handle >= 0) && (handle < sizeof(pmd)/sizeof(PACKET_MD)) ) { l = pmd[handle].length + len; if (pmd[handle].buf && (l < pmd[handle].max_length)) { if (buf && len) { memcpy (pmd[handle].buf+pmd[handle].length , buf, len); pmd[handle].length += len; return 1; } } } return 0; } dvbsnoop-1.4.50/src/misc/print_header.c0000744000076400001440000000431010356276724013461 /* $Id: print_header.c,v 1.7 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) $Log: print_header.c,v $ Revision 1.7 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.6 2005/10/20 22:25:07 rasc - Bugfix: tssubdecode check for PUSI and SI pointer offset still losing packets, when multiple sections in one TS packet. - Changed: some Code rewrite - Changed: obsolete option -nosync, do always packet sync Revision 1.5 2005/09/12 20:56:16 rasc Make dvbsnoop compile on Cygwin / Windows Revision 1.4 2004/11/16 23:02:50 rasc cmd option "-tsraw" for full/raw TS read (if supported by hard-/firmware) Revision 1.3 2004/10/12 20:37:48 rasc - Changed: TS pid filtering from file, behavior changed - New: new cmdline option -maxdmx (replaces -f using pidscan) - misc. changes Revision 1.2 2004/01/01 20:09:26 rasc DSM-CC INT/UNT descriptors PES-sync changed, TS sync changed, descriptor scope other changes Revision 1.1 2003/12/28 14:00:27 rasc bugfix: section read from input file some changes on packet header output */ #include #include "dvbsnoop.h" #include "print_header.h" #include "misc/cmdline.h" #include "misc/output.h" #include "misc/pkt_time.h" void print_packet_header (OPTION *opt, char *packetTyp, u_int pid, int count, int length) { char str[50]; char *s; if (pid != DUMMY_PID) { sprintf (str,"%u (0x%04x)",pid,pid); s = str; } else { s = "(Unkown PID)"; } // Full Transport Stream Read? if (opt->ts_raw_mode && (opt->packet_mode == TS)) { s = "(Full TS read)"; } out_nl (1,"\n------------------------------------------------------------"); out_nl (1,"%s-Packet: %08ld PID: %s, Length: %d (0x%04x)", packetTyp, count, s, length,length); if (opt->inpPidFile) { out_nl (1,"from file: %s",opt->inpPidFile); } else { out_receive_time (1, opt); } // if (skipped_bytes) { // out_nl (1,"Syncing %s... (%ld bytes skipped)", // packetTyp,skipped_bytes); // } out_nl (1,"------------------------------------------------------------"); } dvbsnoop-1.4.50/src/misc/crc32.c0000744000076400001440000000713410356276724011740 /* $Id: crc32.c,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Code Module CRC32 taken von linuxtv.org */ #include #include "crc32.h" // CRC32 lookup table for polynomial 0x04c11db7 static u_long crc_table[256] = { 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050, 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9, 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4}; u_long crc32 (char *data, int len) { register int i; u_long crc = 0xffffffff; for (i=0; i> 24) ^ *data++) & 0xff]; return crc; } dvbsnoop-1.4.50/src/misc/sig_abort.c0000744000076400001440000000451210356276724012772 /* $Id: sig_abort.c,v 1.2 2006/01/02 18:24:04 rasc Exp $ DVBSNOOP a dvb sniffer and mpeg2 stream analyzer tool http://dvbsnoop.sourceforge.net/ (c) 2001-2006 Rainer.Scherg@gmx.de (rasc) -- Handle Kill/Interrupt Signals from User/OS -- (e.g. Kill -1) $Log: sig_abort.c,v $ Revision 1.2 2006/01/02 18:24:04 rasc just update copyright and prepare for a new public tar ball Revision 1.1 2005/09/06 23:39:04 rasc catch OS signals (kill ...) for smooth program termination */ #include #include #include "sig_abort.h" // // -- Module Global Vars // static void SmoothHandler (int sig_nr); static void AbortHandler (int sig_nr); static void NullHandler (int sig_nr); // catch these signals static struct { int sig; void (*new_handler)(); void (*org_handler)(); } signalList[] = { { SIGHUP, SmoothHandler, NullHandler }, // -1 terminate smoothly { SIGQUIT, SmoothHandler, NullHandler }, // -3 terminate smoothly { SIGABRT, AbortHandler, NullHandler }, // -6 terminate at once { SIGTERM, SmoothHandler, NullHandler } // -15 terminate smoothly }; #define SignalListSize (sizeof(signalList) / sizeof(signalList[0])) static int hasSignal = 0; // no Signal by default received // // -- init OS Signal Handler // -- Set Signals to catch and handler functions // void initOSSigHandler (void) { int i; for (i=0; i < SignalListSize; i++) { signalList[i].org_handler = signal(signalList[i].sig, signalList[i].new_handler); } hasSignal = 0; } // // -- restore OS Signal Handler // -- Set Signals and handler functions prior to dvbsnoop execution // void restoreOSSigHandler (void) { int i; for (i=0; i < SignalListSize; i++) { if (signalList[i].org_handler != SIG_ERR) { signal(signalList[i].sig, signalList[i].org_handler); } } } // // -- check if Abort is Signaled to Program // int isSigAbort (void) { return hasSignal; } // // -- The Signal Handler Routines // // // -- to be checked via isSigAbort() // static void SmoothHandler (int sig_nr) { hasSignal = sig_nr; } // // -- Abort NOW by program... // -- exit () should flush buffers // static void AbortHandler (int sig_nr) { hasSignal = sig_nr; restoreOSSigHandler(); exit (sig_nr); } // // -- dummy // static void NullHandler (int sig_nr) { return; }