diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-10-17 05:40:58 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-10-17 05:40:58 +0000 |
commit | 1b6a659192e6e0108221d21ed4411d6e3b88e55b (patch) | |
tree | 58a9425d0949e9024bcf9867d994597dae31ed5a /epan/dissectors/packet-h248_q1950.c | |
parent | ba3f73ca4e2d2f68448e4b1f96390511916632e7 (diff) |
Add A.8 Basic call progress tones generator with directionality
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19569 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-h248_q1950.c')
-rw-r--r-- | epan/dissectors/packet-h248_q1950.c | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/epan/dissectors/packet-h248_q1950.c b/epan/dissectors/packet-h248_q1950.c index 5676b75032..ec7c5f2eed 100644 --- a/epan/dissectors/packet-h248_q1950.c +++ b/epan/dissectors/packet-h248_q1950.c @@ -65,6 +65,64 @@ static h248_package_t h248_pkg_BCP = { NULL /* statistics */ }; + +/* A.8 Basic call progress tones generator with directionality */ +static int hf_h248_pkg_bcg = -1; +static int hf_h248_pkg_bcg_sig_bdt_par_btd = -1; +static int hf_h248_pkg_bcg_sig_bdt = -1; +static int hf_h248_pkg_bcg_sig_brt = -1; +static int hf_h248_pkg_bcg_sig_bbt = -1; +static int hf_h248_pkg_bcg_sig_bct = -1; +static int hf_h248_pkg_bcg_sig_bsit = -1; +static int hf_h248_pkg_bcg_sig_bwt = -1; +static int hf_h248_pkg_bcg_sig_bpt = -1; +static int hf_h248_pkg_bcg_sig_bcw = -1; +static int hf_h248_pkg_bcg_sig_bcr = -1; +static int hf_h248_pkg_bcg_sig_bpy = -1; + +static int ett_h248_pkg_bcg = -1; +static int ett_h248_pkg_bcg_sig_bdt = -1; + +static const value_string h248_pkg_bcg_sig_bdt_par_btd_vals[] = { + { 0x0001, "ext (External)" }, + { 0x0002, "int (Internal)" }, + { 0x0003, "both (Both)" }, + {0, NULL}, +}; + +static h248_pkg_param_t h248_pkg_h248_pkg_bcg_sig_bdt_params[] = { + { 0x0001, &hf_h248_pkg_bcg_sig_bdt_par_btd, h248_param_ber_integer, NULL }, + { 0, NULL, NULL, NULL} +}; + +static h248_pkg_sig_t h248_pkg_bcg_signals[] = { + /* All the tones have the same parameters */ + { 0x0040, &hf_h248_pkg_bcg_sig_bdt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0041, &hf_h248_pkg_bcg_sig_brt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0042, &hf_h248_pkg_bcg_sig_bbt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0043, &hf_h248_pkg_bcg_sig_bct, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0044, &hf_h248_pkg_bcg_sig_bsit, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0045, &hf_h248_pkg_bcg_sig_bwt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0046, &hf_h248_pkg_bcg_sig_bpt, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0047, &hf_h248_pkg_bcg_sig_bcw, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0048, &hf_h248_pkg_bcg_sig_bcr, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0x0049, &hf_h248_pkg_bcg_sig_bpy, &ett_h248_pkg_bcg_sig_bdt, h248_pkg_h248_pkg_bcg_sig_bdt_params }, + { 0, NULL, NULL, NULL} +}; + +/* Packet defenitions */ +static h248_package_t h248_pkg_bcg = { + 0x0023, + &hf_h248_pkg_bcg, + NULL, + &ett_h248_pkg_bcg, + NULL, /* Properties */ + h248_pkg_bcg_signals, /* signals */ + NULL, /* events */ + NULL /* statistics */ +}; + +/* Register dissector */ void proto_register_q1950(void) { static hf_register_info hf[] = { /* A.3 Bearer characteristics package */ @@ -80,6 +138,51 @@ void proto_register_q1950(void) { { "BNCChar (BNC Characteristics)", "h248.pkg.bcp.bncchar", FT_UINT32, BASE_HEX, VALS(bearer_network_connection_characteristics_vals), 0, "BNC Characteristics", HFILL } }, + /* A.8 Basic call progress tones generator with directionality */ + { &hf_h248_pkg_bcg, + { "bcg (Basic call progress tones generator with directionality)", "h248.pkg.bcg", + FT_BYTES, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bdt_par_btd, + { "btd (Tone Direction)", "h248.pkg.bcp.btd", + FT_UINT32, BASE_HEX, VALS(h248_pkg_bcg_sig_bdt_par_btd_vals), 0, "btd (Tone Direction)", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bdt, + { "bdt (Dial Tone)", "h248.pkg.bcg.bdt", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_brt, + { "brt (Ringing tone)", "h248.pkg.bcg.brt", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bbt, + { "bbt (Busy tone)", "h248.pkg.bcg.bbt", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bct, + { "bct (Congestion tone)", "h248.pkg.bcg.bct", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bsit, + { "bsit (Special information tone)", "h248.pkg.bcg.bsit", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bwt, + { "bwt (Warning tone)", "h248.pkg.bcg.bwt", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bpt, + { "bpt (Payphone recognition tone)", "h248.pkg.bcg.bpt", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bcw, + { "bcw (Call waiting tone)", "h248.pkg.bcg.bcw", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, + { &hf_h248_pkg_bcg_sig_bpy, + { "bpy (Pay tone)", "h248.pkg.bcg.bpy", + FT_UINT8, BASE_HEX, NULL, 0, "", HFILL } + }, }; static gint *ett[] = { @@ -91,7 +194,9 @@ void proto_register_q1950(void) { proto_register_subtree_array(ett, array_length(ett)); + /* Register the packages */ h248_register_package(&h248_pkg_BCP); + h248_register_package(&h248_pkg_bcg); } void proto_reg_handoff_q1950(void) { |