MSWSP: add two more Property Sets
[wireshark-wip.git] / epan / dissectors / packet-h248_10.c
blob2bc3c62dabc39ade232dd59de0f44a10db4b8727
1 /*
2 * packet-h248_10.c
4 * $Id$
6 * H.248.10
7 * Gateway control protocol: Media gateway
8 * resource congestion handling package
10 * (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 #include "config.h"
34 #include "packet-h248.h"
35 #define PNAME "H.248.10"
36 #define PSNAME "H248CHP"
37 #define PFNAME "h248.chp"
39 static int proto_h248_CHP = -1;
41 static int hf_h248_CHP_mgcon = -1;
42 static int hf_h248_CHP_mgcon_reduction = -1;
44 static gint ett_h248_CHP = -1;
45 static gint ett_h248_CHP_mgcon = -1;
47 static const value_string h248_CHP_prop_vals[] = {
48 { 0, "chp (MG Congestion Handling)" },
49 { 0, NULL }
52 static const value_string h248_CHP_events_vals[] = {
53 {1, "MGCon"},
54 { 0, NULL }
57 static const value_string h248_CHP_mgcon_params_vals[] = {
58 {1, "reduction"},
59 { 0, NULL }
63 static const h248_pkg_param_t h248_CHP_mgcon_params[] = {
64 { 0x0001, &hf_h248_CHP_mgcon_reduction, h248_param_ber_integer, NULL },
65 { 0, NULL, NULL, NULL}
69 static const h248_pkg_evt_t h248_CHP_mgcon_events[] = {
70 { 0x0001, &hf_h248_CHP_mgcon, &ett_h248_CHP_mgcon, h248_CHP_mgcon_params, h248_CHP_mgcon_params_vals},
71 { 0, NULL, NULL, NULL, NULL}
74 static const h248_package_t h248_pkg_CHP = {
75 0x0029,
76 &proto_h248_CHP,
77 &ett_h248_CHP,
79 h248_CHP_prop_vals,
80 NULL,
81 h248_CHP_events_vals,
82 NULL,
84 NULL,
85 NULL,
86 h248_CHP_mgcon_events,
87 NULL
90 void proto_register_h248_dot10(void) {
91 static hf_register_info hf[] = {
92 /* H.248.1 E.1 Generic Package */
93 { &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 }},
94 { &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 }},
97 static gint *ett[] = {
98 &ett_h248_CHP,
99 &ett_h248_CHP_mgcon,
102 proto_h248_CHP = proto_register_protocol(PNAME, PSNAME, PFNAME);
104 proto_register_field_array(proto_h248_CHP, hf, array_length(hf));
106 proto_register_subtree_array(ett, array_length(ett));
108 h248_register_package(&h248_pkg_CHP,REPLACE_PKG);