2007-03-08 09:59:16 +00:00
|
|
|
/*
|
|
|
|
* packet-h248_7.c
|
|
|
|
* H.248.7
|
|
|
|
* Gateway control protocol: Generic Announcement package
|
|
|
|
*
|
2008-08-05 21:03:46 +00:00
|
|
|
* (c) 2007, Luis E. Garcia Ontanon <luis@ontanon.org>
|
2007-03-08 09:59:16 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-12 11:23:27 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2007-03-08 09:59:16 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2007-03-08 09:59:16 +00:00
|
|
|
|
|
|
|
#include "packet-h248.h"
|
|
|
|
|
2013-12-15 23:44:12 +00:00
|
|
|
void proto_register_h248_7(void);
|
|
|
|
|
2007-03-08 09:59:16 +00:00
|
|
|
#define PNAME "H.248.7"
|
|
|
|
#define PSNAME "H248AN"
|
2012-08-24 02:02:22 +00:00
|
|
|
#define PFNAME "h248.an"
|
2007-03-08 09:59:16 +00:00
|
|
|
|
|
|
|
static int proto_h248_an = -1;
|
|
|
|
|
|
|
|
static int hf_h248_an_apf = -1;
|
|
|
|
static int hf_h248_an_apf_an = -1;
|
|
|
|
static int hf_h248_an_apf_noc = -1;
|
|
|
|
static int hf_h248_an_apf_av = -1;
|
|
|
|
static int hf_h248_an_apf_di = -1;
|
|
|
|
|
|
|
|
static int hf_h248_an_apv = -1;
|
|
|
|
static int hf_h248_an_apv_an = -1;
|
|
|
|
static int hf_h248_an_apv_noc = -1;
|
|
|
|
static int hf_h248_an_apv_av = -1;
|
|
|
|
static int hf_h248_an_apv_num = -1;
|
|
|
|
static int hf_h248_an_apv_spi = -1;
|
|
|
|
static int hf_h248_an_apv_sp = -1;
|
|
|
|
static int hf_h248_an_apv_di = -1;
|
|
|
|
|
|
|
|
static gint ett_h248_an = -1;
|
|
|
|
static gint ett_h248_an_apf = -1;
|
|
|
|
static gint ett_h248_an_apv = -1;
|
|
|
|
|
2012-06-05 10:54:21 +00:00
|
|
|
static const value_string h248_an_prop_vals[] = {
|
2018-12-05 17:59:23 +00:00
|
|
|
{ 0, "Generic Announcement Package (an) (H.248.7)" },
|
2012-06-05 10:54:21 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2007-03-08 09:59:16 +00:00
|
|
|
static const value_string h248_an_signals_vals[] = {
|
2012-06-05 10:54:21 +00:00
|
|
|
{ 0x0001, "Annoumcement Play Fixed (apf)"},
|
|
|
|
{ 0x0002, "Announcement Play Variable (apv)"},
|
2007-03-08 09:59:16 +00:00
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static const value_string h248_an_apf_params_vals[] = {
|
2012-06-05 10:54:21 +00:00
|
|
|
{ 0x0001, "Name (an)"},
|
|
|
|
{ 0x0002, "Number of Cycles (noc)"},
|
|
|
|
{ 0x0003, "Variant (av)"},
|
|
|
|
{ 0x0004, "Direction (di)"},
|
2007-03-08 09:59:16 +00:00
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string h248_an_apv_params_vals[] = {
|
2012-06-05 10:54:21 +00:00
|
|
|
{ 0x0001, "Name (an)"},
|
|
|
|
{ 0x0002, "Number of Cycles (noc)"},
|
|
|
|
{ 0x0003, "Variant (av)"},
|
|
|
|
{ 0x0004, "Number (num)"},
|
|
|
|
{ 0x0005, "Specific Parameters Interpretation (spi)"},
|
|
|
|
{ 0x0006, "Specific Parameters (sp)"},
|
|
|
|
{ 0x0007, "Direction (di)"},
|
2007-03-08 09:59:16 +00:00
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string h248_an_di_vals[] = {
|
2012-06-05 10:54:21 +00:00
|
|
|
{ 0x0001, "External (ext)"},
|
|
|
|
{ 0x0002, "Internal (int)"},
|
|
|
|
{ 0x0003, "Both (both)"},
|
2007-03-08 09:59:16 +00:00
|
|
|
{0,NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const h248_pkg_param_t h248_an_apf_params[] = {
|
|
|
|
{ 0x0001, &hf_h248_an_apf_an, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0002, &hf_h248_an_apf_noc, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0003, &hf_h248_an_apf_av, h248_param_ber_octetstring, NULL },
|
|
|
|
{ 0x0004, &hf_h248_an_apf_di, h248_param_ber_integer, NULL },
|
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const h248_pkg_param_t h248_an_apv_params[] = {
|
|
|
|
{ 0x0001, &hf_h248_an_apv_an, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0002, &hf_h248_an_apv_noc, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0003, &hf_h248_an_apv_av, h248_param_ber_octetstring, NULL },
|
|
|
|
{ 0x0004, &hf_h248_an_apv_num, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0005, &hf_h248_an_apv_spi, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0006, &hf_h248_an_apv_sp, h248_param_ber_integer, NULL },
|
|
|
|
{ 0x0007, &hf_h248_an_apv_di, h248_param_ber_integer, NULL },
|
|
|
|
{ 0, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
static const h248_pkg_sig_t h248_an_signals[] = {
|
|
|
|
{ 0x0001, &hf_h248_an_apf, &ett_h248_an_apf, h248_an_apf_params, h248_an_apf_params_vals },
|
|
|
|
{ 0x0002, &hf_h248_an_apv, &ett_h248_an_apv, h248_an_apv_params, h248_an_apv_params_vals },
|
|
|
|
{ 0, NULL, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2014-01-14 17:45:03 +00:00
|
|
|
static h248_package_t h248_pkg_an = {
|
2007-03-08 09:59:16 +00:00
|
|
|
0x001d,
|
|
|
|
&proto_h248_an,
|
|
|
|
&ett_h248_an,
|
2012-06-05 10:54:21 +00:00
|
|
|
h248_an_prop_vals,
|
2007-03-08 09:59:16 +00:00
|
|
|
h248_an_signals_vals,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL, /* Properties */
|
|
|
|
h248_an_signals, /* signals */
|
|
|
|
NULL, /* events */
|
|
|
|
NULL /* statistics */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void proto_register_h248_7(void) {
|
|
|
|
static hf_register_info hf[] = {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ &hf_h248_an_apf, { "Fixed Announcement Play", "h248.an.apf", FT_BYTES, BASE_NONE, NULL, 0, "Initiates the play of a fixed announcement", HFILL }},
|
|
|
|
{ &hf_h248_an_apf_an, { "Announcement name", "h248.an.apf.an", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
|
2013-10-13 19:56:52 +00:00
|
|
|
{ &hf_h248_an_apf_noc, { "Number of cycles", "h248.an.apf.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ &hf_h248_an_apf_av, { "Announcement Variant", "h248.an.apf.av", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
|
|
|
|
{ &hf_h248_an_apf_di, {"Announcement Direction","h248.an.apf.di",FT_UINT32, BASE_HEX, VALS(h248_an_di_vals), 0, NULL, HFILL}},
|
|
|
|
|
|
|
|
{ &hf_h248_an_apv, { "Fixed Announcement Play", "h248.an.apv", FT_BYTES, BASE_NONE, NULL, 0, "Initiates the play of a fixed announcement", HFILL }},
|
|
|
|
{ &hf_h248_an_apv_an, { "Announcement name", "h248.an.apv.an", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
|
2013-10-13 19:56:52 +00:00
|
|
|
{ &hf_h248_an_apv_noc, { "Number of cycles", "h248.an.apv.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ &hf_h248_an_apv_av, { "Announcement Variant", "h248.an.apv.av", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
|
2013-10-13 19:56:52 +00:00
|
|
|
{ &hf_h248_an_apv_num, { "Number", "h248.an.apv.num", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
|
|
|
|
{ &hf_h248_an_apv_spi, { "Specific parameters interpretation", "h248.an.apv.spi", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
|
|
|
|
{ &hf_h248_an_apv_sp, { "Specific parameters", "h248.an.apv.sp", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ &hf_h248_an_apv_di, {"Announcement Direction","h248.an.apv.di",FT_UINT32, BASE_HEX, VALS(h248_an_di_vals), 0, NULL, HFILL}}
|
2013-10-13 19:56:52 +00:00
|
|
|
|
2007-03-08 09:59:16 +00:00
|
|
|
};
|
2013-10-13 19:56:52 +00:00
|
|
|
|
2007-03-08 09:59:16 +00:00
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_h248_an,
|
|
|
|
&ett_h248_an_apf,
|
|
|
|
&ett_h248_an_apv
|
|
|
|
};
|
|
|
|
|
|
|
|
proto_h248_an = proto_register_protocol(PNAME, PSNAME, PFNAME);
|
|
|
|
|
|
|
|
proto_register_field_array(proto_h248_an, hf, array_length(hf));
|
|
|
|
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2013-10-13 19:56:52 +00:00
|
|
|
|
2012-06-05 10:54:21 +00:00
|
|
|
h248_register_package(&h248_pkg_an,REPLACE_PKG);
|
2007-03-08 09:59:16 +00:00
|
|
|
}
|
|
|
|
|
2014-09-30 20:59:17 +00:00
|
|
|
/*
|
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 8
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: t
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
|
|
|
* :indentSize=8:tabSize=8:noTabs=false:
|
|
|
|
*/
|