Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-h248_7.c
blobe19a94acc0994c182769feefc69556e8170c2970
1 /*
2 * packet-h248_7.c
3 * H.248.7
4 * Gateway control protocol: Generic Announcement package
6 * (c) 2007, Luis E. Garcia Ontanon <luis@ontanon.org>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include "config.h"
17 #include "packet-h248.h"
19 void proto_register_h248_7(void);
21 #define PNAME "H.248.7"
22 #define PSNAME "H248AN"
23 #define PFNAME "h248.an"
25 static int proto_h248_an;
27 static int hf_h248_an_apf;
28 static int hf_h248_an_apf_an;
29 static int hf_h248_an_apf_noc;
30 static int hf_h248_an_apf_av;
31 static int hf_h248_an_apf_di;
33 static int hf_h248_an_apv;
34 static int hf_h248_an_apv_an;
35 static int hf_h248_an_apv_noc;
36 static int hf_h248_an_apv_av;
37 static int hf_h248_an_apv_num;
38 static int hf_h248_an_apv_spi;
39 static int hf_h248_an_apv_sp;
40 static int hf_h248_an_apv_di;
42 static int ett_h248_an;
43 static int ett_h248_an_apf;
44 static int ett_h248_an_apv;
46 static const value_string h248_an_prop_vals[] = {
47 { 0, "Generic Announcement Package (an) (H.248.7)" },
48 { 0, NULL }
51 static const value_string h248_an_signals_vals[] = {
52 { 0x0001, "Announcement Play Fixed (apf)"},
53 { 0x0002, "Announcement Play Variable (apv)"},
54 {0,NULL}
58 static const value_string h248_an_apf_params_vals[] = {
59 { 0x0001, "Name (an)"},
60 { 0x0002, "Number of Cycles (noc)"},
61 { 0x0003, "Variant (av)"},
62 { 0x0004, "Direction (di)"},
63 {0,NULL}
66 static const value_string h248_an_apv_params_vals[] = {
67 { 0x0001, "Name (an)"},
68 { 0x0002, "Number of Cycles (noc)"},
69 { 0x0003, "Variant (av)"},
70 { 0x0004, "Number (num)"},
71 { 0x0005, "Specific Parameters Interpretation (spi)"},
72 { 0x0006, "Specific Parameters (sp)"},
73 { 0x0007, "Direction (di)"},
74 {0,NULL}
77 static const value_string h248_an_di_vals[] = {
78 { 0x0001, "External (ext)"},
79 { 0x0002, "Internal (int)"},
80 { 0x0003, "Both (both)"},
81 {0,NULL}
87 static const h248_pkg_param_t h248_an_apf_params[] = {
88 { 0x0001, &hf_h248_an_apf_an, h248_param_ber_integer, NULL },
89 { 0x0002, &hf_h248_an_apf_noc, h248_param_ber_integer, NULL },
90 { 0x0003, &hf_h248_an_apf_av, h248_param_ber_octetstring, NULL },
91 { 0x0004, &hf_h248_an_apf_di, h248_param_ber_integer, NULL },
92 { 0, NULL, NULL, NULL}
95 static const h248_pkg_param_t h248_an_apv_params[] = {
96 { 0x0001, &hf_h248_an_apv_an, h248_param_ber_integer, NULL },
97 { 0x0002, &hf_h248_an_apv_noc, h248_param_ber_integer, NULL },
98 { 0x0003, &hf_h248_an_apv_av, h248_param_ber_octetstring, NULL },
99 { 0x0004, &hf_h248_an_apv_num, h248_param_ber_integer, NULL },
100 { 0x0005, &hf_h248_an_apv_spi, h248_param_ber_integer, NULL },
101 { 0x0006, &hf_h248_an_apv_sp, h248_param_ber_integer, NULL },
102 { 0x0007, &hf_h248_an_apv_di, h248_param_ber_integer, NULL },
103 { 0, NULL, NULL, NULL}
106 static const h248_pkg_sig_t h248_an_signals[] = {
107 { 0x0001, &hf_h248_an_apf, &ett_h248_an_apf, h248_an_apf_params, h248_an_apf_params_vals },
108 { 0x0002, &hf_h248_an_apv, &ett_h248_an_apv, h248_an_apv_params, h248_an_apv_params_vals },
109 { 0, NULL, NULL, NULL, NULL}
112 static h248_package_t h248_pkg_an = {
113 0x001d,
114 &proto_h248_an,
115 &ett_h248_an,
116 h248_an_prop_vals,
117 h248_an_signals_vals,
118 NULL,
119 NULL,
120 NULL, /* Properties */
121 h248_an_signals, /* signals */
122 NULL, /* events */
123 NULL /* statistics */
131 void proto_register_h248_7(void) {
132 static hf_register_info hf[] = {
133 { &hf_h248_an_apf, { "Fixed Announcement Play", "h248.an.apf", FT_BYTES, BASE_NONE, NULL, 0, "Initiates the play of a fixed announcement", HFILL }},
134 { &hf_h248_an_apf_an, { "Announcement name", "h248.an.apf.an", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
135 { &hf_h248_an_apf_noc, { "Number of cycles", "h248.an.apf.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
136 { &hf_h248_an_apf_av, { "Announcement Variant", "h248.an.apf.av", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
137 { &hf_h248_an_apf_di, {"Announcement Direction","h248.an.apf.di",FT_UINT32, BASE_HEX, VALS(h248_an_di_vals), 0, NULL, HFILL}},
139 { &hf_h248_an_apv, { "Fixed Announcement Play", "h248.an.apv", FT_BYTES, BASE_NONE, NULL, 0, "Initiates the play of a fixed announcement", HFILL }},
140 { &hf_h248_an_apv_an, { "Announcement name", "h248.an.apv.an", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
141 { &hf_h248_an_apv_noc, { "Number of cycles", "h248.an.apv.noc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
142 { &hf_h248_an_apv_av, { "Announcement Variant", "h248.an.apv.av", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
143 { &hf_h248_an_apv_num, { "Number", "h248.an.apv.num", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
144 { &hf_h248_an_apv_spi, { "Specific parameters interpretation", "h248.an.apv.spi", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
145 { &hf_h248_an_apv_sp, { "Specific parameters", "h248.an.apv.sp", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
146 { &hf_h248_an_apv_di, {"Announcement Direction","h248.an.apv.di",FT_UINT32, BASE_HEX, VALS(h248_an_di_vals), 0, NULL, HFILL}}
150 static int *ett[] = {
151 &ett_h248_an,
152 &ett_h248_an_apf,
153 &ett_h248_an_apv
156 proto_h248_an = proto_register_protocol(PNAME, PSNAME, PFNAME);
158 proto_register_field_array(proto_h248_an, hf, array_length(hf));
160 proto_register_subtree_array(ett, array_length(ett));
162 h248_register_package(&h248_pkg_an,REPLACE_PKG);
166 * Editor modelines - https://www.wireshark.org/tools/modelines.html
168 * Local variables:
169 * c-basic-offset: 8
170 * tab-width: 8
171 * indent-tabs-mode: t
172 * End:
174 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
175 * :indentSize=8:tabSize=8:noTabs=false: