diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-06-05 10:54:21 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-06-05 10:54:21 +0000 |
commit | 189ea54f0b6999ae024010cafea890f6cde931ae (patch) | |
tree | a10b92a765c9e05d5c2f42ec044e069a451cd87f /asn1/h248/h248.cnf | |
parent | 5bd0c263f2e53626eba37667a82dcf5043b100db (diff) |
from Alex Lindberg:
Update to packet-h248.c and associated h248 dissecorts.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7332
svn path=/trunk/; revision=43107
Diffstat (limited to 'asn1/h248/h248.cnf')
-rw-r--r-- | asn1/h248/h248.cnf | 97 |
1 files changed, 48 insertions, 49 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index 1aa47ed058..2981f51acb 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -22,7 +22,7 @@ EventParameterName EventParamValue ContextID EventParamValueV1 -#SigParamValueV1 +SigParamValueV1 #.TYPE_RENAME IndAudMediaDescriptor/streams IndAudMediaDescriptorStreams @@ -47,6 +47,8 @@ IndAudEventBufferDescriptor/eventName iAEBDEventName TerminationID/id terminationId IndAudStreamParms/localControlDescriptor iASPLocalControlDescriptor IndAudStreamParms/localDescriptor iASPLocalDescriptor +LocalControlDescriptor/propertyParms lCDpropertyParms +TerminationStateDescriptor/propertyParms tSDpropertyParms MediaDescriptor/streams/oneStream mediaDescriptorOneStream MediaDescriptor/streams/multiStream mediaDescriptorMultiStream MediaDescriptor/streams/multiStream/_item mediaDescriptorMultiStream_item @@ -64,12 +66,15 @@ IndAudSignal/signalName iASignalName IndAudSeqSigList/signalList iASignalList IndAudSignalsDescriptor/signal indAudSignal IndAudSignalsDescriptor/seqSigList indAudSeqSigList -IndAudTerminationStateDescriptor/serviceState iATSDServiceState +IndAudTerminationStateDescriptor/serviceState iATSDServiceState IndAudStreamParms/remoteDescriptor iASPRemoteDescriptor PropertyParm/value propertyParamValue IndAudMediaDescriptor/streams indAudMediaDescriptorStreams AmmRequest/terminationID terminationIDList AmmsReply/terminationID terminationIDList +AmmDescriptor/statisticsDescriptor aDstatisticsDescriptor +AuditReturnParameter/statisticsDescriptor aRPstatisticsDescriptor +StreamParms/statisticsDescriptor sPstatisticsDescriptor SubtractRequest/terminationID terminationIDList NotifyRequest/terminationID terminationIDList NotifyReply/terminationID terminationIDList @@ -83,12 +88,10 @@ TransactionRequest/transactionId transactionId SegmentReply/transactionId seg_rep_transactionId TransactionReply/transactionId trep_transactionId TransactionPending/transactionId tpend_transactionId -PropertyParmV1/values prop_param_values EventParameterV1/value event_param_value SigParameterV1/value sig_param_value -PropertyParmV1/value prop_parm_value AuditReplyV1/auditResult audit_result -PropertyParmV1/extraInfo extra_info + #.FN_HDR Message curr_info.msg = gcp_msg(actx->pinfo,tvb_raw_offset(tvb),keep_persistent_data); @@ -96,12 +99,12 @@ PropertyParmV1/extraInfo extra_info #.FN_FTR Message col_add_str(actx->pinfo->cinfo, COL_INFO, gcp_msg_to_str(curr_info.msg,keep_persistent_data)); - + if (keep_persistent_data) gcp_analyze_msg(h248_tree, h248_tvb, curr_info.msg, &h248_arrel); #.END -#.FN_BODY Message/version VAL_PTR = &h248_version +#.FN_BODY Message/version VAL_PTR = &h248_version %(DEFAULT_BODY)s #.END @@ -118,7 +121,7 @@ PropertyParmV1/extraInfo extra_info curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_PENDING, keep_persistent_data); error_code = 0; -#.FN_BODY TransactionReply/transactionId +#.FN_BODY TransactionReply/transactionId guint32 trx_id = 0; offset = dissect_h248_trx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &trx_id); curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_REPLY, keep_persistent_data); @@ -269,8 +272,8 @@ PropertyParmV1/extraInfo extra_info if(h248_version > 1) { %(DEFAULT_BODY)s } else { - /* call V1 of the dissector */ - offset = dissect_h248_AuditReplyV1(implicit_tag, tvb, offset, actx, tree, hf_index); + /* call V1 of the dissector */ + offset = dissect_h248_AuditReplyV1(implicit_tag, tvb, offset, actx, tree, hf_index); } #.END @@ -284,8 +287,8 @@ PropertyParmV1/extraInfo extra_info if(h248_version > 1) { %(DEFAULT_BODY)s } else { - /* call V1 of the dissector */ - offset = dissect_h248_AuditReplyV1(implicit_tag, tvb, offset, actx, tree, hf_index); + /* call V1 of the dissector */ + offset = dissect_h248_AuditReplyV1(implicit_tag, tvb, offset, actx, tree, hf_index); } #.END @@ -298,13 +301,13 @@ PropertyParmV1/extraInfo extra_info #.FN_BODY ErrorDescriptor/errorCode offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_h248_error_code, &error_code); expert_add_info_format(actx->pinfo, actx->created_item, PI_RESPONSE_CODE, PI_WARN, "Errored Command"); - + if (curr_info.cmd) { gcp_cmd_set_error(curr_info.cmd,error_code); } else if (curr_info.trx) { gcp_trx_set_error(curr_info.trx,error_code); } - + return offset; #.END @@ -324,13 +327,13 @@ PropertyParmV1/extraInfo extra_info wild_term = tvb_get_guint8(new_tvb,0) & 0x80 ? GCP_WILDCARD_CHOOSE : GCP_WILDCARD_ALL; /* limitation: assume only one wildcard is used */ wild_card = tvb_get_guint8(new_tvb,0); - + #.END #.FN_BODY TerminationID/id tvbuff_t* new_tvb; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb); - + if (new_tvb) { curr_info.term->len = tvb_length(new_tvb); curr_info.term->type = 0; /* unknown */ @@ -343,9 +346,9 @@ PropertyParmV1/extraInfo extra_info curr_info.term = gcp_cmd_add_term(curr_info.msg, curr_info.trx, curr_info.cmd, curr_info.term, wild_term, keep_persistent_data); if (h248_term_handle) { - actx->pinfo->private_data = &wild_card; + actx->pinfo->private_data = &wild_card; call_dissector(h248_term_handle, new_tvb, actx->pinfo, tree); - wild_card = 0xFF; + wild_card = 0xFF; } } else { curr_info.term->len = 0; @@ -356,18 +359,17 @@ PropertyParmV1/extraInfo extra_info #.FN_BODY SCreasonValue /* H248 v1 support */ - if ( h248_version >1 ) { + if ( h248_version > 1 ) { /* Not V1, so call "standard" function */ -%(DEFAULT_BODY)s +%(DEFAULT_BODY)s } else { - /* V1 so Value == octet string */ - offset = dissect_h248_ValueV1( implicit_tag, tvb, offset, actx, tree, hf_index); + /* V1 so Value == octet string */ + offset = dissect_h248_ValueV1( implicit_tag, tvb, offset, actx, tree, hf_index); }; - + #.END #.FN_BODY SCreasonValueOctetStr VAL_PTR = ¶meter_tvb - tvbuff_t *parameter_tvb; %(DEFAULT_BODY)s @@ -385,47 +387,44 @@ PropertyParmV1/extraInfo extra_info #.FN_BODY ValueV1 /* check tvb to verify all values ascii or not. If so, output string, else hex */ len=tvb_length_remaining(tvb, offset); - for( i=0;i<len;i++) { - if(!isascii(tvb_get_guint8(tvb, offset+i)) || tvb_get_guint8(tvb, offset+i) == 0) { - /* not ascii or NULL character so do string as hex string */ - proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s", - (proto_registrar_get_nth(hf_index))->name, - tvb_bytes_to_str(tvb, 0, len)); - return len; + if ( curr_info.par && curr_info.par->dissector) { + curr_info.par->dissector(tree, /*next_*/tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data); + } else { + /* if no registered dissector create output */ + for( i=0;i<len;i++) { + if(!isascii(tvb_get_guint8(tvb, offset+i)) || tvb_get_guint8(tvb, offset+i) == 0) { + /* not ascii or NULL character so do string as hex string */ + proto_tree_add_text(tree, tvb, offset, len,"%s: 0x%s", + (proto_registrar_get_nth(hf_index))->name, + tvb_bytes_to_str(tvb, 0, len)); + return len; + }; }; - }; - /* if here, then string is ascii */ - proto_tree_add_text(tree, tvb, offset, len,"%s: %s", - (proto_registrar_get_nth(hf_index))->name, - tvb_format_text(tvb, 0, len)); + /* if here, then string is ascii */ + proto_tree_add_text(tree, tvb, offset, len,"%s: %s", + (proto_registrar_get_nth(hf_index))->name, + tvb_format_text(tvb, 0, len)); + } offset = len; + #.END + #.FN_BODY EventParameter /* H248 v1 support */ if (h248_version > 1) { %(DEFAULT_BODY)s } else { - offset = dissect_h248_EventParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index); + offset = dissect_h248_EventParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index); } #.END #.FN_BODY SigParameter /* H248 v1 support */ - if (h248_version >1) { - %(DEFAULT_BODY)s -} else { - offset = dissect_h248_SigParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index); -} -#.END - - -#.FN_BODY PropertyParm -/* H248 v1 support */ - if (h248_version >1) { + if (h248_version > 1) { %(DEFAULT_BODY)s } else { - offset = dissect_h248_PropertyParmV1( implicit_tag, tvb, offset, actx, tree, hf_index); + offset = dissect_h248_SigParameterV1( implicit_tag, tvb, offset, actx, tree, hf_index); } #.END |