diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-10-17 10:25:21 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-10-17 10:25:21 +0000 |
commit | 286f231eb9237bd800aa339aff2413f147300552 (patch) | |
tree | dc35a85051ba45f75c10bf12071155666b5d1f96 /epan/dissectors/packet-h245.c | |
parent | 5fa636334baa7c78115a6626f140c6c386725197 (diff) |
new H.323 dissector
- Generic Extensible Framework helper
- Annex M1 (QSIG over H.323)
- Annex M4
- Annex R
H.225/H.245 support for Generic Extensible Framework (GEF)
H.235 register MIKEY into new H.225/H.245 GEF tables
regenerate H.225,H.245,H.235,H.450,H.450-ROS,T.35 from new makefiles
svn path=/trunk/; revision=23216
Diffstat (limited to 'epan/dissectors/packet-h245.c')
-rw-r--r-- | epan/dissectors/packet-h245.c | 331 |
1 files changed, 254 insertions, 77 deletions
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c index f0b37a162f..34464e9a90 100644 --- a/epan/dissectors/packet-h245.c +++ b/epan/dissectors/packet-h245.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-h245.c */ +/* packet-h245.c */ /* ../../tools/asn2wrs.py -e -p h245 -c h245.cnf -s packet-h245-template MULTIMEDIA-SYSTEM-CONTROL.asn */ /* Input file: packet-h245-template.c */ @@ -59,6 +59,7 @@ #include "tap.h" #include "packet-tpkt.h" #include "packet-per.h" +#include "packet-h323.h" #include "packet-h245.h" #include "packet-rtp.h" #include "packet-rtcp.h" @@ -73,7 +74,7 @@ static dissector_handle_t rtcp_handle=NULL; static dissector_handle_t t38_handle=NULL; static dissector_table_t nsp_object_dissector_table; static dissector_table_t nsp_h221_dissector_table; -static dissector_table_t gen_par_dissector_table; +static dissector_table_t gef_content_dissector_table; static dissector_handle_t nsp_handle; static dissector_handle_t data_handle; static dissector_handle_t h245_handle; @@ -215,15 +216,12 @@ static const value_string h245_AudioCapability_short_vals[] = { an OLC is read */ const char* codec_type = NULL; -static const char *standard_oid_str; static guint32 ipv4_address; static guint32 ipv4_port; static guint32 rtcp_ipv4_address; static guint32 rtcp_ipv4_port; static gboolean media_channel; static gboolean media_control_channel; -static const char *gen_par_prefix; -static const char *gen_par_str; /* NonStandardParameter */ static const char *nsiOID; @@ -373,8 +371,8 @@ static int hf_h245_mobileMultilinkReconfigurationIndication = -1; /* MobileMult static int hf_h245_genericIndication = -1; /* GenericMessage */ static int hf_h245_messageIdentifier = -1; /* CapabilityIdentifier */ static int hf_h245_subMessageIdentifier = -1; /* T_subMessageIdentifier */ -static int hf_h245_messageContent = -1; /* SEQUENCE_OF_GenericParameter */ -static int hf_h245_messageContent_item = -1; /* GenericParameter */ +static int hf_h245_messageContent = -1; /* T_messageContent */ +static int hf_h245_messageContent_item = -1; /* T_messageContent_item */ static int hf_h245_nonStandardData = -1; /* NonStandardParameter */ static int hf_h245_nonStandardIdentifier = -1; /* NonStandardIdentifier */ static int hf_h245_nsd_data = -1; /* T_nsd_data */ @@ -961,12 +959,12 @@ static int hf_h245_nonStandardParams_item = -1; /* NonStandardParameter */ static int hf_h245_chairControlCapability = -1; /* BOOLEAN */ static int hf_h245_videoIndicateMixingCapability = -1; /* BOOLEAN */ static int hf_h245_multipointVisualizationCapability = -1; /* BOOLEAN */ -static int hf_h245_capabilityIdentifier = -1; /* CapabilityIdentifier */ -static int hf_h245_collapsing = -1; /* SEQUENCE_OF_GenericParameter */ -static int hf_h245_collapsing_item = -1; /* GenericParameter */ -static int hf_h245_nonCollapsing = -1; /* SEQUENCE_OF_GenericParameter */ -static int hf_h245_nonCollapsing_item = -1; /* GenericParameter */ -static int hf_h245_nonCollapsingRaw = -1; /* OCTET_STRING */ +static int hf_h245_capabilityIdentifier = -1; /* T_capabilityIdentifier */ +static int hf_h245_collapsing = -1; /* T_collapsing */ +static int hf_h245_collapsing_item = -1; /* T_collapsing_item */ +static int hf_h245_nonCollapsing = -1; /* T_nonCollapsing */ +static int hf_h245_nonCollapsing_item = -1; /* T_nonCollapsing_item */ +static int hf_h245_nonCollapsingRaw = -1; /* T_nonCollapsingRaw */ static int hf_h245_transport = -1; /* DataProtocolCapability */ static int hf_h245_standardOid = -1; /* T_standardOid */ static int hf_h245_h221NonStandard = -1; /* NonStandardParameter */ @@ -1687,7 +1685,7 @@ static int hf_h245_encrypted = -1; /* OCTET_STRING */ static int hf_h245_encryptedAlphanumeric = -1; /* EncryptedAlphanumeric */ /*--- End of included file: packet-h245-hf.c ---*/ -#line 284 "packet-h245-template.c" +#line 282 "packet-h245-template.c" /* Initialize the subtree pointers */ @@ -1699,7 +1697,7 @@ static gint ett_h245_ResponseMessage = -1; static gint ett_h245_CommandMessage = -1; static gint ett_h245_IndicationMessage = -1; static gint ett_h245_GenericMessage = -1; -static gint ett_h245_SEQUENCE_OF_GenericParameter = -1; +static gint ett_h245_T_messageContent = -1; static gint ett_h245_NonStandardMessage = -1; static gint ett_h245_NonStandardParameter = -1; static gint ett_h245_NonStandardIdentifier = -1; @@ -1851,11 +1849,14 @@ static gint ett_h245_SEQUENCE_SIZE_1_16_OF_NonStandardParameter = -1; static gint ett_h245_ConferenceCapability = -1; static gint ett_h245_SEQUENCE_OF_NonStandardParameter = -1; static gint ett_h245_GenericCapability = -1; +static gint ett_h245_T_collapsing = -1; +static gint ett_h245_T_nonCollapsing = -1; static gint ett_h245_CapabilityIdentifier = -1; static gint ett_h245_GenericParameter = -1; static gint ett_h245_SEQUENCE_OF_ParameterIdentifier = -1; static gint ett_h245_ParameterIdentifier = -1; static gint ett_h245_ParameterValue = -1; +static gint ett_h245_SEQUENCE_OF_GenericParameter = -1; static gint ett_h245_MultiplexedStreamCapability = -1; static gint ett_h245_MultiplexFormat = -1; static gint ett_h245_AudioTelephonyEventCapability = -1; @@ -2183,7 +2184,7 @@ static gint ett_h245_FlowControlIndication = -1; static gint ett_h245_MobileMultilinkReconfigurationIndication = -1; /*--- End of included file: packet-h245-ett.c ---*/ -#line 287 "packet-h245-template.c" +#line 285 "packet-h245-template.c" /* Forward declarations */ static int dissect_h245_MultimediaSystemControlMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_); @@ -2271,7 +2272,7 @@ static const per_sequence_t H221NonStandardID_sequence[] = { static int dissect_h245_H221NonStandardID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 769 "h245.cnf" +#line 863 "h245.cnf" t35CountryCode = 0; t35Extension = 0; manufacturerCode = 0; @@ -2279,7 +2280,7 @@ dissect_h245_H221NonStandardID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_H221NonStandardID, H221NonStandardID_sequence); -#line 773 "h245.cnf" +#line 867 "h245.cnf" h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode; proto_tree_add_uint(tree, hf_h245Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard); @@ -2301,7 +2302,7 @@ static const per_choice_t NonStandardIdentifier_choice[] = { static int dissect_h245_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 750 "h245.cnf" +#line 844 "h245.cnf" guint32 value; nsiOID = ""; @@ -2330,7 +2331,7 @@ dissect_h245_NonStandardIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_h245_T_nsd_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 784 "h245.cnf" +#line 878 "h245.cnf" tvbuff_t *next_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -2353,7 +2354,7 @@ static const per_sequence_t NonStandardParameter_sequence[] = { static int dissect_h245_NonStandardParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 782 "h245.cnf" +#line 876 "h245.cnf" nsp_handle = NULL; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, @@ -3306,13 +3307,19 @@ dissect_h245_T_t38fax(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_h245_T_standardOid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 637 "h245.cnf" + const gchar *standard_oid_str = NULL; + gef_ctx_t *gefx; + offset = dissect_per_object_identifier_str(tvb, offset, actx, tree, hf_index, &standard_oid_str); -#line 539 "h245.cnf" - gen_par_prefix = ep_strdup(standard_oid_str); + gefx = gef_ctx_get(actx->private_data); + if (gefx) gefx->id = standard_oid_str; + if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0) h245_lc_dissector = amr_handle; + return offset; } @@ -3365,6 +3372,19 @@ dissect_h245_CapabilityIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int +dissect_h245_T_capabilityIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_h245_CapabilityIdentifier(tvb, offset, actx, tree, hf_index); + +#line 588 "h245.cnf" + gef_ctx_update_key(gef_ctx_get(actx->private_data)); + /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "***DEBUG capabilityIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/ + + return offset; +} + + + +static int dissect_h245_INTEGER_0_4294967295(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4294967295U, NULL, FALSE); @@ -3376,13 +3396,15 @@ dissect_h245_INTEGER_0_4294967295(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_h245_T_standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 570 "h245.cnf" - gint32 value_int; +#line 654 "h245.cnf" + gint32 value_int = -1; + gef_ctx_t *gefx; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 127U, &value_int, FALSE); - gen_par_str = ep_strdup_printf("%d", value_int); + gefx = gef_ctx_get(actx->private_data); + if (gefx) gefx->id = ep_strdup_printf("%d", value_int); return offset; @@ -3420,8 +3442,9 @@ static int dissect_h245_T_parameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_h245_ParameterIdentifier(tvb, offset, actx, tree, hf_index); -#line 566 "h245.cnf" - gen_par_str = ep_strdup_printf("%s-%s", gen_par_prefix, gen_par_str); +#line 649 "h245.cnf" + gef_ctx_update_key(gef_ctx_get(actx->private_data)); + /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "***DEBUG capabilityIdentifier: %s", gef_ctx_get(actx->private_data)->key);*/ return offset; } @@ -3430,13 +3453,18 @@ dissect_h245_T_parameterIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_h245_T_octetString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 577 "h245.cnf" +#line 663 "h245.cnf" tvbuff_t *value_tvb; + gef_ctx_t *gefx; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, &value_tvb); - dissector_try_string(gen_par_dissector_table, gen_par_str, value_tvb, actx->pinfo, tree); + gefx = gef_ctx_get(actx->private_data); + if (gefx) { + /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + } return offset; @@ -3444,7 +3472,7 @@ dissect_h245_T_octetString(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static const per_sequence_t SEQUENCE_OF_GenericParameter_sequence_of[1] = { - { &hf_h245_messageContent_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h245_GenericParameter }, + { &hf_h245_genericParameters_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h245_GenericParameter }, }; static int @@ -3512,9 +3540,6 @@ static const per_sequence_t GenericParameter_sequence[] = { static int dissect_h245_GenericParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 564 "h245.cnf" - gen_par_str = ""; - offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_GenericParameter, GenericParameter_sequence); @@ -3522,24 +3547,116 @@ dissect_h245_GenericParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act } + +static int +dissect_h245_T_collapsing_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 593 "h245.cnf" + gef_ctx_t *parent_gefx; + + parent_gefx = gef_ctx_get(actx->private_data); + actx->private_data = gef_ctx_alloc(parent_gefx, "collapsing"); + + offset = dissect_h245_GenericParameter(tvb, offset, actx, tree, hf_index); + +#line 598 "h245.cnf" + actx->private_data = parent_gefx; + + return offset; +} + + +static const per_sequence_t T_collapsing_sequence_of[1] = { + { &hf_h245_collapsing_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h245_T_collapsing_item }, +}; + +static int +dissect_h245_T_collapsing(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, + ett_h245_T_collapsing, T_collapsing_sequence_of); + + return offset; +} + + + +static int +dissect_h245_T_nonCollapsing_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 602 "h245.cnf" + gef_ctx_t *parent_gefx; + + parent_gefx = gef_ctx_get(actx->private_data); + actx->private_data = gef_ctx_alloc(parent_gefx, "nonCollapsing"); + + offset = dissect_h245_GenericParameter(tvb, offset, actx, tree, hf_index); + +#line 607 "h245.cnf" + actx->private_data = parent_gefx; + + return offset; +} + + +static const per_sequence_t T_nonCollapsing_sequence_of[1] = { + { &hf_h245_nonCollapsing_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h245_T_nonCollapsing_item }, +}; + +static int +dissect_h245_T_nonCollapsing(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, + ett_h245_T_nonCollapsing, T_nonCollapsing_sequence_of); + + return offset; +} + + + +static int +dissect_h245_T_nonCollapsingRaw(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 611 "h245.cnf" + tvbuff_t *value_tvb; + gef_ctx_t *parent_gefx; + gef_ctx_t *gefx; + + parent_gefx = gef_ctx_get(actx->private_data); + actx->private_data = gef_ctx_alloc(parent_gefx, "nonCollapsingRaw"); + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, + NO_BOUND, NO_BOUND, &value_tvb); + + gefx = gef_ctx_get(actx->private_data); + if (gefx) { + /* DEBUG */ /*proto_tree_add_text(tree, tvb, offset>>3, 0, "*** DEBUG dissector_try_string: %s", gefx->key);*/ + actx->pinfo->private_data = actx; + dissector_try_string(gef_content_dissector_table, gefx->key, value_tvb, actx->pinfo, tree); + } + actx->private_data = parent_gefx; + + + return offset; +} + + static const per_sequence_t GenericCapability_sequence[] = { - { &hf_h245_capabilityIdentifier, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_CapabilityIdentifier }, + { &hf_h245_capabilityIdentifier, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_T_capabilityIdentifier }, { &hf_h245_maxBitRate2_0_4294967295, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_INTEGER_0_4294967295 }, - { &hf_h245_collapsing , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_SEQUENCE_OF_GenericParameter }, - { &hf_h245_nonCollapsing , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_SEQUENCE_OF_GenericParameter }, - { &hf_h245_nonCollapsingRaw, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_OCTET_STRING }, + { &hf_h245_collapsing , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_T_collapsing }, + { &hf_h245_nonCollapsing , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_T_nonCollapsing }, + { &hf_h245_nonCollapsingRaw, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_T_nonCollapsingRaw }, { &hf_h245_transport , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_DataProtocolCapability }, { NULL, 0, 0, NULL } }; static int dissect_h245_GenericCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 545 "h245.cnf" - gen_par_prefix = ""; +#line 581 "h245.cnf" + void *priv_data = actx->private_data; + actx->private_data = gef_ctx_alloc(NULL, "GenericCapability"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_GenericCapability, GenericCapability_sequence); +#line 584 "h245.cnf" + actx->private_data = priv_data; + return offset; } @@ -6118,13 +6235,48 @@ dissect_h245_SET_SIZE_1_256_OF_CapabilityDescriptor(tvbuff_t *tvb _U_, int offse static int dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 553 "h245.cnf" +#line 554 "h245.cnf" guint32 subMessageIdentifer; - - + gef_ctx_t *gefx; + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 127U, &subMessageIdentifer, FALSE); + gefx = gef_ctx_get(actx->private_data); + if (gefx) gefx->subid = ep_strdup_printf("%u", subMessageIdentifer); + + + return offset; +} + + + +static int +dissect_h245_T_messageContent_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 563 "h245.cnf" + gef_ctx_t *parent_gefx; + + parent_gefx = gef_ctx_get(actx->private_data); + actx->private_data = gef_ctx_alloc(parent_gefx, NULL); + + offset = dissect_h245_GenericParameter(tvb, offset, actx, tree, hf_index); + +#line 568 "h245.cnf" + actx->private_data = parent_gefx; + + return offset; +} + + +static const per_sequence_t T_messageContent_sequence_of[1] = { + { &hf_h245_messageContent_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_h245_T_messageContent_item }, +}; + +static int +dissect_h245_T_messageContent(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_per_sequence_of(tvb, offset, actx, tree, hf_index, + ett_h245_T_messageContent, T_messageContent_sequence_of); + return offset; } @@ -6132,18 +6284,29 @@ dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ static const per_sequence_t GenericMessage_sequence[] = { { &hf_h245_messageIdentifier, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_h245_CapabilityIdentifier }, { &hf_h245_subMessageIdentifier, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_T_subMessageIdentifier }, - { &hf_h245_messageContent , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_SEQUENCE_OF_GenericParameter }, + { &hf_h245_messageContent , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_h245_T_messageContent }, { NULL, 0, 0, NULL } }; static int dissect_h245_GenericMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 549 "h245.cnf" - gen_par_prefix = ""; +#line 540 "h245.cnf" + void *priv_data = actx->private_data; + gef_ctx_t *gefx; + + /* check if not inherited from GenericInformation */ + gefx = gef_ctx_get(actx->private_data); + if (!gefx) { + gefx = gef_ctx_alloc(NULL, "GenericMessage"); + actx->private_data = gefx; + } offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_GenericMessage, GenericMessage_sequence); +#line 550 "h245.cnf" + actx->private_data = priv_data; + return offset; } @@ -6151,8 +6314,15 @@ dissect_h245_GenericMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_h245_GenericInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 573 "h245.cnf" + void *priv_data = actx->private_data; + actx->private_data = gef_ctx_alloc(NULL, "GenericInformation"); + offset = dissect_h245_GenericMessage(tvb, offset, actx, tree, hf_index); +#line 576 "h245.cnf" + actx->private_data = priv_data; + return offset; } @@ -7362,7 +7532,7 @@ dissect_h245_V76LogicalChannelParameters(tvbuff_t *tvb _U_, int offset _U_, asn1 static int dissect_h245_Ipv4_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 584 "h245.cnf" +#line 678 "h245.cnf" tvbuff_t *value_tvb; @@ -7384,7 +7554,7 @@ dissect_h245_Ipv4_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U static int dissect_h245_TsapIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 597 "h245.cnf" +#line 691 "h245.cnf" guint32 tsapIdentifier; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -7643,14 +7813,14 @@ dissect_h245_TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_h245_T_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 615 "h245.cnf" +#line 709 "h245.cnf" media_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 645 "h245.cnf" +#line 739 "h245.cnf" media_channel = FALSE; @@ -7662,14 +7832,14 @@ dissect_h245_T_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_h245_T_mediaControlChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 627 "h245.cnf" +#line 721 "h245.cnf" media_control_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 651 "h245.cnf" +#line 745 "h245.cnf" media_control_channel = FALSE; @@ -7849,7 +8019,7 @@ static const per_choice_t OLC_rev_multiplexParameters_choice[] = { static int dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 701 "h245.cnf" +#line 795 "h245.cnf" media_channel = FALSE; @@ -7860,7 +8030,7 @@ dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb _U_, int offset _U_, asn1 ett_h245_OLC_rev_multiplexParameters, OLC_rev_multiplexParameters_choice, NULL); -#line 709 "h245.cnf" +#line 803 "h245.cnf" if (!actx->pinfo->fd->flags.visited) { if (codec_type && (strcmp(codec_type, "t38fax")==0)) { @@ -8085,12 +8255,16 @@ static const per_sequence_t EncryptionSync_sequence[] = { static int dissect_h245_EncryptionSync(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 560 "h245.cnf" - gen_par_prefix = "EncryptionSync"; +#line 629 "h245.cnf" + void *priv_data = actx->private_data; + actx->private_data = gef_ctx_alloc(NULL, "EncryptionSync"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_h245_EncryptionSync, EncryptionSync_sequence); +#line 632 "h245.cnf" + actx->private_data = priv_data; + return offset; } @@ -10355,14 +10529,14 @@ dissect_h245_OLC_ack_reverseLogicalChannelParameters(tvbuff_t *tvb _U_, int offs static int dissect_h245_Ack_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 609 "h245.cnf" +#line 703 "h245.cnf" media_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 633 "h245.cnf" +#line 727 "h245.cnf" media_channel = FALSE; @@ -10374,14 +10548,14 @@ dissect_h245_Ack_mediaChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_h245_Ack_mediaControlChannel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 621 "h245.cnf" +#line 715 "h245.cnf" media_control_channel = TRUE; offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index); -#line 639 "h245.cnf" +#line 733 "h245.cnf" media_control_channel = FALSE; @@ -10422,7 +10596,7 @@ static const per_choice_t T_forwardMultiplexAckParameters_choice[] = { static int dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 657 "h245.cnf" +#line 751 "h245.cnf" media_channel = FALSE; @@ -10433,7 +10607,7 @@ dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb _U_, int offset _U_, ett_h245_T_forwardMultiplexAckParameters, T_forwardMultiplexAckParameters_choice, NULL); -#line 665 "h245.cnf" +#line 759 "h245.cnf" if (!actx->pinfo->fd->flags.visited) { if (codec_type && strcmp(codec_type, "t38fax")==0) { @@ -13653,7 +13827,7 @@ dissect_h245_FunctionNotSupportedCause(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_h245_T_returnedFunction(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 793 "h245.cnf" +#line 887 "h245.cnf" tvbuff_t *next_tvb = NULL; proto_item *item; proto_tree *subtree; @@ -13914,7 +14088,7 @@ static void dissect_OpenLogicalChannel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo /*--- End of included file: packet-h245-fn.c ---*/ -#line 296 "packet-h245-template.c" +#line 294 "packet-h245-template.c" static void dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) @@ -14313,11 +14487,11 @@ void proto_register_h245(void) { { &hf_h245_messageContent, { "messageContent", "h245.messageContent", FT_UINT32, BASE_DEC, NULL, 0, - "h245.SEQUENCE_OF_GenericParameter", HFILL }}, + "h245.T_messageContent", HFILL }}, { &hf_h245_messageContent_item, { "Item", "h245.messageContent_item", FT_NONE, BASE_NONE, NULL, 0, - "h245.GenericParameter", HFILL }}, + "h245.T_messageContent_item", HFILL }}, { &hf_h245_nonStandardData, { "nonStandardData", "h245.nonStandardData", FT_NONE, BASE_NONE, NULL, 0, @@ -16665,27 +16839,27 @@ void proto_register_h245(void) { { &hf_h245_capabilityIdentifier, { "capabilityIdentifier", "h245.capabilityIdentifier", FT_UINT32, BASE_DEC, VALS(h245_CapabilityIdentifier_vals), 0, - "h245.CapabilityIdentifier", HFILL }}, + "h245.T_capabilityIdentifier", HFILL }}, { &hf_h245_collapsing, { "collapsing", "h245.collapsing", FT_UINT32, BASE_DEC, NULL, 0, - "h245.SEQUENCE_OF_GenericParameter", HFILL }}, + "h245.T_collapsing", HFILL }}, { &hf_h245_collapsing_item, { "Item", "h245.collapsing_item", FT_NONE, BASE_NONE, NULL, 0, - "h245.GenericParameter", HFILL }}, + "h245.T_collapsing_item", HFILL }}, { &hf_h245_nonCollapsing, { "nonCollapsing", "h245.nonCollapsing", FT_UINT32, BASE_DEC, NULL, 0, - "h245.SEQUENCE_OF_GenericParameter", HFILL }}, + "h245.T_nonCollapsing", HFILL }}, { &hf_h245_nonCollapsing_item, { "Item", "h245.nonCollapsing_item", FT_NONE, BASE_NONE, NULL, 0, - "h245.GenericParameter", HFILL }}, + "h245.T_nonCollapsing_item", HFILL }}, { &hf_h245_nonCollapsingRaw, { "nonCollapsingRaw", "h245.nonCollapsingRaw", FT_BYTES, BASE_HEX, NULL, 0, - "h245.OCTET_STRING", HFILL }}, + "h245.T_nonCollapsingRaw", HFILL }}, { &hf_h245_transport, { "transport", "h245.transport", FT_UINT32, BASE_DEC, VALS(DataProtocolCapability_vals), 0, @@ -16752,7 +16926,7 @@ void proto_register_h245(void) { "h245.INTEGER_0_4294967295", HFILL }}, { &hf_h245_octetString, { "octetString", "h245.octetString", - FT_BYTES, BASE_HEX, NULL, 0, + FT_UINT32, BASE_DEC, NULL, 0, "h245.T_octetString", HFILL }}, { &hf_h245_genericParameters, { "genericParameter", "h245.genericParameter", @@ -19560,7 +19734,7 @@ void proto_register_h245(void) { "h245.EncryptedAlphanumeric", HFILL }}, /*--- End of included file: packet-h245-hfarr.c ---*/ -#line 361 "packet-h245-template.c" +#line 359 "packet-h245-template.c" }; /* List of subtrees */ @@ -19576,7 +19750,7 @@ void proto_register_h245(void) { &ett_h245_CommandMessage, &ett_h245_IndicationMessage, &ett_h245_GenericMessage, - &ett_h245_SEQUENCE_OF_GenericParameter, + &ett_h245_T_messageContent, &ett_h245_NonStandardMessage, &ett_h245_NonStandardParameter, &ett_h245_NonStandardIdentifier, @@ -19728,11 +19902,14 @@ void proto_register_h245(void) { &ett_h245_ConferenceCapability, &ett_h245_SEQUENCE_OF_NonStandardParameter, &ett_h245_GenericCapability, + &ett_h245_T_collapsing, + &ett_h245_T_nonCollapsing, &ett_h245_CapabilityIdentifier, &ett_h245_GenericParameter, &ett_h245_SEQUENCE_OF_ParameterIdentifier, &ett_h245_ParameterIdentifier, &ett_h245_ParameterValue, + &ett_h245_SEQUENCE_OF_GenericParameter, &ett_h245_MultiplexedStreamCapability, &ett_h245_MultiplexFormat, &ett_h245_AudioTelephonyEventCapability, @@ -20060,7 +20237,7 @@ void proto_register_h245(void) { &ett_h245_MobileMultilinkReconfigurationIndication, /*--- End of included file: packet-h245-ettarr.c ---*/ -#line 368 "packet-h245-template.c" +#line 366 "packet-h245-template.c" }; module_t *h245_module; @@ -20087,7 +20264,7 @@ void proto_register_h245(void) { nsp_object_dissector_table = register_dissector_table("h245.nsp.object", "H.245 NonStandardParameter (object)", FT_STRING, BASE_NONE); nsp_h221_dissector_table = register_dissector_table("h245.nsp.h221", "H.245 NonStandardParameter (h221)", FT_UINT32, BASE_HEX); - gen_par_dissector_table = register_dissector_table("h245.gen_par", "H.245 GenericParameter", FT_STRING, BASE_NONE); + gef_content_dissector_table = register_dissector_table("h245.gef.content", "H.245 Generic Extensible Framework", FT_STRING, BASE_NONE); h245_tap = register_tap("h245"); h245dg_tap = register_tap("h245dg"); |