Add dissection of some more packages.

svn path=/trunk/; revision=13265
This commit is contained in:
Anders Broman 2005-02-03 21:57:42 +00:00
parent 2b80bfc282
commit 915e63ae18
2 changed files with 168 additions and 42 deletions

View 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 */
@ -62,10 +62,18 @@ static int hf_h248_package_name = -1;
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_TMR = -1;
static int hf_h248_package_annex_C_Mediatx = -1;
static int hf_h248_package_annex_C_USI = -1;
static int hf_h248_package_annex_C_NSAP = -1;
static int hf_h248_package_annex_C_BIR = -1;
static int hf_h248_package_3GUP_Mode = -1;
static int hf_h248_package_3GUP_UPversions = -1;
static int hf_h248_package_3GUP_delerrsdu = -1;
static int hf_h248_package_3GUP_interface = -1;
static int hf_h248_package_3GUP_initdir = -1;
/*--- Included file: packet-h248-hf.c ---*/
@ -661,6 +669,14 @@ static const value_string signal_name_vals[] = {
{0, NULL}
};
static const value_string h248_package_annex_C_Mediatx_vals[] = {
{ 0x0000, "TDM Circuit" },
{ 0x0001, "ATM" },
{ 0x0002, "FR" },
{ 0x0003, "Ipv4" },
{ 0x0004, "Ipv6" },
{0, NULL}
};
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;
@ -670,6 +686,12 @@ dissect_h248_annex_C_PDU(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinf
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;
@ -689,6 +711,79 @@ dissect_h248_annex_C_PDU(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinf
break;
}
}
static const value_string h248_3GUP_Mode_vals[] = {
{ 0x00000001, "Transparent mode" },
{ 0x00000002, "Support mode for predefined SDU sizes" },
{0, NULL}
};
static const value_string h248_3GUP_upversions_vals[] = {
{ 0x01, "Version 1" },
{ 0x02, "Version 2" },
{ 0x03, "Version 3" },
{ 0x04, "Version 4" },
{ 0x05, "Version 5" },
{ 0x06, "Version 6" },
{ 0x07, "Version 7" },
{ 0x08, "Version 8" },
{ 0x09, "Version 9" },
{ 0x0A, "Version 10" },
{ 0x0B, "Version 11" },
{ 0x0C, "Version 12" },
{ 0x0D, "Version 13" },
{ 0x0E, "Version 14" },
{ 0x0F, "Version 15" },
{ 0x10, "Version 16" },
{0, NULL}
};
static const value_string h248_3GUP_delerrsdu_vals[] = {
{ 0x0001, "Yes" },
{ 0x0002, "No" },
{ 0x0003, "Not Applicable" },
{0, NULL}
};
static const value_string h248_3GUP_interface_vals[] = {
{ 0x0001, "RAN (Iu interface)" },
{ 0x0002, "CN (Nb interfac)" },
{0, NULL}
};
static const value_string h248_3GUP_initdir_vals[] = {
{ 0x0001, "Incoming" },
{ 0x0002, "Outgoing" },
{0, NULL}
};
static void
dissect_3G_User_Plane_PDU(gboolean implicit_tag, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 name_minor){
int offset = 0;
switch ( name_minor ){
case 0x0001:
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_3GUP_Mode, NULL);
break;
case 0x0002:
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_3GUP_UPversions, NULL);
break;
case 0x0003:
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_3GUP_delerrsdu, NULL);
break;
case 0x0004:
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_3GUP_interface, NULL);
break;
case 0x0005:
offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_h248_package_3GUP_initdir, NULL);
break;
default:
proto_tree_add_text(tree, tvb, offset, -1,"PropertyID not decoded(yet) 0x%x",name_minor);
break;
}
}
static const value_string BNCChar_vals[] = {
{ 1, "aal1" },
{ 2, "aal2" },
@ -715,6 +810,9 @@ guint offset=0;
case 0x0021: /* Generic Bearer Connection Q.1950 Annex A */
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 0x002f: /* 3G User Plane TS 29.232 */
dissect_3G_User_Plane_PDU(implicit_tag, tvb, pinfo, tree, name_minor);
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;
@ -4093,10 +4191,18 @@ 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_ACodec,
{ "ACodec", "h248.package_annex_C.ACodec",
FT_BYTES, BASE_HEX, NULL, 0,
"ACodec", HFILL }},
{ &hf_h248_package_annex_C_TMR,
{ "TMR", "h248.package_annex_C.TMR",
FT_UINT32, BASE_DEC, VALS(isup_transmission_medium_requirement_value), 0,
"BNCChar", HFILL }},
{ &hf_h248_package_annex_C_Mediatx,
{ "Mediatx", "h248.package_annex_C.Mediatx",
FT_UINT32, BASE_DEC, VALS(h248_package_annex_C_Mediatx_vals), 0,
"Mediatx", HFILL }},
{ &hf_h248_package_annex_C_USI,
{ "USI", "h248.package_annex_C.USI",
FT_BYTES, BASE_HEX, NULL, 0,
@ -4109,6 +4215,26 @@ void proto_register_h248(void) {
{ "NSAP", "h248.package_annex_C.NSAP",
FT_BYTES, BASE_HEX, NULL, 0,
"NSAP", HFILL }},
{ &hf_h248_package_3GUP_Mode,
{ "Mode", "h248.package_3GUP.Mode",
FT_UINT32, BASE_DEC, VALS(h248_3GUP_Mode_vals), 0,
"Mode", HFILL }},
{ &hf_h248_package_3GUP_UPversions,
{ "UPversions", "h248.package_3GUP.upversions",
FT_UINT32, BASE_DEC, VALS(h248_3GUP_upversions_vals), 0,
"UPversions", HFILL }},
{ &hf_h248_package_3GUP_delerrsdu,
{ "Delivery of erroneous SDUs", "h248.package_3GUP.delerrsdu",
FT_UINT32, BASE_DEC, VALS(h248_3GUP_delerrsdu_vals), 0,
"Delivery of erroneous SDUs", HFILL }},
{ &hf_h248_package_3GUP_interface,
{ "Interface", "h248.package_3GUP.interface",
FT_UINT32, BASE_DEC, VALS(h248_3GUP_interface_vals), 0,
"Interface", HFILL }},
{ &hf_h248_package_3GUP_initdir,
{ "Initialisation Direction", "h248.package_3GUP.initdir",
FT_UINT32, BASE_DEC, VALS(h248_3GUP_initdir_vals), 0,
"Initialisation Direction", HFILL }},
/*--- Included file: packet-h248-hfarr.c ---*/
@ -4187,11 +4313,11 @@ void proto_register_h248(void) {
"", HFILL }},
{ &hf_h248_iP4Address,
{ "address", "h248.address",
FT_BYTES, BASE_HEX, NULL, 0,
FT_IPv4, BASE_NONE, NULL, 0,
"IP4Address/address", HFILL }},
{ &hf_h248_iP6Address,
{ "address", "h248.address",
FT_BYTES, BASE_HEX, NULL, 0,
FT_IPv6, BASE_NONE, NULL, 0,
"IP6Address/address", HFILL }},
{ &hf_h248_transactionRequest,
{ "transactionRequest", "h248.transactionRequest",

View 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. */
/* 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$
*
* 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 */