Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-h248_2.c
blobff429c2ebd8d19cf52e9f33b047e874d1788186e
1 /*
2 * packet-h248_2.c
4 * H.248.2
5 * Gateway control protocol: Facsimile, text conversation and call discrimination packages
7 * (c) 2012, Anders broman <anders.broman@ericsson.com>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include "config.h"
19 #include "packet-h248.h"
21 void proto_register_h248_dot2(void);
23 #define PNAME "H.248.2"
24 #define PSNAME "H248_2"
25 #define PFNAME "h248.2"
27 static int proto_h248_2;
29 /* static int hf_h248_2_dtone_evt; */
30 static int hf_h248_2_dtone_dtt_obs_evt;
31 static int hf_h248_2_dtone_dtt_obs_evt_val;
33 static int ett_h248_2;
34 static int ett_h248_2_dtone_dtt_obs_evt;
37 static const value_string hf_h248_2_dtone_dtt_obs_evt_val_values[] = {
38 /*For FAX*/
39 { 0x0001, "CNG"}, /* A T.30 fax calling tone */
40 { 0x0002, "V21flag"}, /* V21 tone and flags for fax answering */
41 /* For TEXT */
42 { 0x0003, "XCI"}, /* A V.18 XCI */
43 { 0x0004, "V18txp1"}, /* A V.18 txp signal in channel V.21(1) */
44 { 0x0005, "V18txp2"}, /* A V.18 txp signal in channel V.21(2) */
45 { 0x0006, "BellHi"}, /* A Bell 103 carrier on the high channel */
46 { 0x0007, "BellLo"}, /* A Bell 103 low channel */
47 { 0x0008, "Baudot45"}, /* Baudot45 initial carrier and characters */
48 { 0x0009, "Baudot50"}, /* A Baudot50 initial carrier and characters */
49 { 0x000a, "Edt"}, /* An EDT initial tone and characters */
50 { 0x000b, "DTMF"}, /* DTMF signals */
51 { 0x001c, "CTM"}, /* CTM signals */
52 /* For DATA */
53 { 0x000c, "Sig"}, /* Modulation signal from a mode only used for data, i.e., not V.21, V.23 nor Bell 103 */
54 /* Common to TEXT and DATA */
55 { 0x000d, "CT"}, /* A V.25 calling tone */
56 { 0x000e, "V21hi"}, /* A V.21 carrier on the higher frequency channel */
57 { 0x000f, "V21lo"}, /* A V.21 carrier on the low frequency channel */
58 { 0x0010, "V23hi"}, /* A V.23 high carrier */
59 { 0x0011, "V23lo"}, /* A V.23 low carrier */
60 { 0x0012, "CI"}, /* A V.8 CI with contents in "dtvalue" */
61 /* Common to FAX, TEXT and DATA */
62 { 0x0013, "ANS(T.30 CED)"}, /* V.25 ANS, equivalent to T.30 CED from answering terminal */
63 { 0x0014, "ANSbar"}, /* V.25 ANS with phase reversals" */
64 { 0x0015, "ANSAM"}, /* V.8 ANSam */
65 { 0x0016, "ANSAMbar"}, /* V.8 ANSam with phase reversals */
66 { 0x0017, "CM"}, /* V.8 CM with contents in "dtvalue" */
67 { 0x0018, "CJ"}, /* V.8 CJ */
68 { 0x0019, "JM"}, /* V.8 JM with contents in "dtvalue" */
69 { 0x001a, "ENDOFSIG"}, /* End of reported signal detected reported for continuous or repeated signals */
70 { 0x001b, "V8BIS"}, /* V.8 bis signal, with signal type in parameter V8bistype and value in "dtvalue" */
71 { 0, NULL }
74 static h248_pkg_param_t h248_2_dtone_dtt_obs_evt_params[] = {
75 { 0x0001, &hf_h248_2_dtone_dtt_obs_evt_val, h248_param_ber_integer, NULL },
76 { 0, NULL, NULL, NULL}
80 static const value_string h248_2_ctype_events_vals[] = {
81 { 0x0001, "Discriminating Tone Detected(dtone)"},
82 { 0x0002, "Call Type Discrimination Result(calldisres)"},
83 { 0, NULL }
86 static h248_pkg_evt_t h248_pkg_generic_cause_evts[] = {
87 { 0x0001, &hf_h248_2_dtone_dtt_obs_evt, &ett_h248_2_dtone_dtt_obs_evt, h248_2_dtone_dtt_obs_evt_params, h248_2_ctype_events_vals},
88 { 0, NULL, NULL, NULL, NULL}
93 /* Call Type Discrimination Package */
94 static h248_package_t h248_pkg_ctype = {
95 0x0011, /* Id */
96 &proto_h248_2, /* hfid */
97 &ett_h248_2, /* ett */
99 NULL, /* value_string param_names */
100 NULL, /* value_string signal_names */
101 h248_2_ctype_events_vals, /* value_string event_names */
102 NULL, /* value_string stats_names */
104 NULL, /* properties */
105 NULL, /* signals */
106 h248_pkg_generic_cause_evts, /* events */
107 NULL /* statistics */
110 void proto_register_h248_dot2(void) {
111 static hf_register_info hf[] = {
112 #if 0
113 { &hf_h248_2_dtone_evt,
114 { "Discriminating Tone Type", "h248.2.dtt",
115 FT_BYTES, BASE_NONE, NULL, 0,
116 NULL, HFILL }
118 #endif
119 { &hf_h248_2_dtone_dtt_obs_evt,
120 { "Discriminating Tone Type(dtt)", "h248.2.dtt",
121 FT_BYTES, BASE_NONE, NULL, 0,
122 NULL, HFILL },
124 { &hf_h248_2_dtone_dtt_obs_evt_val,
125 { "call type", "h248.2.dtt.val",
126 FT_UINT32, BASE_DEC, VALS(hf_h248_2_dtone_dtt_obs_evt_val_values) , 0,
127 NULL, HFILL }
132 static int *ett[] = {
133 &ett_h248_2,
134 &ett_h248_2_dtone_dtt_obs_evt,
137 proto_h248_2 = proto_register_protocol(PNAME, PSNAME, PFNAME);
139 proto_register_field_array(proto_h248_2, hf, array_length(hf));
141 proto_register_subtree_array(ett, array_length(ett));
143 h248_register_package(&h248_pkg_ctype,MERGE_PKG_HIGH);
147 * Editor modelines - https://www.wireshark.org/tools/modelines.html
149 * Local variables:
150 * c-basic-offset: 4
151 * tab-width: 8
152 * indent-tabs-mode: nil
153 * End:
155 * vi: set shiftwidth=4 tabstop=8 expandtab:
156 * :indentSize=4:tabSize=8:noTabs=true: