Add dissection of packet tdmc
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 23 Feb 2005 23:12:48 +0000 (23:12 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 23 Feb 2005 23:12:48 +0000 (23:12 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13484 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-h248.c
epan/dissectors/packet-h248.h

index d354b83d52982e2cd3ed40fae59b5d8c823feab0..330b6fed733faac81ad94c3b6d64159ab4ee8cba 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* ./packet-h248.c                                                            */
+/* .\packet-h248.c                                                            */
 /* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */
 
 /* Input file: packet-h248-template.c */
@@ -63,6 +63,8 @@ static int hf_h248_event_name         = -1;
 static int hf_h248_signal_name         = -1;
 static int hf_h248_package_bcp_BNCChar_PDU = -1;
 static int hf_h248_package_annex_C_ACodec = -1;
+static int hf_h248_package_annex_C_tdmc_ec = -1;
+static int hf_h248_package_annex_C_tdmc_gain = -1;
 static int hf_h248_package_annex_C_TMR = -1;
 static int hf_h248_package_annex_C_Mediatx = -1;
 static int hf_h248_package_annex_C_USI = -1;
@@ -677,38 +679,45 @@ static const value_string h248_package_annex_C_Mediatx_vals[] = {
   {   0x0004, "Ipv6" },
        {0,     NULL}
 };
+
+
+static const true_false_string h248_tdmc_ec_vals = {
+       "On",
+       "Off"
+};
 static void 
 dissect_h248_annex_C_PDU(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 name_minor) {
        int offset = 0;
        tvbuff_t *new_tvb;
 
        switch ( name_minor ){
-               case 0x1001: /* Media */
-                       proto_tree_add_text(tree, tvb, offset, -1,"Media");
-                       break;
-               case 0x1006: /* ACodec Ref.: ITU-T Rec. Q.765.5 */
-                       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_ACodec, &new_tvb);
-                       break;
-               case 0x3001: /* Mediatx */
-                       offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_annex_C_Mediatx, NULL);
-                       break;
-               case 0x3002: /* BIR */
-                       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_BIR, &new_tvb);
-                       break;
-               case 0x3003: /* NSAP */
-                       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_NSAP, &new_tvb);
-                       dissect_nsap(new_tvb, 0,tvb_length_remaining(new_tvb, 0), tree);
-                       break;
-               case 0x9001: /* TMR */
-                       offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_annex_C_TMR, NULL);
-                       break;
-               case 0x9023: /* User Service Information */
-                       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_USI, &new_tvb);
-                       dissect_q931_bearer_capability_ie(new_tvb, 0, 3, tree);
-                       break;
-               default:
-                       proto_tree_add_text(tree, tvb, offset, -1,"PropertyID not decoded(yet) 0x%x",name_minor);
-                       break;
+
+       case 0x1001: /* Media */
+               proto_tree_add_text(tree, tvb, offset, -1,"Media");
+               break;
+       case 0x1006: /* ACodec Ref.: ITU-T Rec. Q.765.5 */
+               offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_ACodec, &new_tvb);
+               break;
+       case 0x3001: /* Mediatx */
+               offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_annex_C_Mediatx, NULL);
+               break;
+       case 0x3002: /* BIR */
+               offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_BIR, &new_tvb);
+               break;
+       case 0x3003: /* NSAP */
+               offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_NSAP, &new_tvb);
+               dissect_nsap(new_tvb, 0,tvb_length_remaining(new_tvb, 0), tree);
+               break;
+       case 0x9001: /* TMR */
+               offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_annex_C_TMR, NULL);
+               break;
+       case 0x9023: /* User Service Information */
+               offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_h248_package_annex_C_USI, &new_tvb);
+               dissect_q931_bearer_capability_ie(new_tvb, 0, 3, tree);
+               break;
+       default:
+               proto_tree_add_text(tree, tvb, offset, -1,"PropertyID not decoded(yet) 0x%x",name_minor);
+               break;
        }
 }
 
