2007-03-07 14:17:08 +00:00
/*
* packet - h248_10 . c
*
* H .248 .10
* Gateway control protocol : Media gateway
* resource congestion handling package
*
2008-08-05 21:03:46 +00:00
* ( c ) 2006 , Luis E . Garcia Ontanon < luis @ ontanon . org >
2007-03-07 14:17:08 +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-07 14:17:08 +00:00
*
*/
2012-09-20 02:03:38 +00:00
# include "config.h"
2009-09-28 17:58:47 +00:00
2016-06-10 04:00:39 +00:00
# include "glib.h"
2007-03-07 14:17:08 +00:00
# include "packet-h248.h"
2013-12-15 23:44:12 +00:00
void proto_register_h248_dot10 ( void ) ;
2007-03-07 14:17:08 +00:00
# define PNAME "H.248.10"
# define PSNAME "H248CHP"
2012-08-24 02:02:22 +00:00
# define PFNAME "h248.chp"
2007-03-07 14:17:08 +00:00
static int proto_h248_CHP = - 1 ;
static int hf_h248_CHP_mgcon = - 1 ;
static int hf_h248_CHP_mgcon_reduction = - 1 ;
static gint ett_h248_CHP = - 1 ;
static gint ett_h248_CHP_mgcon = - 1 ;
2012-03-13 13:41:28 +00:00
static const value_string h248_CHP_prop_vals [ ] = {
{ 0 , " chp (MG Congestion Handling) " } ,
{ 0 , NULL }
} ;
2007-03-07 14:17:08 +00:00
static const value_string h248_CHP_events_vals [ ] = {
{ 1 , " MGCon " } ,
{ 0 , NULL }
} ;
static const value_string h248_CHP_mgcon_params_vals [ ] = {
{ 1 , " reduction " } ,
{ 0 , NULL }
} ;
static const h248_pkg_param_t h248_CHP_mgcon_params [ ] = {
{ 0x0001 , & hf_h248_CHP_mgcon_reduction , h248_param_ber_integer , NULL } ,
{ 0 , NULL , NULL , NULL }
} ;
static const h248_pkg_evt_t h248_CHP_mgcon_events [ ] = {
{ 0x0001 , & hf_h248_CHP_mgcon , & ett_h248_CHP_mgcon , h248_CHP_mgcon_params , h248_CHP_mgcon_params_vals } ,
{ 0 , NULL , NULL , NULL , NULL }
} ;
2014-01-14 17:45:03 +00:00
static h248_package_t h248_pkg_CHP = {
2007-03-07 14:17:08 +00:00
0x0029 ,
& proto_h248_CHP ,
& ett_h248_CHP ,
2013-10-13 19:56:52 +00:00
2012-03-13 13:41:28 +00:00
h248_CHP_prop_vals ,
2007-03-07 14:17:08 +00:00
NULL ,
h248_CHP_events_vals ,
NULL ,
2013-10-13 19:56:52 +00:00
2007-03-07 14:17:08 +00:00
NULL ,
NULL ,
h248_CHP_mgcon_events ,
NULL
} ;
void proto_register_h248_dot10 ( void ) {
static hf_register_info hf [ ] = {
/* H.248.1 E.1 Generic Package */
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_CHP_mgcon , { " MGCon " , " h248.chp.mgcon " , FT_BYTES , BASE_NONE , NULL , 0 , " This event occurs when the MG requires that the MGC start or finish load reduction. " , HFILL } } ,
2013-10-13 19:56:52 +00:00
{ & hf_h248_CHP_mgcon_reduction , { " Reduction " , " h248.chp.mgcon.reduction " , FT_UINT32 , BASE_DEC , NULL , 0 , " Percentage of the load that the MGC is requested to block " , HFILL } } ,
2007-03-07 14:17:08 +00:00
} ;
2013-10-13 19:56:52 +00:00
2007-03-07 14:17:08 +00:00
static gint * ett [ ] = {
& ett_h248_CHP ,
& ett_h248_CHP_mgcon ,
} ;
proto_h248_CHP = proto_register_protocol ( PNAME , PSNAME , PFNAME ) ;
proto_register_field_array ( proto_h248_CHP , 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_CHP , REPLACE_PKG ) ;
2007-03-07 14:17:08 +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 :
*/