summaryrefslogtreecommitdiff
path: root/asn1/h245
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-05-03 19:55:22 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-05-03 19:55:22 +0000
commitf16eb4e3696c32fac80c3a0afa968a97f77aefff (patch)
treeac0fc00acc8ab9878d351557ee9513f154cbd41a /asn1/h245
parentbb7e52fcd8a9d01e8c37d1ee78eb3570a7cbaee1 (diff)
downloadwireshark-f16eb4e3696c32fac80c3a0afa968a97f77aefff.tar.gz
Dissect returnedFunction.
svn path=/trunk/; revision=21667
Diffstat (limited to 'asn1/h245')
-rw-r--r--asn1/h245/MULTIMEDIA-SYSTEM-CONTROL.asn3
-rw-r--r--asn1/h245/h245.cnf76
-rw-r--r--asn1/h245/packet-h245-template.c16
3 files changed, 73 insertions, 22 deletions
diff --git a/asn1/h245/MULTIMEDIA-SYSTEM-CONTROL.asn b/asn1/h245/MULTIMEDIA-SYSTEM-CONTROL.asn
index ebf1af3d2a..b33a685d67 100644
--- a/asn1/h245/MULTIMEDIA-SYSTEM-CONTROL.asn
+++ b/asn1/h245/MULTIMEDIA-SYSTEM-CONTROL.asn
@@ -116,8 +116,7 @@ IndicationMessage ::= CHOICE {
multilinkIndication MultilinkIndication,
logicalChannelRateRelease LogicalChannelRateRelease,
flowControlIndication FlowControlIndication,
- mobileMultilinkReconfigurationIndication
- MobileMultilinkReconfigurationIndication,
+ mobileMultilinkReconfigurationIndication MobileMultilinkReconfigurationIndication,
genericIndication GenericMessage
}
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 353049f2b7..64b30e4af1 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -291,6 +291,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
col_set_fence(%(ACTX)s->pinfo->cinfo,COL_INFO);
/* Add to packet info */
+ if (h245_pi == NULL)
+ return offset;
/* if it is TCS*/
if ((codec_type != NULL) && ( value == 2))
@@ -324,9 +326,11 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
col_set_fence(%(ACTX)s->pinfo->cinfo,COL_INFO);
- /* Add to packet info */
- g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_ResponseMessage_short_vals, "UKN"));
- g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
+ if (h245_pi != NULL){
+ /* Add to packet info */
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_ResponseMessage_short_vals, "UKN"));
+ g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
+ }
#.END
#----------------------------------------------------------------------------------------
@@ -349,8 +353,10 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
col_set_fence(%(ACTX)s->pinfo->cinfo,COL_INFO);
/* Add to packet info */
- g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_IndicationMessage_short_vals, "UKN"));
- g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
+ if (h245_pi !=NULL){
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_IndicationMessage_short_vals, "UKN"));
+ g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
+ }
#.END
#----------------------------------------------------------------------------------------
@@ -373,8 +379,10 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
col_set_fence(%(ACTX)s->pinfo->cinfo,COL_INFO);
/* Add to packet info */
- g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_CommandMessage_short_vals, "UKN"));
- g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
+ if (h245_pi != NULL){
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_CommandMessage_short_vals, "UKN"));
+ g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
+ }
#.END
#----------------------------------------------------------------------------------------
@@ -383,7 +391,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
codec_type = val_to_str(value, h245_AudioCapability_short_vals, "<unknown>");
- if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_AudioCapability_short_vals, "ukn"));
+ if (h245_pi != NULL)
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_AudioCapability_short_vals, "ukn"));
#.END
#----------------------------------------------------------------------------------------
@@ -392,7 +401,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
codec_type = val_to_str(value, h245_VideoCapability_vals, "<unknown>");
- if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, codec_type);
+ if (h245_pi != NULL)
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, codec_type);
#.END
#----------------------------------------------------------------------------------------
@@ -401,7 +411,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
codec_type = val_to_str(value, h245_Application_vals, "<unknown>");
- if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, codec_type);
+ if (h245_pi != NULL)
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, codec_type);
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY AudioMode VAL_PTR = &value
@@ -409,7 +420,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
codec_type = val_to_str(value, h245_AudioMode_vals, "<unknown>");
- if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_AudioMode_vals, "ukn"));
+ if (h245_pi != NULL)
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_AudioMode_vals, "ukn"));
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY VideoMode VAL_PTR = &value
@@ -417,7 +429,8 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
codec_type = val_to_str(value, h245_VideoMode_vals, "<unknown>");
- if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_VideoMode_vals, "ukn"));
+ if (h245_pi != NULL)
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_VideoMode_vals, "ukn"));
#.END
#----------------------------------------------------------------------------------------
#.FN_BODY DataModeApplication VAL_PTR = &value
@@ -425,79 +438,94 @@ Rfc2733Format FECCapability/rfc2733Format FECMode/rfc2733Format
%(DEFAULT_BODY)s
codec_type = val_to_str(value, h245_DataModeApplication_vals, "<unknown>");
- if (h245_pi != NULL) g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_DataModeApplication_vals, "ukn"));
+ if (h245_pi != NULL)
+ g_snprintf(h245_pi->frame_label, 50, "%%s %%s", h245_pi->frame_label, val_to_str(value, h245_DataModeApplication_vals, "ukn"));
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR MasterSlaveDeterminationAck
+if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDetAck;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR MasterSlaveDeterminationReject
+if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDetRjc;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR OpenLogicalChannelReject
+if (h245_pi != NULL)
h245_pi->msg_type = H245_OpenLogChnRjc;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR CloseLogicalChannel
+if (h245_pi != NULL)
h245_pi->msg_type = H245_CloseLogChn;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR CloseLogicalChannelAck
+if (h245_pi != NULL)
h245_pi->msg_type = H245_CloseLogChnAck;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR OpenLogicalChannelConfirm
+if (h245_pi != NULL)
h245_pi->msg_type = H245_OpenLogChnCnf;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR TerminalCapabilitySetAck
+if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSetAck;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR MasterSlaveDetermination
+if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDet;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR TerminalCapabilitySetReject
+if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSetRjc;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR MasterSlaveDeterminationRelease
+if (h245_pi != NULL)
h245_pi->msg_type = H245_MastSlvDetRls;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR TerminalCapabilitySet
+if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSet;
#.END
#----------------------------------------------------------------------------------------
#.FN_FTR TerminalCapabilitySetRelease
+if (h245_pi != NULL)
h245_pi->msg_type = H245_TermCapSetRls;
#.END
#----------------------------------------------------------------------------------------
# OpenLogicalChannel .FN_BODY is also declared, line 70ish
#.FN_FTR OpenLogicalChannel
- if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn;
+ if (h245_pi != NULL)
+ h245_pi->msg_type = H245_OpenLogChn;
#.END
#----------------------------------------------------------------------------------------
# OpenLogicalChannelAck .FN_BODY is also declared, line 200ish
#.FN_FTR OpenLogicalChannelAck
- h245_pi->msg_type = H245_OpenLogChnAck;
+ if (h245_pi != NULL)
+ h245_pi->msg_type = H245_OpenLogChnAck;
#.END
#----------------------------------------------------------------------------------------
#.FN_PARS CapabilityIdentifier/standard
@@ -756,6 +784,24 @@ NonStandardIdentifier/h221NonStandard/manufacturerCode VAL_PTR = &manufacturerC
}
#.END
+#.FN_BODY FunctionNotSupported/returnedFunction VAL_PTR = &next_tvb
+ tvbuff_t *next_tvb = NULL;
+ proto_item *item;
+ proto_tree *subtree;
+ h245_packet_info *saved_h245_pi;
+
+%(DEFAULT_BODY)s
+
+ if (next_tvb && tvb_length(next_tvb)) {
+ saved_h245_pi = h245_pi;
+ h245_pi = NULL;
+ item = proto_tree_add_text(tree, next_tvb, 0, -1,"The returned function");
+ subtree = proto_item_add_subtree(item, ett_h245_returnedFunction);
+ PROTO_ITEM_SET_GENERATED(item);
+ dissect_h245_MultimediaSystemControlMessage(next_tvb, 0, actx, subtree, hf_h245_pdu_type);
+ h245_pi = saved_h245_pi;
+ }
+
#----------------------------------------------------------------------------------------
#.TYPE_RENAME
diff --git a/asn1/h245/packet-h245-template.c b/asn1/h245/packet-h245-template.c
index b05cc84e49..09ada0bb26 100644
--- a/asn1/h245/packet-h245-template.c
+++ b/asn1/h245/packet-h245-template.c
@@ -79,6 +79,7 @@ static int hf_h245Manufacturer = -1;
static int h245_tap = -1;
static int ett_h245 = -1;
static int h245dg_tap = -1;
+static int ett_h245_returnedFunction = -1;
h245_packet_info *h245_pi=NULL;
static gboolean h245_reassembly = TRUE;
@@ -284,6 +285,13 @@ int proto_h245 = -1;
/* Initialize the subtree pointers */
#include "packet-h245-ett.c"
+/* Forward declarations */
+dissect_h245_MultimediaSystemControlMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
+static void reset_h245_pi(void *dummy _U_)
+{
+ h245_pi = NULL; /* Make sure we don't leave ep_alloc()ated memory lying around */
+}
+
#include "packet-h245-fn.c"
static void
@@ -296,10 +304,6 @@ dissect_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
dissect_tpkt_encap(tvb, pinfo, parent_tree, h245_reassembly, MultimediaSystemControlMessage_handle);
}
-static void reset_h245_pi(void *dummy _U_)
-{
- h245_pi = NULL; /* Make sure we don't leave ep_alloc()ated memory lying around */
-}
static void
dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
@@ -333,7 +337,8 @@ void
dissect_h245_OpenLogicalChannelCodec(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, char *codec_str) {
dissect_OpenLogicalChannel_PDU(tvb, pinfo, tree);
- if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn;
+ if (h245_pi != NULL)
+ h245_pi->msg_type = H245_OpenLogChn;
if (codec_str && codec_type){
strncpy(codec_str, codec_type, 50);
@@ -358,6 +363,7 @@ void proto_register_h245(void) {
/* List of subtrees */
static gint *ett[] = {
&ett_h245,
+ &ett_h245_returnedFunction,
#include "packet-h245-ettarr.c"
};
module_t *h245_module;