aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-08-20 21:18:43 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-08-20 21:18:43 +0000
commit43d1b4c099ac72fa0a5af6166ce8cd5768af4059 (patch)
tree703063e9800b30047749568e12ca094cf39719ba
parentcf6d4692aa8db3656ea275118cf37535808275ee (diff)
Dissect some more H.245 messages in MEGACO
svn path=/trunk/; revision=18966
-rw-r--r--asn1/h245/h245-exp.cnf3
-rw-r--r--asn1/h245/h245.cnf1
-rw-r--r--epan/dissectors/packet-h245.c150
-rw-r--r--epan/dissectors/packet-h245.h3
-rw-r--r--epan/libwireshark.def1
-rw-r--r--plugins/megaco/packet-megaco.c102
6 files changed, 180 insertions, 80 deletions
diff --git a/asn1/h245/h245-exp.cnf b/asn1/h245/h245-exp.cnf
index a764991462..070bdb8be0 100644
--- a/asn1/h245/h245-exp.cnf
+++ b/asn1/h245/h245-exp.cnf
@@ -1,6 +1,6 @@
# Do not modify this file.
# It is created automatically by the ASN.1 to Wireshark dissector compiler
-# ./h245-exp.cnf
+# .\h245-exp.cnf
# ../../tools/asn2wrs.py -e -p h245 -c h245.cnf -s packet-h245-template MULTIMEDIA-SYSTEM-CONTROL.asn
#.MODULE
@@ -8,6 +8,7 @@ MULTIMEDIA-SYSTEM-CONTROL h245
#.END
#.TYPE_ATTR
+H223Capability TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
QOSCapability TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
DataProtocolCapability TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(DataProtocolCapability_vals) BITMASK = 0
T38FaxProfile TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 6511bd720c..9a7f444622 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -8,6 +8,7 @@ T38FaxProfile
DataProtocolCapability NO_PROT_PREFIX
OpenLogicalChannel
QOSCapability
+H223Capability
#.PDU
OpenLogicalChannel
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c
index 989e9f57ef..7165cff265 100644
--- a/epan/dissectors/packet-h245.c
+++ b/epan/dissectors/packet-h245.c
@@ -2259,7 +2259,7 @@ static const per_sequence_t H221NonStandardID_sequence[] = {
static int
dissect_h245_H221NonStandardID(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 701 "h245.cnf"
+#line 702 "h245.cnf"
t35CountryCode = 0;
t35Extension = 0;
manufacturerCode = 0;
@@ -2267,7 +2267,7 @@ dissect_h245_H221NonStandardID(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_H221NonStandardID, H221NonStandardID_sequence);
-#line 705 "h245.cnf"
+#line 706 "h245.cnf"
h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode;
proto_tree_add_uint(tree, hf_h245Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard);
@@ -2289,7 +2289,7 @@ static const per_choice_t NonStandardIdentifier_choice[] = {
static int
dissect_h245_NonStandardIdentifier(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 682 "h245.cnf"
+#line 683 "h245.cnf"
guint32 value;
nsiOID = "";
@@ -2318,7 +2318,7 @@ dissect_h245_NonStandardIdentifier(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _
static int
dissect_h245_T_nsd_data(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 716 "h245.cnf"
+#line 717 "h245.cnf"
tvbuff_t *next_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -2341,7 +2341,7 @@ static const per_sequence_t NonStandardParameter_sequence[] = {
static int
dissect_h245_NonStandardParameter(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 714 "h245.cnf"
+#line 715 "h245.cnf"
nsp_handle = NULL;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -2396,7 +2396,7 @@ dissect_h245_MasterSlaveDetermination(tvbuff_t *tvb, int offset, asn1_ctx_t *act
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDetermination, MasterSlaveDetermination_sequence);
-#line 465 "h245.cnf"
+#line 466 "h245.cnf"
h245_pi->msg_type = H245_MastSlvDet;
@@ -2882,7 +2882,7 @@ static const per_sequence_t H223Capability_sequence[] = {
{ NULL, 0, 0, NULL }
};
-static int
+int
dissect_h245_H223Capability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_H223Capability, H223Capability_sequence);
@@ -3295,7 +3295,7 @@ static int
dissect_h245_T_standardOid(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_object_identifier_str(tvb, offset, actx, tree, hf_index, &standard_oid_str);
-#line 504 "h245.cnf"
+#line 505 "h245.cnf"
if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0)
h245_lc_dissector = amr_handle;
@@ -3528,7 +3528,7 @@ static const per_choice_t Application_choice[] = {
static int
dissect_h245_Application(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 398 "h245.cnf"
+#line 399 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -5058,7 +5058,7 @@ dissect_h245_H263VideoCapability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_H263VideoCapability, H263VideoCapability_sequence);
-#line 265 "h245.cnf"
+#line 266 "h245.cnf"
h245_lc_dissector = h263_handle;
return offset;
@@ -5151,7 +5151,7 @@ static const per_choice_t VideoCapability_choice[] = {
static int
dissect_h245_VideoCapability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 389 "h245.cnf"
+#line 390 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -5470,7 +5470,7 @@ static const per_choice_t AudioCapability_choice[] = {
static int
dissect_h245_AudioCapability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 380 "h245.cnf"
+#line 381 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -6051,7 +6051,7 @@ dissect_h245_SET_SIZE_1_256_OF_CapabilityDescriptor(tvbuff_t *tvb, int offset, a
static int
dissect_h245_T_subMessageIdentifier(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 509 "h245.cnf"
+#line 510 "h245.cnf"
guint32 subMessageIdentifer;
@@ -6115,7 +6115,7 @@ dissect_h245_TerminalCapabilitySet(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySet, TerminalCapabilitySet_sequence);
-#line 480 "h245.cnf"
+#line 481 "h245.cnf"
h245_pi->msg_type = H245_TermCapSet;
@@ -6126,7 +6126,7 @@ dissect_h245_TerminalCapabilitySet(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _
static int
dissect_h245_LogicalChannelNumber(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 120 "h245.cnf"
+#line 121 "h245.cnf"
guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1U, 65535U, &value, FALSE);
@@ -6143,7 +6143,7 @@ static int
dissect_h245_OLC_fw_lcn(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_h245_LogicalChannelNumber(tvb, offset, actx, tree, hf_index);
-#line 126 "h245.cnf"
+#line 127 "h245.cnf"
h223_fw_lc_num = h245_lc_temp;
return offset;
@@ -6606,7 +6606,7 @@ dissect_h245_H222LogicalChannelParameters(tvbuff_t *tvb, int offset, asn1_ctx_t
static int
dissect_h245_T_h223_al_type_al1Framed(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 157 "h245.cnf"
+#line 158 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al1Framed;
@@ -6619,7 +6619,7 @@ dissect_h245_T_h223_al_type_al1Framed(tvbuff_t *tvb, int offset, asn1_ctx_t *act
static int
dissect_h245_T_h223_al_type_al1NotFramed(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 162 "h245.cnf"
+#line 163 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al1NotFramed;
@@ -6632,7 +6632,7 @@ dissect_h245_T_h223_al_type_al1NotFramed(tvbuff_t *tvb, int offset, asn1_ctx_t *
static int
dissect_h245_T_h223_al_type_al2WithoutSequenceNumbers(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 167 "h245.cnf"
+#line 168 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al2WithoutSequenceNumbers;
@@ -6645,7 +6645,7 @@ dissect_h245_T_h223_al_type_al2WithoutSequenceNumbers(tvbuff_t *tvb, int offset,
static int
dissect_h245_T_h223_al_type_al2WithSequenceNumbers(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 172 "h245.cnf"
+#line 173 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al2WithSequenceNumbers;
@@ -6658,7 +6658,7 @@ dissect_h245_T_h223_al_type_al2WithSequenceNumbers(tvbuff_t *tvb, int offset, as
static int
dissect_h245_T_controlFieldOctets(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 186 "h245.cnf"
+#line 187 "h245.cnf"
guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 2U, &value, FALSE);
@@ -6674,7 +6674,7 @@ dissect_h245_T_controlFieldOctets(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U
static int
dissect_h245_T_al3_sendBufferSize(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 195 "h245.cnf"
+#line 196 "h245.cnf"
guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 16777215U, &value, FALSE);
@@ -6705,7 +6705,7 @@ dissect_h245_Al3(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tr
static int
dissect_h245_T_h223_al_type_al3(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 177 "h245.cnf"
+#line 178 "h245.cnf"
if(h223_lc_params_temp) {
h223_lc_params_temp->al_type = al3;
h223_lc_params_temp->al_params = se_alloc(sizeof(h223_al3_params));
@@ -6900,7 +6900,7 @@ dissect_h245_H223AL1MParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,
static int
dissect_h245_T_h223_al_type_al1M(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 202 "h245.cnf"
+#line 203 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al1M;
@@ -6950,7 +6950,7 @@ dissect_h245_H223AL2MParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,
static int
dissect_h245_T_h223_al_type_al2M(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 207 "h245.cnf"
+#line 208 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al2M;
@@ -7038,7 +7038,7 @@ dissect_h245_H223AL3MParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,
static int
dissect_h245_T_h223_al_type_al3M(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 212 "h245.cnf"
+#line 213 "h245.cnf"
if(h223_lc_params_temp)
h223_lc_params_temp->al_type = al3M;
@@ -7087,7 +7087,7 @@ dissect_h245_T_adaptationLayerType(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _
static int
dissect_h245_T_h223_lc_segmentableFlag(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 219 "h245.cnf"
+#line 220 "h245.cnf"
guint32 value;
offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, &value);
@@ -7117,7 +7117,7 @@ dissect_h245_H223LogicalChannelParameters(tvbuff_t *tvb, int offset, asn1_ctx_t
static int
dissect_h245_OLC_fw_h223_params(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 139 "h245.cnf"
+#line 140 "h245.cnf"
h223_fw_lc_params = se_alloc(sizeof(h223_lc_params));
h223_fw_lc_params->al_type = al_nonStandard;
h223_fw_lc_params->al_params = NULL;
@@ -7291,7 +7291,7 @@ dissect_h245_V76LogicalChannelParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *
static int
dissect_h245_Ipv4_network(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 516 "h245.cnf"
+#line 517 "h245.cnf"
tvbuff_t *value_tvb;
@@ -7313,7 +7313,7 @@ dissect_h245_Ipv4_network(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto
static int
dissect_h245_TsapIdentifier(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 529 "h245.cnf"
+#line 530 "h245.cnf"
guint32 tsapIdentifier;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -7572,14 +7572,14 @@ dissect_h245_TransportAddress(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, p
static int
dissect_h245_T_mediaChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 547 "h245.cnf"
+#line 548 "h245.cnf"
media_channel = TRUE;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 577 "h245.cnf"
+#line 578 "h245.cnf"
media_channel = FALSE;
@@ -7591,14 +7591,14 @@ dissect_h245_T_mediaChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, pro
static int
dissect_h245_T_mediaControlChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 559 "h245.cnf"
+#line 560 "h245.cnf"
media_control_channel = TRUE;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 583 "h245.cnf"
+#line 584 "h245.cnf"
media_control_channel = FALSE;
@@ -7730,7 +7730,7 @@ static const per_sequence_t T_forwardLogicalChannelParameters_sequence[] = {
static int
dissect_h245_T_forwardLogicalChannelParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 130 "h245.cnf"
+#line 131 "h245.cnf"
h245_lc_dissector = NULL;
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_T_forwardLogicalChannelParameters, T_forwardLogicalChannelParameters_sequence);
@@ -7748,7 +7748,7 @@ dissect_h245_T_forwardLogicalChannelParameters(tvbuff_t *tvb, int offset, asn1_c
static int
dissect_h245_OLC_rev_h223_params(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 148 "h245.cnf"
+#line 149 "h245.cnf"
h223_rev_lc_params = se_alloc(sizeof(h223_lc_params));
h223_rev_lc_params->al_type = al_nonStandard;
h223_rev_lc_params->al_params = NULL;
@@ -7778,7 +7778,7 @@ static const per_choice_t OLC_rev_multiplexParameters_choice[] = {
static int
dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 633 "h245.cnf"
+#line 634 "h245.cnf"
media_channel = FALSE;
@@ -7789,7 +7789,7 @@ dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *
ett_h245_OLC_rev_multiplexParameters, OLC_rev_multiplexParameters_choice,
NULL);
-#line 641 "h245.cnf"
+#line 642 "h245.cnf"
if (!actx->pinfo->fd->flags.visited) {
if (codec_type && (strcmp(codec_type, "t38fax")==0)) {
@@ -8033,7 +8033,7 @@ static const per_sequence_t OpenLogicalChannel_sequence[] = {
int
dissect_h245_OpenLogicalChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 101 "h245.cnf"
+#line 102 "h245.cnf"
gint32 temp;
h223_fw_lc_num = 0;
@@ -8052,7 +8052,7 @@ dissect_h245_OpenLogicalChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,
}
-#line 491 "h245.cnf"
+#line 492 "h245.cnf"
if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn;
@@ -8118,7 +8118,7 @@ dissect_h245_CloseLogicalChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_CloseLogicalChannel, CloseLogicalChannel_sequence);
-#line 445 "h245.cnf"
+#line 446 "h245.cnf"
h245_pi->msg_type = H245_CloseLogChn;
@@ -8171,7 +8171,7 @@ dissect_h245_RequestChannelClose(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_
static int
dissect_h245_MultiplexTableEntryNumber(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 45 "h245.cnf"
+#line 46 "h245.cnf"
guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1U, 15U, &value, FALSE);
@@ -8186,7 +8186,7 @@ dissect_h245_MultiplexTableEntryNumber(tvbuff_t *tvb, int offset, asn1_ctx_t *ac
static int
dissect_h245_T_logicalChannelNum(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 71 "h245.cnf"
+#line 72 "h245.cnf"
/*MultiplexElement/type/logicalChannelNumber*/
guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -8206,7 +8206,7 @@ static const per_sequence_t T_subElementList_sequence_of[1] = {
static int
dissect_h245_T_subElementList(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 79 "h245.cnf"
+#line 80 "h245.cnf"
h223_mux_element dummy_me, *parent_me = h223_me;
h223_me = &dummy_me;
offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
@@ -8247,7 +8247,7 @@ dissect_h245_Me_type(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree
static int
dissect_h245_ME_finiteRepeatCount(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 94 "h245.cnf"
+#line 95 "h245.cnf"
guint32 value;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1U, 65535U, &value, FALSE);
@@ -8264,7 +8264,7 @@ static int
dissect_h245_T_untilClosingFlag(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_per_null(tvb, offset, actx, tree, hf_index);
-#line 88 "h245.cnf"
+#line 89 "h245.cnf"
h223_me->repeat_count = 0;
return offset;
@@ -8301,7 +8301,7 @@ static const per_sequence_t MultiplexElement_sequence[] = {
static int
dissect_h245_MultiplexElement(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 61 "h245.cnf"
+#line 62 "h245.cnf"
/*MultiplexElement*/
h223_mux_element* me = se_alloc(sizeof(h223_mux_element));
h223_me->next = me;
@@ -8321,7 +8321,7 @@ static const per_sequence_t T_elementList_sequence_of[1] = {
static int
dissect_h245_T_elementList(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 51 "h245.cnf"
+#line 52 "h245.cnf"
/* create a h223_mux_element to hold onto the head of the list, since
* h223_me will track the tail */
h223_mux_element dummy_me;
@@ -8346,7 +8346,7 @@ static const per_sequence_t MultiplexEntryDescriptor_sequence[] = {
static int
dissect_h245_MultiplexEntryDescriptor(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 33 "h245.cnf"
+#line 34 "h245.cnf"
/*MultiplexEntryDescriptor*/
h223_me = NULL;
h223_mc = 0;
@@ -8611,7 +8611,7 @@ static const per_choice_t VideoMode_choice[] = {
static int
dissect_h245_VideoMode(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 414 "h245.cnf"
+#line 415 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -8938,7 +8938,7 @@ static const per_choice_t AudioMode_choice[] = {
static int
dissect_h245_AudioMode(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 406 "h245.cnf"
+#line 407 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -9006,7 +9006,7 @@ static const per_choice_t DataModeApplication_choice[] = {
static int
dissect_h245_DataModeApplication(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 422 "h245.cnf"
+#line 423 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -9994,7 +9994,7 @@ static const per_choice_t RequestMessage_choice[] = {
static int
dissect_h245_RequestMessage(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 269 "h245.cnf"
+#line 270 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -10071,7 +10071,7 @@ dissect_h245_MasterSlaveDeterminationAck(tvbuff_t *tvb, int offset, asn1_ctx_t *
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDeterminationAck, MasterSlaveDeterminationAck_sequence);
-#line 430 "h245.cnf"
+#line 431 "h245.cnf"
h245_pi->msg_type = H245_MastSlvDetAck;
@@ -10109,7 +10109,7 @@ dissect_h245_MasterSlaveDeterminationReject(tvbuff_t *tvb, int offset, asn1_ctx_
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDeterminationReject, MasterSlaveDeterminationReject_sequence);
-#line 435 "h245.cnf"
+#line 436 "h245.cnf"
h245_pi->msg_type = H245_MastSlvDetRjc;
@@ -10128,7 +10128,7 @@ dissect_h245_TerminalCapabilitySetAck(tvbuff_t *tvb, int offset, asn1_ctx_t *act
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySetAck, TerminalCapabilitySetAck_sequence);
-#line 460 "h245.cnf"
+#line 461 "h245.cnf"
h245_pi->msg_type = H245_TermCapSetAck;
@@ -10196,7 +10196,7 @@ dissect_h245_TerminalCapabilitySetReject(tvbuff_t *tvb, int offset, asn1_ctx_t *
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySetReject, TerminalCapabilitySetReject_sequence);
-#line 470 "h245.cnf"
+#line 471 "h245.cnf"
h245_pi->msg_type = H245_TermCapSetRjc;
@@ -10209,7 +10209,7 @@ static int
dissect_h245_OLC_ack_fw_lcn(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_h245_LogicalChannelNumber(tvb, offset, actx, tree, hf_index);
-#line 257 "h245.cnf"
+#line 258 "h245.cnf"
h223_fw_lc_num = h245_lc_temp;
return offset;
@@ -10221,7 +10221,7 @@ static int
dissect_h245_T_reverseLogicalChannelNumber(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
offset = dissect_h245_LogicalChannelNumber(tvb, offset, actx, tree, hf_index);
-#line 261 "h245.cnf"
+#line 262 "h245.cnf"
h223_rev_lc_num = h245_lc_temp;
return offset;
@@ -10270,14 +10270,14 @@ dissect_h245_OLC_ack_reverseLogicalChannelParameters(tvbuff_t *tvb, int offset,
static int
dissect_h245_Ack_mediaChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 541 "h245.cnf"
+#line 542 "h245.cnf"
media_channel = TRUE;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 565 "h245.cnf"
+#line 566 "h245.cnf"
media_channel = FALSE;
@@ -10289,14 +10289,14 @@ dissect_h245_Ack_mediaChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, p
static int
dissect_h245_Ack_mediaControlChannel(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 553 "h245.cnf"
+#line 554 "h245.cnf"
media_control_channel = TRUE;
offset = dissect_h245_TransportAddress(tvb, offset, actx, tree, hf_index);
-#line 571 "h245.cnf"
+#line 572 "h245.cnf"
media_control_channel = FALSE;
@@ -10337,7 +10337,7 @@ static const per_choice_t T_forwardMultiplexAckParameters_choice[] = {
static int
dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 589 "h245.cnf"
+#line 590 "h245.cnf"
media_channel = FALSE;
@@ -10348,7 +10348,7 @@ dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb, int offset, asn1_ctx
ett_h245_T_forwardMultiplexAckParameters, T_forwardMultiplexAckParameters_choice,
NULL);
-#line 597 "h245.cnf"
+#line 598 "h245.cnf"
if (!actx->pinfo->fd->flags.visited) {
if (codec_type && strcmp(codec_type, "t38fax")==0) {
@@ -10399,7 +10399,7 @@ static const per_sequence_t OpenLogicalChannelAck_sequence[] = {
static int
dissect_h245_OpenLogicalChannelAck(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 227 "h245.cnf"
+#line 228 "h245.cnf"
guint32 temp;
int p2p_dir;
h223_pending_olc *pend;
@@ -10431,7 +10431,7 @@ dissect_h245_OpenLogicalChannelAck(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _
actx->pinfo->p2p_dir = p2p_dir;
-#line 497 "h245.cnf"
+#line 498 "h245.cnf"
h245_pi->msg_type = H245_OpenLogChnAck;
@@ -10499,7 +10499,7 @@ dissect_h245_OpenLogicalChannelReject(tvbuff_t *tvb, int offset, asn1_ctx_t *act
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_OpenLogicalChannelReject, OpenLogicalChannelReject_sequence);
-#line 440 "h245.cnf"
+#line 441 "h245.cnf"
h245_pi->msg_type = H245_OpenLogChnRjc;
@@ -10517,7 +10517,7 @@ dissect_h245_CloseLogicalChannelAck(tvbuff_t *tvb, int offset, asn1_ctx_t *actx
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_CloseLogicalChannelAck, CloseLogicalChannelAck_sequence);
-#line 450 "h245.cnf"
+#line 451 "h245.cnf"
h245_pi->msg_type = H245_CloseLogChnAck;
@@ -11640,7 +11640,7 @@ static const per_choice_t ResponseMessage_choice[] = {
static int
dissect_h245_ResponseMessage(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 307 "h245.cnf"
+#line 308 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -12680,7 +12680,7 @@ static const per_choice_t CommandMessage_choice[] = {
static int
dissect_h245_CommandMessage(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 356 "h245.cnf"
+#line 357 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
@@ -12744,7 +12744,7 @@ dissect_h245_MasterSlaveDeterminationRelease(tvbuff_t *tvb, int offset, asn1_ctx
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_MasterSlaveDeterminationRelease, MasterSlaveDeterminationRelease_sequence);
-#line 475 "h245.cnf"
+#line 476 "h245.cnf"
h245_pi->msg_type = H245_MastSlvDetRls;
@@ -12762,7 +12762,7 @@ dissect_h245_TerminalCapabilitySetRelease(tvbuff_t *tvb, int offset, asn1_ctx_t
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_TerminalCapabilitySetRelease, TerminalCapabilitySetRelease_sequence);
-#line 485 "h245.cnf"
+#line 486 "h245.cnf"
h245_pi->msg_type = H245_TermCapSetRls;
@@ -12781,7 +12781,7 @@ dissect_h245_OpenLogicalChannelConfirm(tvbuff_t *tvb, int offset, asn1_ctx_t *ac
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_h245_OpenLogicalChannelConfirm, OpenLogicalChannelConfirm_sequence);
-#line 455 "h245.cnf"
+#line 456 "h245.cnf"
h245_pi->msg_type = H245_OpenLogChnCnf;
@@ -13722,7 +13722,7 @@ static const per_choice_t IndicationMessage_choice[] = {
static int
dissect_h245_IndicationMessage(tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
-#line 332 "h245.cnf"
+#line 333 "h245.cnf"
guint32 value;
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
diff --git a/epan/dissectors/packet-h245.h b/epan/dissectors/packet-h245.h
index 25f173c58d..264ecd6368 100644
--- a/epan/dissectors/packet-h245.h
+++ b/epan/dissectors/packet-h245.h
@@ -1,6 +1,6 @@
/* Do not modify this file. */
/* It is created automatically by the ASN.1 to Wireshark dissector compiler */
-/* ./packet-h245.h */
+/* .\packet-h245.h */
/* ../../tools/asn2wrs.py -e -p h245 -c h245.cnf -s packet-h245-template MULTIMEDIA-SYSTEM-CONTROL.asn */
/* Input file: packet-h245-template.h */
@@ -133,6 +133,7 @@ extern void h245_set_h223_add_lc_handle( h223_add_lc_handle_t handle );
/*--- Included file: packet-h245-exp.h ---*/
#line 1 "packet-h245-exp.h"
extern const value_string DataProtocolCapability_vals[];
+int dissect_h245_H223Capability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
int dissect_h245_QOSCapability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
int dissect_h245_DataProtocolCapability(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
int dissect_h245_T38FaxProfile(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
diff --git a/epan/libwireshark.def b/epan/libwireshark.def
index d733ef4f0d..d283cf8a91 100644
--- a/epan/libwireshark.def
+++ b/epan/libwireshark.def
@@ -161,6 +161,7 @@ dissect_dcerpc_uint8
dissect_dcerpc_uint16
dissect_dcerpc_uint32
dissect_dcerpc_uuid_t
+dissect_h245_H223Capability
dissect_ndr_uint32
dissect_ndr_uuid_t
dissect_per_bit_string
diff --git a/plugins/megaco/packet-megaco.c b/plugins/megaco/packet-megaco.c
index fb55a2f660..0a422a3100 100644
--- a/plugins/megaco/packet-megaco.c
+++ b/plugins/megaco/packet-megaco.c
@@ -55,6 +55,8 @@
#include <epan/strutil.h>
#include <epan/sctpppids.h>
#include <epan/dissectors/packet-tpkt.h>
+#include <epan/dissectors/packet-per.h>
+#include <epan/dissectors/packet-h245.h>
#define PORT_MEGACO_TXT 2944
#define PORT_MEGACO_BIN 2945
@@ -111,6 +113,7 @@ static int hf_megaco_requestid = -1;
static int hf_megaco_pkgdname = -1;
static int hf_megaco_mId = -1;
static int hf_megaco_h245 = -1;
+static int hf_megaco_h223Capability = -1;
/* Define the trees for megaco */
static int ett_megaco = -1;
@@ -1508,6 +1511,84 @@ dissect_megaco_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *megaco_tree,
}
}
+static void
+dissect_megaco_h324_h223caprn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *megaco_tree, gint offset, gint len, gchar *msg)
+{
+ guint8 buf[10240];
+ asn1_ctx_t actx;
+
+ /* arbitrary maximum length */
+ if(len<20480){
+ int i;
+ tvbuff_t *h245_tvb;
+
+ /* first, skip to where the encoded pdu starts, this is
+ the first hex digit after the '=' char.
+ */
+ while(1){
+ if((*msg==0)||(*msg=='\n')){
+ return;
+ }
+ if(*msg=='='){
+ msg++;
+ break;
+ }
+ msg++;
+ }
+ while(1){
+ if((*msg==0)||(*msg=='\n')){
+ return;
+ }
+ if( ((*msg>='0')&&(*msg<='9'))
+ || ((*msg>='a')&&(*msg<='f'))
+ || ((*msg>='A')&&(*msg<='F'))){
+ break;
+ }
+ msg++;
+ }
+ i=0;
+ while( ((*msg>='0')&&(*msg<='9'))
+ ||((*msg>='a')&&(*msg<='f'))
+ ||((*msg>='A')&&(*msg<='F')) ){
+ int val;
+ if((*msg>='0')&&(*msg<='9')){
+ val=(*msg)-'0';
+ } else if((*msg>='a')&&(*msg<='f')){
+ val=(*msg)-'a'+10;
+ } else if((*msg>='A')&&(*msg<='F')){
+ val=(*msg)-'A'+10;
+ } else {
+ return;
+ }
+ val<<=4;
+ msg++;
+ if((*msg>='0')&&(*msg<='9')){
+ val|=(*msg)-'0';
+ } else if((*msg>='a')&&(*msg<='f')){
+ val|=(*msg)-'a'+10;
+ } else if((*msg>='A')&&(*msg<='F')){
+ val|=(*msg)-'A'+10;
+ } else {
+ return;
+ }
+ msg++;
+
+ buf[i]=(guint8)val;
+ i++;
+ }
+ if(i==0){
+ return;
+ }
+ h245_tvb = tvb_new_real_data(buf,i,i);
+ tvb_set_child_real_data_tvbuff(tvb,h245_tvb);
+ add_new_data_source(pinfo, h245_tvb, "H.245 over MEGACO");
+ /* should go through a handle, however, the two h245 entry
+ points are different, one is over tpkt and the other is raw
+ */
+ asn1_ctx_init(&actx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_h245_H223Capability(h245_tvb, 0, &actx, megaco_tree, hf_megaco_h223Capability);
+ }
+}
static void
dissect_megaco_eventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto_tree *megaco_tree_command_line, gint tvb_RBRKT, gint tvb_previous_offset)
@@ -2467,14 +2548,14 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
guint token_name_len;
gint tvb_offset,tvb_help_offset;
gint token_index = 0;
-
+ gchar *msg;
proto_tree *megaco_LocalControl_tree, *megaco_LocalControl_ti;
tokenlen = 0;
tvb_offset = 0;
tvb_help_offset = 0;
-
+
tokenlen = tvb_next_offset - tvb_current_offset;
@@ -2538,10 +2619,15 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
tokenlen));
tvb_current_offset = tvb_skip_wsp(tvb, tvb_offset +1);
+ tokenlen = tvb_offset - tvb_help_offset;
+ msg=tvb_format_text(tvb,tvb_help_offset, tokenlen);
+ dissect_megaco_h324_h223caprn(tvb, pinfo, megaco_LocalControl_tree, tvb_help_offset, tokenlen, msg);
break;
case H324_MUXTBL_IN: /* h324/muxtbl_in */
+
+
proto_tree_add_string(megaco_LocalControl_tree, hf_megaco_h324_muxtbl_in, tvb,
tvb_current_offset, tokenlen,
tvb_format_text(tvb, tvb_current_offset,
@@ -2549,6 +2635,11 @@ dissect_megaco_LocalControldescriptor(tvbuff_t *tvb, proto_tree *megaco_mediades
tvb_current_offset = tvb_skip_wsp(tvb, tvb_offset +1);
+ tokenlen = tvb_offset - tvb_help_offset;
+ msg=tvb_format_text(tvb,tvb_help_offset, tokenlen);
+ /* Call the existing rotine with tree = NULL to avoid an entry to the tree */
+ dissect_megaco_h245(tvb, pinfo, NULL, tvb_help_offset, tokenlen, msg);
+
break;
default:
@@ -2651,7 +2742,7 @@ proto_register_megaco(void)
{ "h324/muxtbl_in", "megaco.h324_muxtbl_in", FT_STRING, BASE_DEC, NULL, 0x0,
"h324/muxtbl_in", HFILL }},
{ &hf_megaco_h324_h223caprn,
- { "h324/muxtbl_in", "megaco._h324_h223caprn", FT_STRING, BASE_DEC, NULL, 0x0,
+ { "h324/h223caprn", "megaco._h324_h223caprn", FT_STRING, BASE_DEC, NULL, 0x0,
"h324/h223caprn", HFILL }},
{ &hf_megaco_reserve_value,
{ "Reserve Value", "megaco.reservevalue", FT_STRING, BASE_DEC, NULL, 0x0,
@@ -2698,6 +2789,11 @@ proto_register_megaco(void)
{ &hf_megaco_h245,
{ "h245", "megaco.h245", FT_STRING, BASE_DEC, NULL, 0x0,
"Embedded H.245 message", HFILL }},
+ { &hf_megaco_h223Capability,
+ { "h223Capability", "megaco.h245.h223Capability",
+ FT_NONE, BASE_NONE, NULL, 0,
+ "megaco.h245.H223Capability", HFILL }},
+
/* Add more fields here */
};