forked from osmocom/wireshark
inap: Add Digits dissection
The following parameters are all defined as Digits calledAddressValue callingAddressValue assistingSSPIPRoutingAddress additionalCallingPartyNumber correlationID number dialledNumber callingLineID iNServiceControlCode iNServiceControlCodeLow iNServiceControlCodeHigh lineID prefix iPAddressValue digitsResponse Add sub-tree for each parameter Change-Id: I4e5a9b75ef357534d4ea669703f9b370c8595c67 Reviewed-on: https://code.wireshark.org/review/28166 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
bc2e185278
commit
d279713cf8
|
@ -324,6 +324,81 @@ dissect_isup_called_party_number_parameter(parameter_tvb, actx->pinfo, tree, NUL
|
|||
|
||||
dissect_q931_cause_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), subtree, hf_inap_cause_indicator, &Cause_value, isup_parameter_type_value);
|
||||
|
||||
#.FN_BODY Digits VAL_PTR = ¶meter_tvb
|
||||
/*
|
||||
*-- Indicates the address signalling digits. Refer to the Q.763 Generic Number and Generic Digits parameter
|
||||
*-- for encoding. The coding of the subfield's 'NumberQualifier' in Generic Number and 'TypeOfDigits' in
|
||||
*-- Generic Digits are irrelevant to the INAP, the ASN.1 tags are sufficient to identify the parameter.
|
||||
*-- The ISUP format does not allow to exclude these subfields, therefore the value is network operator specific.
|
||||
*-- The following parameters should use Generic Number
|
||||
*-- Additional Calling Number, CorrelationID for AssistRequestInstructions, AssistingSSPIPRoutingAddress
|
||||
*-- for EstablishTemporaryConnection
|
||||
*-- calledAddressValue for all occurrences,callingAddressValue for all occurrences
|
||||
*-- The following parameters should use Generic Digits: prefix, all
|
||||
*-- other CorrelationID occurrences, dialledNumber filtering criteria, callingLineID filtering criteria, lineID for
|
||||
*-- ResourceID type, digitResponse for ReceivedInformationArg, iNServiceControlLow / iNServiceControlHigh for
|
||||
*--MidCallInfoType,, iNServiceControlCode for MidCallInfo.
|
||||
*/
|
||||
tvbuff_t *parameter_tvb;
|
||||
proto_tree *subtree;
|
||||
gint ett = -1;
|
||||
gboolean digits = FALSE;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
if (hf_index == hf_inap_additionalCallingPartyNumber) {
|
||||
ett = ett_inap_additionalCallingPartyNumber;
|
||||
} else if (hf_index == hf_inap_assistingSSPIPRoutingAddress) {
|
||||
ett = ett_inap_assistingSSPIPRoutingAddress;
|
||||
} else if (hf_index == hf_inap_correlationID) {
|
||||
ett = ett_inap_correlationID;
|
||||
digits = (opcode != opcode_assistRequestInstructions) ? TRUE : FALSE;
|
||||
} else if (hf_index == hf_inap_calledAddressValue) {
|
||||
ett = ett_inap_calledAddressValue;
|
||||
} else if (hf_index == hf_inap_callingAddressValue) {
|
||||
ett = ett_inap_callingAddressValue;
|
||||
} else if (hf_index == hf_inap_number) {
|
||||
ett = ett_inap_number;
|
||||
} else if (hf_index == hf_inap_dialledNumber) {
|
||||
ett = ett_inap_dialledNumber;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_callingLineID) {
|
||||
ett = ett_inap_callingLineID;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iNServiceControlCode) {
|
||||
ett = ett_inap_iNServiceControlCode;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iNServiceControlCodeLow) {
|
||||
digits = TRUE;
|
||||
ett = ett_inap_iNServiceControlCodeLow;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iNServiceControlCodeHigh) {
|
||||
ett = ett_inap_iNServiceControlCodeHigh;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_lineID) {
|
||||
ett = ett_inap_lineID;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_prefix) {
|
||||
ett = ett_inap_prefix;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iPAddressValue) {
|
||||
ett = ett_inap_iPAddressValue;
|
||||
} else if (hf_index == hf_inap_digitsResponse) {
|
||||
ett = ett_inap_digitsResponse;
|
||||
digits = TRUE;
|
||||
}
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett);
|
||||
if (digits) {
|
||||
dissect_isup_generic_digits_parameter(parameter_tvb, subtree, NULL);
|
||||
} else {
|
||||
dissect_isup_generic_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
|
||||
}
|
||||
#.END
|
||||
|
||||
#.TYPE_ATTR
|
||||
CallingPartysCategory TYPE = FT_UINT16 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &isup_calling_partys_category_value_ext
|
||||
|
||||
|
|
|
@ -70,6 +70,21 @@ static gint ett_inap_RedirectionInformation = -1;
|
|||
static gint ett_inap_HighLayerCompatibility = -1;
|
||||
static gint ett_inap_extension_data = -1;
|
||||
static gint ett_inap_cause = -1;
|
||||
static gint ett_inap_calledAddressValue = -1;
|
||||
static gint ett_inap_callingAddressValue = -1;
|
||||
static gint ett_inap_additionalCallingPartyNumber = -1;
|
||||
static gint ett_inap_assistingSSPIPRoutingAddress = -1;
|
||||
static gint ett_inap_correlationID = -1;
|
||||
static gint ett_inap_number = -1;
|
||||
static gint ett_inap_dialledNumber = -1;
|
||||
static gint ett_inap_callingLineID = -1;
|
||||
static gint ett_inap_iNServiceControlCode = -1;
|
||||
static gint ett_inap_iNServiceControlCodeLow = -1;
|
||||
static gint ett_inap_iNServiceControlCodeHigh = -1;
|
||||
static gint ett_inap_lineID = -1;
|
||||
static gint ett_inap_prefix = -1;
|
||||
static gint ett_inap_iPAddressValue = -1;
|
||||
static gint ett_inap_digitsResponse = -1;
|
||||
|
||||
#include "packet-inap-ett.c"
|
||||
|
||||
|
@ -211,6 +226,21 @@ void proto_register_inap(void) {
|
|||
&ett_inap_HighLayerCompatibility,
|
||||
&ett_inap_extension_data,
|
||||
&ett_inap_cause,
|
||||
&ett_inap_calledAddressValue,
|
||||
&ett_inap_callingAddressValue,
|
||||
&ett_inap_additionalCallingPartyNumber,
|
||||
&ett_inap_assistingSSPIPRoutingAddress,
|
||||
&ett_inap_correlationID,
|
||||
&ett_inap_number,
|
||||
&ett_inap_dialledNumber,
|
||||
&ett_inap_callingLineID,
|
||||
&ett_inap_iNServiceControlCode,
|
||||
&ett_inap_iNServiceControlCodeLow,
|
||||
&ett_inap_iNServiceControlCodeHigh,
|
||||
&ett_inap_lineID,
|
||||
&ett_inap_prefix,
|
||||
&ett_inap_iPAddressValue,
|
||||
&ett_inap_digitsResponse,
|
||||
#include "packet-inap-ettarr.c"
|
||||
};
|
||||
|
||||
|
|
|
@ -1041,6 +1041,21 @@ static gint ett_inap_RedirectionInformation = -1;
|
|||
static gint ett_inap_HighLayerCompatibility = -1;
|
||||
static gint ett_inap_extension_data = -1;
|
||||
static gint ett_inap_cause = -1;
|
||||
static gint ett_inap_calledAddressValue = -1;
|
||||
static gint ett_inap_callingAddressValue = -1;
|
||||
static gint ett_inap_additionalCallingPartyNumber = -1;
|
||||
static gint ett_inap_assistingSSPIPRoutingAddress = -1;
|
||||
static gint ett_inap_correlationID = -1;
|
||||
static gint ett_inap_number = -1;
|
||||
static gint ett_inap_dialledNumber = -1;
|
||||
static gint ett_inap_callingLineID = -1;
|
||||
static gint ett_inap_iNServiceControlCode = -1;
|
||||
static gint ett_inap_iNServiceControlCodeLow = -1;
|
||||
static gint ett_inap_iNServiceControlCodeHigh = -1;
|
||||
static gint ett_inap_lineID = -1;
|
||||
static gint ett_inap_prefix = -1;
|
||||
static gint ett_inap_iPAddressValue = -1;
|
||||
static gint ett_inap_digitsResponse = -1;
|
||||
|
||||
|
||||
/*--- Included file: packet-inap-ett.c ---*/
|
||||
|
@ -1283,7 +1298,7 @@ static gint ett_inap_T_problem_01 = -1;
|
|||
static gint ett_inap_InvokeId = -1;
|
||||
|
||||
/*--- End of included file: packet-inap-ett.c ---*/
|
||||
#line 75 "./asn1/inap/packet-inap-template.c"
|
||||
#line 90 "./asn1/inap/packet-inap-template.c"
|
||||
|
||||
static expert_field ei_inap_unknown_invokeData = EI_INIT;
|
||||
static expert_field ei_inap_unknown_returnResultData = EI_INIT;
|
||||
|
@ -1413,7 +1428,7 @@ static const value_string inap_err_code_string_vals[] = {
|
|||
|
||||
|
||||
/*--- End of included file: packet-inap-table.c ---*/
|
||||
#line 81 "./asn1/inap/packet-inap-template.c"
|
||||
#line 96 "./asn1/inap/packet-inap-template.c"
|
||||
|
||||
const value_string inap_general_problem_strings[] = {
|
||||
{0,"General Problem Unrecognized Component"},
|
||||
|
@ -1702,8 +1717,82 @@ dissect_inap_AdditionalATMCellRate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
|
|||
|
||||
static int
|
||||
dissect_inap_Digits(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
|
||||
NULL);
|
||||
#line 328 "./asn1/inap/inap.cnf"
|
||||
/*
|
||||
*-- Indicates the address signalling digits. Refer to the Q.763 Generic Number and Generic Digits parameter
|
||||
*-- for encoding. The coding of the subfield's 'NumberQualifier' in Generic Number and 'TypeOfDigits' in
|
||||
*-- Generic Digits are irrelevant to the INAP, the ASN.1 tags are sufficient to identify the parameter.
|
||||
*-- The ISUP format does not allow to exclude these subfields, therefore the value is network operator specific.
|
||||
*-- The following parameters should use Generic Number
|
||||
*-- Additional Calling Number, CorrelationID for AssistRequestInstructions, AssistingSSPIPRoutingAddress
|
||||
*-- for EstablishTemporaryConnection
|
||||
*-- calledAddressValue for all occurrences,callingAddressValue for all occurrences
|
||||
*-- The following parameters should use Generic Digits: prefix, all
|
||||
*-- other CorrelationID occurrences, dialledNumber filtering criteria, callingLineID filtering criteria, lineID for
|
||||
*-- ResourceID type, digitResponse for ReceivedInformationArg, iNServiceControlLow / iNServiceControlHigh for
|
||||
*--MidCallInfoType,, iNServiceControlCode for MidCallInfo.
|
||||
*/
|
||||
tvbuff_t *parameter_tvb;
|
||||
proto_tree *subtree;
|
||||
gint ett = -1;
|
||||
gboolean digits = FALSE;
|
||||
|
||||
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
|
||||
¶meter_tvb);
|
||||
|
||||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
if (hf_index == hf_inap_additionalCallingPartyNumber) {
|
||||
ett = ett_inap_additionalCallingPartyNumber;
|
||||
} else if (hf_index == hf_inap_assistingSSPIPRoutingAddress) {
|
||||
ett = ett_inap_assistingSSPIPRoutingAddress;
|
||||
} else if (hf_index == hf_inap_correlationID) {
|
||||
ett = ett_inap_correlationID;
|
||||
digits = (opcode != opcode_assistRequestInstructions) ? TRUE : FALSE;
|
||||
} else if (hf_index == hf_inap_calledAddressValue) {
|
||||
ett = ett_inap_calledAddressValue;
|
||||
} else if (hf_index == hf_inap_callingAddressValue) {
|
||||
ett = ett_inap_callingAddressValue;
|
||||
} else if (hf_index == hf_inap_number) {
|
||||
ett = ett_inap_number;
|
||||
} else if (hf_index == hf_inap_dialledNumber) {
|
||||
ett = ett_inap_dialledNumber;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_callingLineID) {
|
||||
ett = ett_inap_callingLineID;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iNServiceControlCode) {
|
||||
ett = ett_inap_iNServiceControlCode;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iNServiceControlCodeLow) {
|
||||
digits = TRUE;
|
||||
ett = ett_inap_iNServiceControlCodeLow;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iNServiceControlCodeHigh) {
|
||||
ett = ett_inap_iNServiceControlCodeHigh;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_lineID) {
|
||||
ett = ett_inap_lineID;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_prefix) {
|
||||
ett = ett_inap_prefix;
|
||||
digits = TRUE;
|
||||
} else if (hf_index == hf_inap_iPAddressValue) {
|
||||
ett = ett_inap_iPAddressValue;
|
||||
} else if (hf_index == hf_inap_digitsResponse) {
|
||||
ett = ett_inap_digitsResponse;
|
||||
digits = TRUE;
|
||||
}
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett);
|
||||
if (digits) {
|
||||
dissect_isup_generic_digits_parameter(parameter_tvb, subtree, NULL);
|
||||
} else {
|
||||
dissect_isup_generic_number_parameter(parameter_tvb, actx->pinfo, subtree, NULL);
|
||||
}
|
||||
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -9001,7 +9090,7 @@ static int dissect_PAR_taskRefused_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_
|
|||
|
||||
|
||||
/*--- End of included file: packet-inap-fn.c ---*/
|
||||
#line 95 "./asn1/inap/packet-inap-template.c"
|
||||
#line 110 "./asn1/inap/packet-inap-template.c"
|
||||
/*
|
||||
TC-Invokable OPERATION ::=
|
||||
{activateServiceFiltering | activityTest | analysedInformation |
|
||||
|
@ -9351,7 +9440,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
|
|||
|
||||
|
||||
/*--- End of included file: packet-inap-table2.c ---*/
|
||||
#line 116 "./asn1/inap/packet-inap-template.c"
|
||||
#line 131 "./asn1/inap/packet-inap-template.c"
|
||||
|
||||
|
||||
static guint8 inap_pdu_type = 0;
|
||||
|
@ -11679,7 +11768,7 @@ void proto_register_inap(void) {
|
|||
"InvokeId_present", HFILL }},
|
||||
|
||||
/*--- End of included file: packet-inap-hfarr.c ---*/
|
||||
#line 199 "./asn1/inap/packet-inap-template.c"
|
||||
#line 214 "./asn1/inap/packet-inap-template.c"
|
||||
};
|
||||
|
||||
|
||||
|
@ -11695,6 +11784,21 @@ void proto_register_inap(void) {
|
|||
&ett_inap_HighLayerCompatibility,
|
||||
&ett_inap_extension_data,
|
||||
&ett_inap_cause,
|
||||
&ett_inap_calledAddressValue,
|
||||
&ett_inap_callingAddressValue,
|
||||
&ett_inap_additionalCallingPartyNumber,
|
||||
&ett_inap_assistingSSPIPRoutingAddress,
|
||||
&ett_inap_correlationID,
|
||||
&ett_inap_number,
|
||||
&ett_inap_dialledNumber,
|
||||
&ett_inap_callingLineID,
|
||||
&ett_inap_iNServiceControlCode,
|
||||
&ett_inap_iNServiceControlCodeLow,
|
||||
&ett_inap_iNServiceControlCodeHigh,
|
||||
&ett_inap_lineID,
|
||||
&ett_inap_prefix,
|
||||
&ett_inap_iPAddressValue,
|
||||
&ett_inap_digitsResponse,
|
||||
|
||||
/*--- Included file: packet-inap-ettarr.c ---*/
|
||||
#line 1 "./asn1/inap/packet-inap-ettarr.c"
|
||||
|
@ -11936,7 +12040,7 @@ void proto_register_inap(void) {
|
|||
&ett_inap_InvokeId,
|
||||
|
||||
/*--- End of included file: packet-inap-ettarr.c ---*/
|
||||
#line 215 "./asn1/inap/packet-inap-template.c"
|
||||
#line 245 "./asn1/inap/packet-inap-template.c"
|
||||
};
|
||||
|
||||
static ei_register_info ei[] = {
|
||||
|
|
Loading…
Reference in New Issue