@@ -804,6 +813,18 @@ guint offset=0;
                case 0x0001: /* g H.248.1 Annex E */
                        proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), "H.248: Dissector for Package/ID:0x%04x not implemented (yet).", name_major);
                        break;
+               case 0x000d: /* tdmc H.248.1 Annex E */
+                       switch (name_minor){
+                               case 0x0008: /*ec*/
+                                       offset = dissect_ber_boolean(TRUE, pinfo, tree, tvb, offset, hf_h248_package_annex_C_tdmc_ec);
+                                       break;
+                               case 0x000a: /* gain */
+                                       offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_h248_package_annex_C_tdmc_gain, NULL);
+                                       break;
+                               default:
+                                       proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), "H.248: Dissector for Package/ID:0x%04x not implemented (yet).", name_major);
+                                       break;
+                       }
                case 0x001e: /* Bearer Characteristics Q.1950 Annex A */
                        offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_bcp_BNCChar_PDU, NULL);
                        break;
@@ -4191,6 +4212,14 @@ void proto_register_h248(void) {
       { "BNCChar", "h248.package_bcp.BNCChar",
         FT_UINT32, BASE_DEC, VALS(BNCChar_vals), 0,
         "BNCChar", HFILL }},
+       { &hf_h248_package_annex_C_tdmc_ec,
+      { "Echo Cancellation", "h248.package_annex_C.tdmc.ec",
+        FT_BOOLEAN, 8, TFS(&h248_tdmc_ec_vals), 0,
+        "Echo Cancellation", HFILL }},
+       { &hf_h248_package_annex_C_tdmc_gain,
+      { "Gain", "h248.package_annex_C.tdmc.gain",
+        FT_UINT32, BASE_HEX, NULL, 0,
+        "Gain", HFILL }},
        { &hf_h248_package_annex_C_ACodec,
       { "ACodec", "h248.package_annex_C.ACodec",
         FT_BYTES, BASE_HEX, NULL, 0,
index 84099c67df859ae2b4fb05cd89027f7eb61d0f14..e3abab06c1d35838fb821d85ec811c50d222593d 100644 (file)
@@ -1,39 +1,39 @@
-/* Do not modify this file.                                                   */
-/* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* ./packet-h248.h                                                            */
-/* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */
-
-/* Input file: packet-h248-template.h */
-
-/* packet-h248.h
- * Routines for H.248/MEGACO packet dissection
- * Ronnie Sahlberg 2004
- *
- * $Id: packet-h248-template.h 12203 2004-10-05 09:18:55Z guy $
- *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
- * Copyright 1998 Gerald Combs
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#ifndef PACKET_H248_H
-#define PACKET_H248_H
-
-/*#include "packet-h248-exp.h"*/
-
-#endif  /* PACKET_H248_H */
-
+/* Do not modify this file.                                                   */\r
+/* It is created automatically by the ASN.1 to Ethereal dissector compiler    */\r
+/* .\packet-h248.h                                                            */\r
+/* ../../tools/asn2eth.py -X -b -e -p h248 -c h248.cnf -s packet-h248-template MEGACO.asn */\r
+\r
+/* Input file: packet-h248-template.h */\r
+\r
+/* packet-h248.h\r
+ * Routines for H.248/MEGACO packet dissection\r
+ * Ronnie Sahlberg 2004\r
+ *\r
+ * $Id$\r
+ *\r
+ * Ethereal - Network traffic analyzer\r
+ * By Gerald Combs <gerald@ethereal.com>\r
+ * Copyright 1998 Gerald Combs\r
+ *\r
+ * This program is free software; you can redistribute it and/or\r
+ * modify it under the terms of the GNU General Public License\r
+ * as published by the Free Software Foundation; either version 2\r
+ * of the License, or (at your option) any later version.\r
+ *\r
+ * This program is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
+ */\r
+\r
+#ifndef PACKET_H248_H\r
+#define PACKET_H248_H\r
+\r
+/*#include "packet-h248-exp.h"*/\r
+\r
+#endif  /* PACKET_H248_H */\r
+\r