diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2014-06-19 20:31:08 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-06-19 18:42:28 +0000 |
commit | d0ac93756794ed29650dc91f7f8304b11504c61b (patch) | |
tree | ca84581f86ad0d451a9600533a57b4f56e261fa0 /asn1/ranap | |
parent | 7398779206eb53ec17bf2f4f4f7fad414b0c7391 (diff) |
Revert "Update ASN.1 source files with the API changes done in g021e7af"
This reverts commit e308e7c4de81c2ff7159e444b865ac59de4faa2b.
Change-Id: I079616d63f643f79f1bc03ef5fdf724f36df4071
Reviewed-on: https://code.wireshark.org/review/2435
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'asn1/ranap')
-rw-r--r-- | asn1/ranap/packet-ranap-template.c | 26 | ||||
-rw-r--r-- | asn1/ranap/ranap.cnf | 6 |
2 files changed, 16 insertions, 16 deletions
diff --git a/asn1/ranap/packet-ranap-template.c b/asn1/ranap/packet-ranap-template.c index 6a4d0c4ef1..76df8035f7 100644 --- a/asn1/ranap/packet-ranap-template.c +++ b/asn1/ranap/packet-ranap-template.c @@ -154,16 +154,16 @@ dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree case id_RelocationPreparation: if((ProtocolIE_ID == id_Source_ToTarget_TransparentContainer)||(ProtocolIE_ID == id_Target_ToSource_TransparentContainer)){ key = SPECIAL | ProtocolIE_ID; - ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; break; } /* Fall trough */ default: /* no special handling */ - ret = (dissector_try_uint_new(ranap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + ret = (dissector_try_uint_new(ranap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; if (ret == 0) { key = pdu_type | ProtocolIE_ID; - ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } break; } @@ -173,19 +173,19 @@ dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(ranap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(ranap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(ranap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(ranap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(ranap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(ranap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int @@ -196,7 +196,7 @@ dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr pdu_type = IMSG; ret = dissector_try_uint_new(ranap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL); pdu_type = 0; - return ret ? tvb_captured_length(tvb) : 0; + return ret ? tvb_length(tvb) : 0; } static int @@ -207,19 +207,19 @@ dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr pdu_type = SOUT; ret = dissector_try_uint_new(ranap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL); pdu_type = 0; - return ret ? tvb_captured_length(tvb) : 0; + return ret ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(ranap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(ranap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - return (dissector_try_uint_new(ranap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; + return (dissector_try_uint_new(ranap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static void @@ -275,12 +275,12 @@ dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi #define LENGTH_OFFSET 3 #define MSG_TYPE_OFFSET 1 - if (tvb_captured_length(tvb) < RANAP_MSG_MIN_LENGTH) { return FALSE; } - /*if (tvb_get_guint8(tvb, LENGTH_OFFSET) != (tvb_captured_length(tvb) - 4)) { return FALSE; }*/ + if (tvb_length(tvb) < RANAP_MSG_MIN_LENGTH) { return FALSE; } + /*if (tvb_get_guint8(tvb, LENGTH_OFFSET) != (tvb_length(tvb) - 4)) { return FALSE; }*/ /* Read the length NOTE offset in bits */ offset = dissect_per_length_determinant(tvb, LENGTH_OFFSET<<3, &asn1_ctx, tree, -1, &length); offset = offset>>3; - if (length!= (tvb_captured_length(tvb) - offset)){ + if (length!= (tvb_length(tvb) - offset)){ return FALSE; } diff --git a/asn1/ranap/ranap.cnf b/asn1/ranap/ranap.cnf index 58267e8dd3..20710c68bc 100644 --- a/asn1/ranap/ranap.cnf +++ b/asn1/ranap/ranap.cnf @@ -198,7 +198,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") && actx->pinfo->sccp_info->data.co.assoc && ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) { - guint len = tvb_captured_length(imsi_tvb); + guint len = tvb_length(imsi_tvb); guint8* bytes = (guint8 *)tvb_memdup(wmem_packet_scope(),imsi_tvb,0,len); actx->pinfo->sccp_info->data.co.assoc->calling_party = @@ -222,7 +222,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") %(DEFAULT_BODY)s - if ((rrc_message_tvb)&&(tvb_captured_length(rrc_message_tvb)!=0)&&(glbl_dissect_container)){ + if ((rrc_message_tvb)&&(tvb_length(rrc_message_tvb)!=0)&&(glbl_dissect_container)){ switch(ProtocolIE_ID){ case id_Source_ToTarget_TransparentContainer: /* INTEGER ::= 61 */ /* 9.2.1.30a Source to Target Transparent Container @@ -310,7 +310,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") # TransportLayerAddress ::= BIT STRING (SIZE (1..160, ...)) # Asume 4 bytes used in case of IPv4 /* Get the length */ - tvb_len = tvb_captured_length(parameter_tvb); + tvb_len = tvb_length(parameter_tvb); subtree = proto_item_add_subtree(actx->created_item, ett_ranap_TransportLayerAddress); if (tvb_len==4){ /* IPv4 */ |