2006-10-03 17:24:28 +00:00
|
|
|
/*
|
|
|
|
* packet-h248-annex_e.c
|
|
|
|
* H.248 Annex E
|
|
|
|
*
|
|
|
|
* (c) 2006, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
|
|
|
|
*
|
2006-10-10 07:35:47 +00:00
|
|
|
* $Id$
|
2006-10-03 17:24:28 +00:00
|
|
|
*
|
2007-01-02 14:11:35 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
2007-01-02 17:19:25 +00:00
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2006-10-03 17:24:28 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "packet-h248.h"
|
|
|
|
#define PNAME "H.248 Annex E"
|
|
|
|
#define PSNAME "H248E"
|
|
|
|
#define PFNAME "h248e"
|
2006-10-04 15:31:31 +00:00
|
|
|
/*
|
|
|
|
#include <epan/dissectors/packet-alcap.h>
|
|
|
|
*/
|
2006-10-03 17:24:28 +00:00
|
|
|
static int proto_h248_annex_E = -1;
|
|
|
|
|
2007-01-30 06:16:39 +00:00
|
|
|
static gboolean implicit = TRUE;
|
|
|
|
|
2006-10-03 17:24:28 +00:00
|
|
|
/* H.248.1 E.1 Generic Package */
|
|
|
|
static int hf_h248_pkg_generic = -1;
|
|
|
|
static int hf_h248_pkg_generic_cause_evt = -1;
|
|
|
|
static int hf_h248_pkg_generic_cause_gencause = -1;
|
|
|
|
static int hf_h248_pkg_generic_cause_failurecause = -1;
|
2007-03-03 16:36:19 +00:00
|
|
|
static int hf_h248_pkg_generic_sc_evt = -1;
|
|
|
|
static int hf_h248_pkg_generic_sc_sig_id = -1;
|
|
|
|
static int hf_h248_pkg_generic_sc_meth = -1;
|
|
|
|
static int hf_h248_pkg_generic_sc_slid = -1;
|
|
|
|
static int hf_h248_pkg_generic_sc_rid = -1;
|
2006-10-03 17:24:28 +00:00
|
|
|
|
|
|
|
static gint ett_h248_pkg_generic_cause_evt = -1;
|
|
|
|
static gint ett_h248_pkg_generic = -1;
|
2007-03-03 16:36:19 +00:00
|
|
|
static int ett_h248_pkg_generic_sc_evt = -1;
|
2006-10-03 17:24:28 +00:00
|
|
|
|
2007-02-23 20:57:22 +00:00
|
|
|
static const value_string h248_pkg_generic_cause_vals[] = {
|
|
|
|
{1, "gencause"},
|
|
|
|
{2, "failurecause"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string h248_pkg_generic_evt_vals[] = {
|
2007-03-03 16:36:19 +00:00
|
|
|
{1, "Cause"},
|
|
|
|
{2, "Signal Completion"},
|
2007-02-23 20:57:22 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2006-10-18 05:45:52 +00:00
|
|
|
static const value_string h248_pkg_generic_cause_gencause_vals[] = {
|
|
|
|
{ 1, "NR (Normal Release)"},
|
|
|
|
{ 2, "UR (Unavailable Resources)"},
|
|
|
|
{ 3, "FT (Failure, Temporary)"},
|
|
|
|
{ 4, "FP (Failure, Permanent)"},
|
|
|
|
{ 5, "IW (Interworking Error)"},
|
|
|
|
{ 6, "UN (Unsupported)"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2006-10-03 17:24:28 +00:00
|
|
|
|
|
|
|
static h248_pkg_param_t h248_pkg_generic_cause_evt_params[] = {
|
2007-01-30 06:16:39 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_generic_cause_gencause, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0002, &hf_h248_pkg_generic_cause_failurecause, h248_param_ber_octetstring, &implicit },
|
2006-10-03 17:24:28 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2007-03-03 16:36:19 +00:00
|
|
|
static const value_string h248_pkg_generic_sc_meth_vals[] = {
|
|
|
|
{0x0001,"SigID"},
|
|
|
|
{0x0002,"Meth"},
|
|
|
|
{0x0003,"SLID"},
|
|
|
|
{0x0004,"RID"},
|
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string h248_pkg_generic_sc_vals[] = {
|
|
|
|
{0x0001,"TO - Signal timed out or otherwise completed on its own"},
|
|
|
|
{0x0002,"EV - Interrupted by event"},
|
|
|
|
{0x0003,"SD - Halted by new Signals Descriptor"},
|
|
|
|
{0x0004,"NC - Not completed, other cause"},
|
|
|
|
{0x0005,"PI - First to penultimate iteration"},
|
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static h248_pkg_param_t h248_pkg_generic_sc_evt_params[] = {
|
|
|
|
{ 0x0001, &hf_h248_pkg_generic_sc_sig_id, h248_param_PkgdName, NULL },
|
|
|
|
{ 0x0002, &hf_h248_pkg_generic_sc_meth, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0003, &hf_h248_pkg_generic_sc_slid, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0004, &hf_h248_pkg_generic_sc_rid, h248_param_ber_integer, NULL },
|
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2006-10-03 17:24:28 +00:00
|
|
|
static h248_pkg_evt_t h248_pkg_generic_cause_evts[] = {
|
2007-02-23 20:57:22 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_generic_cause_evt, &ett_h248_pkg_generic_cause_evt, h248_pkg_generic_cause_evt_params, h248_pkg_generic_cause_gencause_vals},
|
2007-03-03 16:36:19 +00:00
|
|
|
{ 0x0002, &hf_h248_pkg_generic_sc_evt, &ett_h248_pkg_generic_sc_evt, h248_pkg_generic_sc_evt_params, h248_pkg_generic_sc_vals},
|
2007-02-23 20:57:22 +00:00
|
|
|
{ 0, NULL, NULL, NULL, NULL}
|
2006-10-03 17:24:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static h248_package_t h248_pkg_generic = {
|
|
|
|
0x0001,
|
|
|
|
&hf_h248_pkg_generic,
|
|
|
|
&ett_h248_pkg_generic,
|
|
|
|
NULL,
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL,
|
2007-02-23 20:57:22 +00:00
|
|
|
h248_pkg_generic_evt_vals,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-10-04 22:43:38 +00:00
|
|
|
h248_pkg_generic_cause_evts,
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL
|
2006-10-03 17:24:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-03-03 16:36:19 +00:00
|
|
|
/* H.248.1 E.2 Base Root Package
|
2006-10-03 17:24:28 +00:00
|
|
|
static int hf_h248_pkg_root = -1;
|
|
|
|
static int hf_h248_pkg_root_params = -1;
|
|
|
|
static int hf_h248_pkg_root_maxnrofctx = -1;
|
|
|
|
static int hf_h248_pkg_root_maxtermsperctx = -1;
|
|
|
|
static int hf_h248_pkg_root_normalmgexectime = -1;
|
|
|
|
static int hf_h248_pkg_root_normalmgcexecutiontime = -1;
|
|
|
|
static int hf_h248_pkg_root_provisionalresponsetimervalue = -1;
|
|
|
|
|
|
|
|
static gint ett_h248_pkg_root = -1;
|
|
|
|
|
|
|
|
static h248_pkg_param_t h248_pkg_root_properties[] = {
|
2007-01-30 06:16:39 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_root_maxnrofctx, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0002, &hf_h248_pkg_root_maxtermsperctx, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0003, &hf_h248_pkg_root_normalmgexectime, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0004, &hf_h248_pkg_root_normalmgcexecutiontime, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0005, &hf_h248_pkg_root_provisionalresponsetimervalue, h248_param_ber_integer, &implicit },
|
2006-10-03 17:24:28 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static h248_package_t h248_pkg_root = {
|
|
|
|
0x0002,
|
|
|
|
&hf_h248_pkg_root,
|
|
|
|
&hf_h248_pkg_root_params,
|
|
|
|
&ett_h248_pkg_root,
|
2007-03-03 16:36:19 +00:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-10-03 17:24:28 +00:00
|
|
|
h248_pkg_root_properties,
|
|
|
|
NULL,
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-10-03 17:24:28 +00:00
|
|
|
NULL
|
|
|
|
};
|
2007-03-03 16:36:19 +00:00
|
|
|
/**/
|
2006-10-03 17:24:28 +00:00
|
|
|
|
|
|
|
/* H.248.1 E.3 Tone Generator Package
|
|
|
|
static int hf_h248_pkg_tonegen = -1;
|
|
|
|
static int hf_h248_pkg_tonegen_params = -1;
|
|
|
|
static int hf_h248_pkg_tonegen_sig_pt = -1;
|
|
|
|
static int hf_h248_pkg_tonegen_sig_pt_tl = -1;
|
|
|
|
static int hf_h248_pkg_tonegen_sig_pt_ind = -1;
|
|
|
|
|
|
|
|
static gint ett_h248_pkg_tonegen = -1;
|
|
|
|
|
|
|
|
static h248_pkg_param_t hf_h248_pkg_tonegen_properties[] = {
|
2007-01-30 06:16:39 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_tonegen_sig_pt_tl, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0002, &hf_h248_pkg_tonegen_sig_pt_ind, h248_param_ber_integer, &implicit },
|
2006-10-03 17:24:28 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static h248_package_t h248_pkg_tonegen = {
|
|
|
|
0x0002,
|
|
|
|
&hf_h248_pkg_tonegen,
|
|
|
|
&hf_h248_pkg_tonegen_params,
|
|
|
|
&ett_h248_pkg_tonegen,
|
|
|
|
h248_pkg_root_properties,
|
|
|
|
NULL,
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL,
|
2006-10-03 17:24:28 +00:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* H.248.1 E.4 Tone Detector Package
|
|
|
|
static int hf_h248_pkg_tonedet = -1;
|
|
|
|
static int hf_h248_pkg_tonedet_evt_std = -1;
|
|
|
|
static int hf_h248_pkg_tonedet_evt_etd = -1;
|
|
|
|
static int hf_h248_pkg_tonedet_evt_ltd = -1;
|
|
|
|
*/
|
2006-10-10 07:35:47 +00:00
|
|
|
|
2006-10-18 05:45:52 +00:00
|
|
|
/* E.5 Basic DTMF Generator Package */
|
|
|
|
static int hf_h248_pkg_dg = -1;
|
|
|
|
static int hf_h248_pkg_dg_sig_d0 = -1;
|
|
|
|
static int hf_h248_pkg_dg_sig_d1 = -1;
|
|
|
|
static int hf_h248_pkg_dg_sig_d2 = -1;
|
|
|
|
static int hf_h248_pkg_dg_sig_d3 = -1;
|
|
|
|
|
|
|
|
static gint ett_h248_pkg_dg = -1;
|
|
|
|
static gint ett_h248_pkg_dg_sig_d0 = -1;
|
|
|
|
static gint ett_h248_pkg_dg_sig_d1 = -1;
|
|
|
|
static gint ett_h248_pkg_dg_sig_d2 = -1;
|
|
|
|
static gint ett_h248_pkg_dg_sig_d3 = -1;
|
|
|
|
|
2007-02-23 20:57:22 +00:00
|
|
|
static const value_string h248_pkg_dg_signals_vals[] = {
|
|
|
|
{ 0x0010, "d0"},
|
|
|
|
{ 0x0011, "d1"},
|
|
|
|
{ 0x0012, "d2"},
|
|
|
|
{ 0x0013, "d3"},
|
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
2006-10-18 05:45:52 +00:00
|
|
|
/* Signals defenitions */
|
|
|
|
static h248_pkg_sig_t h248_pkg_dg_signals[] = {
|
2007-02-23 20:57:22 +00:00
|
|
|
{ 0x0010, &hf_h248_pkg_dg_sig_d0, &ett_h248_pkg_dg_sig_d0, NULL, NULL },
|
|
|
|
{ 0x0011, &hf_h248_pkg_dg_sig_d1, &ett_h248_pkg_dg_sig_d1, NULL, NULL },
|
|
|
|
{ 0x0012, &hf_h248_pkg_dg_sig_d2, &ett_h248_pkg_dg_sig_d2, NULL, NULL },
|
|
|
|
{ 0x0013, &hf_h248_pkg_dg_sig_d3, &ett_h248_pkg_dg_sig_d3, NULL, NULL },
|
2006-10-18 05:45:52 +00:00
|
|
|
/* TODO add the rest of the signals */
|
|
|
|
|
2007-02-23 20:57:22 +00:00
|
|
|
{ 0, NULL, NULL, NULL, NULL}
|
2006-10-18 05:45:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Packet defenitions */
|
|
|
|
static h248_package_t h248_pkg_dg = {
|
|
|
|
0x0005,
|
|
|
|
&hf_h248_pkg_dg,
|
|
|
|
&ett_h248_pkg_dg,
|
2007-02-23 20:57:22 +00:00
|
|
|
NULL,
|
|
|
|
h248_pkg_dg_signals_vals,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-10-18 05:45:52 +00:00
|
|
|
NULL, /* Properties */
|
|
|
|
h248_pkg_dg_signals, /* signals */
|
|
|
|
NULL, /* events */
|
|
|
|
NULL /* statistics */
|
|
|
|
};
|
|
|
|
|
2007-03-03 16:36:19 +00:00
|
|
|
|
2006-10-10 07:35:47 +00:00
|
|
|
/* H.248.1 E.9 Analog Line Supervision Package */
|
|
|
|
static int hf_h248_pkg_al = -1;
|
|
|
|
static int hf_h248_pkg_al_evt_onhook = -1;
|
|
|
|
static int hf_h248_pkg_al_evt_offhook = -1;
|
|
|
|
static int hf_h248_pkg_al_evt_flashhook = -1;
|
|
|
|
static int hf_h248_pkg_al_evt_onhook_par_strict = -1;
|
2006-10-15 22:11:26 +00:00
|
|
|
static int hf_h248_pkg_al_evt_offhook_par_strict = -1;
|
2006-10-10 07:35:47 +00:00
|
|
|
static int hf_h248_pkg_al_evt_onhook_par_init = -1;
|
2006-10-15 22:11:26 +00:00
|
|
|
static int hf_h248_pkg_al_evt_offhook_par_init = -1;
|
2006-10-10 07:35:47 +00:00
|
|
|
static int hf_h248_pkg_al_evt_flashhook_par_mindur = -1;
|
|
|
|
|
|
|
|
static gint ett_h248_pkg_al = -1;
|
|
|
|
static gint ett_h248_pkg_al_evt_onhook = -1;
|
|
|
|
static gint ett_h248_pkg_al_evt_offhook = -1;
|
|
|
|
static gint ett_h248_pkg_al_evt_flashhook = -1;
|
|
|
|
|
2007-02-23 20:57:22 +00:00
|
|
|
|
|
|
|
static const value_string h248_pkg_al_evt_onhook_params_vals[] = {
|
|
|
|
{ 0x0001, "strict"},
|
|
|
|
{ 0x0002, "init"},
|
|
|
|
{ 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string h248_pkg_al_evt_flashhook_params_vals[] = {
|
|
|
|
{ 0x0001, "mindur"},
|
|
|
|
{ 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string h248_pkg_al_evts_vals[] = {
|
|
|
|
{ 0x0004, "onhook"},
|
|
|
|
{ 0x0005, "offhook"},
|
|
|
|
{ 0x0006, "flashhook"},
|
|
|
|
{ 0, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-10 07:35:47 +00:00
|
|
|
/* Events defenitions */
|
|
|
|
static const value_string h248_pkg_al_evt_onhook_strict_vals[] = {
|
|
|
|
{ 0, "exact"},
|
|
|
|
{ 1, "state"},
|
|
|
|
{ 2, "failWrong"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const true_false_string h248_pkg_al_evt_onhook_par_init_vals = {
|
2006-10-15 22:11:26 +00:00
|
|
|
"already on-hook",
|
|
|
|
"actual state transition to on-hook"
|
|
|
|
};
|
|
|
|
|
|
|
|
static const true_false_string h248_pkg_al_evt_offhook_par_init_vals = {
|
2006-10-10 07:35:47 +00:00
|
|
|
"already off-hook",
|
|
|
|
"actual state transition to off-hook"
|
|
|
|
};
|
|
|
|
|
|
|
|
static h248_pkg_param_t h248_pkg_al_evt_onhook_params[] = {
|
2007-01-30 06:16:39 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_al_evt_onhook_par_strict, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0002, &hf_h248_pkg_al_evt_onhook_par_init, h248_param_ber_boolean, &implicit },
|
2006-10-10 07:35:47 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2006-10-15 22:11:26 +00:00
|
|
|
static h248_pkg_param_t h248_pkg_al_evt_offhook_params[] = {
|
2007-01-30 06:16:39 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_al_evt_offhook_par_strict, h248_param_ber_integer, &implicit },
|
|
|
|
{ 0x0002, &hf_h248_pkg_al_evt_offhook_par_init, h248_param_ber_boolean, &implicit },
|
2006-10-15 22:11:26 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2006-10-10 07:35:47 +00:00
|
|
|
static h248_pkg_param_t h248_pkg_al_evt_flashhook_params[] = {
|
2007-01-30 06:16:39 +00:00
|
|
|
{ 0x0001, &hf_h248_pkg_al_evt_flashhook_par_mindur, h248_param_ber_integer, &implicit },
|
2006-10-10 07:35:47 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static h248_pkg_evt_t h248_pkg_al_evts[] = {
|
2007-02-23 20:57:22 +00:00
|
|
|
{ 0x0004, &hf_h248_pkg_al_evt_onhook, &ett_h248_pkg_al_evt_onhook, h248_pkg_al_evt_onhook_params, h248_pkg_al_evt_onhook_params_vals},
|
|
|
|
{ 0x0005, &hf_h248_pkg_al_evt_offhook, &ett_h248_pkg_al_evt_offhook, h248_pkg_al_evt_offhook_params, h248_pkg_al_evt_onhook_params_vals },
|
|
|
|
{ 0x0006, &hf_h248_pkg_al_evt_flashhook, &ett_h248_pkg_al_evt_flashhook, h248_pkg_al_evt_flashhook_params, h248_pkg_al_evt_flashhook_params_vals },
|
2007-02-25 11:23:49 +00:00
|
|
|
|
|
|
|
{ 0, NULL, NULL, NULL, NULL}
|
2006-10-10 07:35:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Packet defenitions */
|
2006-10-15 22:11:26 +00:00
|
|
|
static const value_string h248_pkg_al_parameters[] = {
|
|
|
|
/* Signals */
|
|
|
|
{ 0x0002, "ri (Ring)" },
|
|
|
|
/* Events */
|
|
|
|
{ 0x0004, "on (On-hook)" },
|
|
|
|
{ 0x0005, "off (Off-hook)" },
|
|
|
|
{ 0x0006, "fl (Flashhook)" },
|
|
|
|
|
|
|
|
{0, NULL},
|
|
|
|
};
|
2006-10-10 07:35:47 +00:00
|
|
|
|
|
|
|
static h248_package_t h248_pkg_al = {
|
|
|
|
0x0009,
|
|
|
|
&hf_h248_pkg_al,
|
|
|
|
&ett_h248_pkg_al,
|
2007-02-23 20:57:22 +00:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
h248_pkg_al_evts_vals,
|
|
|
|
NULL,
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL, /* Properties */
|
|
|
|
NULL, /* signals */
|
|
|
|
h248_pkg_al_evts, /* events */
|
|
|
|
NULL /* statistics */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* H.248.1 E.12 RTP package */
|
|
|
|
static int hf_h248_pkg_rtp = -1;
|
|
|
|
static int hf_h248_pkg_rtp_stat_ps = -1;
|
|
|
|
|
|
|
|
static int ett_h248_pkg_rtp = -1;
|
|
|
|
|
2007-02-23 20:57:22 +00:00
|
|
|
static const value_string h248_pkg_rtp_stat_vals[] = {
|
|
|
|
{ 0x0004, "ps"},
|
|
|
|
{ 0, NULL}
|
|
|
|
};
|
|
|
|
|
2006-10-15 16:06:02 +00:00
|
|
|
static const value_string h248_pkg_rtp_parameters[] = {
|
|
|
|
{ 0x0001, "pltrans (Payload Transition)" },
|
|
|
|
{ 0x0004, "ps (Packets Sent)" },
|
|
|
|
{ 0x0005, "pr (Packets Received)" },
|
|
|
|
{ 0x0006, "pl (Packet Loss)" },
|
|
|
|
{ 0x0007, "jit (Jitter)" },
|
|
|
|
{ 0x0008, "delay (Delay)" },
|
|
|
|
{0, NULL},
|
|
|
|
};
|
|
|
|
|
2006-10-10 07:35:47 +00:00
|
|
|
static h248_pkg_stat_t h248_pkg_rtp_stat[] = {
|
2007-02-25 11:23:49 +00:00
|
|
|
{ 0x0004, &hf_h248_pkg_rtp_stat_ps, &ett_h248_pkg_rtp, NULL,NULL},
|
2006-10-10 07:35:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Packet defenitions */
|
|
|
|
static h248_package_t h248_pkg_rtp = {
|
|
|
|
0x000c,
|
|
|
|
&hf_h248_pkg_rtp,
|
|
|
|
&ett_h248_pkg_rtp,
|
2007-02-23 20:57:22 +00:00
|
|
|
h248_pkg_rtp_parameters,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL, /* Properties */
|
|
|
|
NULL, /* signals */
|
|
|
|
NULL, /* events */
|
|
|
|
h248_pkg_rtp_stat /* statistics */
|
|
|
|
};
|
2006-10-03 17:24:28 +00:00
|
|
|
|
|
|
|
/* H.248.1 E.13 TDM Circuit Package */
|
|
|
|
static int hf_h248_pkg_tdmc = -1;
|
|
|
|
static int hf_h248_pkg_tdmc_ec = -1;
|
|
|
|
static int hf_h248_pkg_tdmc_gain = -1;
|
|
|
|
|
|
|
|
static gint ett_h248_pkg_tdmc = -1;
|
|
|
|
|
|
|
|
static const true_false_string h248_tdmc_ec_vals = {
|
|
|
|
"On",
|
|
|
|
"Off"
|
|
|
|
};
|
2007-02-23 20:57:22 +00:00
|
|
|
static const value_string h248_pkg_tdmc_props_vals[] = {
|
|
|
|
{ 0x0008, "ec"},
|
|
|
|
{ 0x000a, "gain"},
|
|
|
|
{ 0, NULL}
|
|
|
|
};
|
|
|
|
|
2006-10-03 17:24:28 +00:00
|
|
|
|
|
|
|
static h248_pkg_param_t h248_pkg_tdmc_props[] = {
|
2006-11-25 13:07:28 +00:00
|
|
|
{ 0x0008, &hf_h248_pkg_tdmc_ec, h248_param_ber_boolean, &implicit },
|
|
|
|
{ 0x000a, &hf_h248_pkg_tdmc_gain, h248_param_ber_integer, &implicit },
|
2006-10-10 07:35:47 +00:00
|
|
|
{ 0, NULL, NULL, NULL}
|
2006-10-03 17:24:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static h248_package_t h248_pkg_tdmc = {
|
|
|
|
0x000d,
|
|
|
|
&hf_h248_pkg_tdmc,
|
|
|
|
&ett_h248_pkg_tdmc,
|
2007-02-23 20:57:22 +00:00
|
|
|
h248_pkg_tdmc_props_vals,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2006-10-06 19:48:00 +00:00
|
|
|
h248_pkg_tdmc_props, /* Properties */
|
|
|
|
NULL, /* signals */
|
2006-10-10 07:35:47 +00:00
|
|
|
NULL, /* events */
|
|
|
|
NULL /* statistics */
|
2006-10-03 17:24:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void proto_register_h248_annex_e(void) {
|
2006-10-10 07:35:47 +00:00
|
|
|
static hf_register_info hf[] = {
|
2006-10-06 19:48:00 +00:00
|
|
|
/* H.248.1 E.1 Generic Package */
|
2006-10-03 17:24:28 +00:00
|
|
|
{ &hf_h248_pkg_generic, { "Generic Package", "h248.pkg.generic", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_generic_cause_evt, { "Cause Event", "h248.pkg.generic.cause", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
2006-10-18 05:45:52 +00:00
|
|
|
{ &hf_h248_pkg_generic_cause_gencause, { "Generic Cause", "h248.pkg.generic.cause.gencause", FT_UINT32, BASE_HEX, VALS(h248_pkg_generic_cause_gencause_vals), 0, "", HFILL }},
|
2006-10-03 17:24:28 +00:00
|
|
|
{ &hf_h248_pkg_generic_cause_failurecause, { "Generic Cause", "h248.pkg.generic.cause.failurecause", FT_STRING, BASE_HEX, NULL, 0, "", HFILL }},
|
2007-03-03 16:36:19 +00:00
|
|
|
{&hf_h248_pkg_generic_sc_evt, {"Signal Completion","h248.pkg.generic.sc",FT_BYTES, BASE_HEX, NULL, 0, "", HFILL}},
|
|
|
|
{ &hf_h248_pkg_generic_sc_sig_id, { "Signal Identity", "h248.pkg.generic.sc.sig_id", FT_BYTES, BASE_HEX, NULL , 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_generic_sc_meth, { "Termination Method", "h248.pkg.generic.sc.meth", FT_UINT32, BASE_DEC, VALS(h248_pkg_generic_sc_vals) , 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_generic_sc_slid, { "Signal List ID", "h248.pkg.generic.sc.slid", FT_UINT32, BASE_DEC, NULL , 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_generic_sc_rid, { "Request ID", "h248.pkg.generic.sc.rid", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
|
2006-10-10 07:35:47 +00:00
|
|
|
/* H.248.1 E.9 Analog Line Supervision Package */
|
|
|
|
{ &hf_h248_pkg_al, { "Analog Line Supervision Package", "h248.pkg.al", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_al_evt_onhook, { "onhook", "h248.pkg.al.onhook", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_al_evt_offhook, { "offhook", "h248.pkg.al.offhook", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_al_evt_flashhook, { "flashhook", "h248.pkg.al.flashhook", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_al_evt_onhook_par_strict, { "strict", "h248.pkg.al.ev.onhook.strict", FT_UINT8, BASE_DEC, VALS(h248_pkg_al_evt_onhook_strict_vals), 0, "", HFILL }},
|
2006-10-15 22:11:26 +00:00
|
|
|
{ &hf_h248_pkg_al_evt_onhook_par_init, { "init", "h248.pkg.al.ev.onhook.init", FT_BOOLEAN, 8, TFS(&h248_pkg_al_evt_onhook_par_init_vals), 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_al_evt_offhook_par_strict, { "strict", "h248.pkg.al.ev.offhook.strict", FT_UINT8, BASE_DEC, VALS(h248_pkg_al_evt_onhook_strict_vals), 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_al_evt_offhook_par_init, { "init", "h248.pkg.al.ev.onhook.init", FT_BOOLEAN, 8, TFS(&h248_pkg_al_evt_offhook_par_init_vals), 0, "", HFILL }},
|
2006-10-10 07:35:47 +00:00
|
|
|
{ &hf_h248_pkg_al_evt_flashhook_par_mindur, { "Minimum duration in ms", "h248.pkg.al.ev.flashhook.mindur", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
|
|
|
|
/* H.248.1 E.12 RTP package */
|
|
|
|
{ &hf_h248_pkg_rtp, { "RTP package", "h248.pkg.rtp", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_rtp_stat_ps, { "Packets Sent", "h248.pkg.rtp.stat.ps", FT_UINT64, BASE_DEC, NULL, 0, "Packets Sent", HFILL }},
|
2006-10-06 19:48:00 +00:00
|
|
|
/* H.248.1 E.13 TDM Circuit Package */
|
2006-10-10 07:35:47 +00:00
|
|
|
{ &hf_h248_pkg_tdmc, { "TDM Circuit Package", "h248.pkg.tdmc", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }},
|
|
|
|
{ &hf_h248_pkg_tdmc_ec, { "Echo Cancellation", "h248.pkg.tdmc.ec", FT_BOOLEAN, 8, TFS(&h248_tdmc_ec_vals), 0, "Echo Cancellation", HFILL }},
|
2006-10-03 17:24:28 +00:00
|
|
|
{ &hf_h248_pkg_tdmc_gain, { "Gain", "h248.pkg.tdmc.gain", FT_UINT32, BASE_HEX, NULL, 0, "Gain", HFILL }},
|
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_h248_pkg_generic_cause_evt,
|
|
|
|
&ett_h248_pkg_generic,
|
|
|
|
|
2006-10-18 05:45:52 +00:00
|
|
|
&ett_h248_pkg_dg,
|
|
|
|
&ett_h248_pkg_dg_sig_d0,
|
|
|
|
&ett_h248_pkg_dg_sig_d1,
|
|
|
|
&ett_h248_pkg_dg_sig_d2,
|
|
|
|
&ett_h248_pkg_dg_sig_d3,
|
|
|
|
|
2006-10-10 07:35:47 +00:00
|
|
|
&ett_h248_pkg_al,
|
|
|
|
&ett_h248_pkg_al_evt_onhook,
|
|
|
|
|
2006-10-06 19:48:00 +00:00
|
|
|
&ett_h248_pkg_rtp,
|
2006-10-03 17:24:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
proto_h248_annex_E = proto_register_protocol(PNAME, PSNAME, PFNAME);
|
|
|
|
|
|
|
|
proto_register_field_array(proto_h248_annex_E, hf, array_length(hf));
|
|
|
|
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
|
|
|
|
h248_register_package(&h248_pkg_generic);
|
2006-10-18 05:45:52 +00:00
|
|
|
h248_register_package(&h248_pkg_dg);
|
2006-10-10 07:35:47 +00:00
|
|
|
h248_register_package(&h248_pkg_al);
|
|
|
|
h248_register_package(&h248_pkg_rtp);
|
|
|
|
h248_register_package(&h248_pkg_tdmc);
|
2006-10-03 17:24:28 +00:00
|
|
|
}
|
|
|
|
|
2007-02-23 20:57:22 +00:00
|
|
|
|