forked from osmocom/wireshark
Revert "Update ASN.1 source files with the API changes done in g021e7af"
This reverts commit e308e7c4de
.
Change-Id: I079616d63f643f79f1bc03ef5fdf724f36df4071
Reviewed-on: https://code.wireshark.org/review/2435
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
7398779206
commit
d0ac937567
|
@ -255,7 +255,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
}
|
||||
|
||||
top_tree = NULL;
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_register_acse ----------------------------------------------*/
|
||||
|
|
|
@ -280,7 +280,7 @@ TerminalType
|
|||
%(DEFAULT_BODY)s
|
||||
if (SMS_BearerData_tvb){
|
||||
/* A zero length OCTET STRING will return a zero length tvb */
|
||||
length = tvb_captured_length_remaining(SMS_BearerData_tvb,0);
|
||||
length = tvb_length_remaining(SMS_BearerData_tvb,0);
|
||||
if (length <=0){
|
||||
proto_item_append_text(actx->created_item," length %%u",length);
|
||||
SMS_BearerData_tvb = NULL;
|
||||
|
@ -325,7 +325,7 @@ TerminalType
|
|||
%(DEFAULT_BODY)s
|
||||
if (parameter_tvb){
|
||||
/* A zero length OCTET STRING will return a zero length tvb */
|
||||
length = tvb_captured_length_remaining(parameter_tvb,0);
|
||||
length = tvb_length_remaining(parameter_tvb,0);
|
||||
if (length <=0){
|
||||
proto_item_append_text(actx->created_item, " length %%u",length);
|
||||
return offset;
|
||||
|
@ -422,7 +422,7 @@ TerminalType
|
|||
if (parameter_tvb){
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_CDMA2000HandoffInvokeIOSData);
|
||||
dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree,
|
||||
0, tvb_captured_length_remaining(parameter_tvb,0));
|
||||
0, tvb_length_remaining(parameter_tvb,0));
|
||||
}
|
||||
#6.5.2.gn CDMA2000HandoffResponseIOSData
|
||||
#.FN_BODY CDMA2000HandoffResponseIOSData VAL_PTR = ¶meter_tvb
|
||||
|
@ -433,7 +433,7 @@ TerminalType
|
|||
if (parameter_tvb){
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_CDMA2000HandoffResponseIOSData);
|
||||
dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree,
|
||||
0, tvb_captured_length_remaining(parameter_tvb,0));
|
||||
0, tvb_length_remaining(parameter_tvb,0));
|
||||
}
|
||||
#6.5.2.wB ServiceIndicator N.S0011-0 v 1.0
|
||||
#.FN_BODY ServiceIndicator VAL_PTR = ¶meter_tvb
|
||||
|
|
|
@ -643,7 +643,7 @@ dissect_ansi_map_min_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
|
|||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_mintype);
|
||||
|
||||
digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset, tvb_captured_length_remaining(tvb,offset), NULL, FALSE);
|
||||
digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset, tvb_length_remaining(tvb,offset), NULL, FALSE);
|
||||
proto_tree_add_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, digit_str);
|
||||
proto_item_append_text(actx->created_item, " - %s", digit_str);
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
|
|||
if(octet_len == 0)
|
||||
return;
|
||||
offset++;
|
||||
digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset, tvb_captured_length_remaining(tvb,offset), &Dgt_tbcd, FALSE);
|
||||
digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset, tvb_length_remaining(tvb,offset), &Dgt_tbcd, FALSE);
|
||||
proto_tree_add_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, digit_str);
|
||||
proto_item_append_text(actx->created_item, " - %s", digit_str);
|
||||
break;
|
||||
|
@ -700,7 +700,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
|
|||
return;
|
||||
offset++;
|
||||
proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(wmem_packet_scope(),tvb,offset,tvb_captured_length_remaining(tvb,offset),ENC_ASCII|ENC_NA));
|
||||
proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(wmem_packet_scope(),tvb,offset,tvb_length_remaining(tvb,offset),ENC_ASCII|ENC_NA));
|
||||
break;
|
||||
case 3:
|
||||
/* Octet string */
|
||||
|
@ -726,14 +726,14 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
|
|||
switch ((octet&0xf)){
|
||||
case 1:
|
||||
/* BCD Coding */
|
||||
digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset, tvb_captured_length_remaining(tvb,offset), &Dgt_tbcd, FALSE);
|
||||
digit_str = tvb_bcd_dig_to_wmem_packet_str(tvb, offset, tvb_length_remaining(tvb,offset), &Dgt_tbcd, FALSE);
|
||||
proto_tree_add_string(subtree, hf_ansi_map_bcd_digits, tvb, offset, -1, digit_str);
|
||||
proto_item_append_text(actx->created_item, " - %s", digit_str);
|
||||
break;
|
||||
case 2:
|
||||
/* IA5 Coding */
|
||||
proto_tree_add_item(subtree, hf_ansi_map_ia5_digits, tvb, offset, -1, ENC_ASCII|ENC_NA);
|
||||
proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(wmem_packet_scope(),tvb,offset,tvb_captured_length_remaining(tvb,offset),ENC_ASCII|ENC_NA));
|
||||
proto_item_append_text(actx->created_item, " - %s", tvb_get_string_enc(wmem_packet_scope(),tvb,offset,tvb_length_remaining(tvb,offset),ENC_ASCII|ENC_NA));
|
||||
break;
|
||||
case 3:
|
||||
/* Octet string */
|
||||
|
@ -1163,7 +1163,7 @@ dissect_ansi_map_callingfeaturesindicator(tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
|
||||
proto_tree *subtree;
|
||||
|
||||
length = tvb_captured_length_remaining(tvb,offset);
|
||||
length = tvb_length_remaining(tvb,offset);
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
|
||||
|
||||
|
@ -1320,7 +1320,7 @@ dissect_ansi_map_cdmacallmode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
|
|||
|
||||
proto_tree *subtree;
|
||||
|
||||
length = tvb_captured_length_remaining(tvb,offset);
|
||||
length = tvb_length_remaining(tvb,offset);
|
||||
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_mscid);
|
||||
|
@ -1374,7 +1374,7 @@ dissect_ansi_map_cdmachanneldata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
|
|||
|
||||
proto_tree *subtree;
|
||||
|
||||
length = tvb_captured_length_remaining(tvb,offset);
|
||||
length = tvb_length_remaining(tvb,offset);
|
||||
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_cdmachanneldata);
|
||||
|
@ -3640,7 +3640,7 @@ dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t
|
|||
proto_tree *subtree;
|
||||
guint8 octet;
|
||||
|
||||
end_offset = tvb_captured_length_remaining(tvb,offset);
|
||||
end_offset = tvb_length_remaining(tvb,offset);
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_win_trigger_list);
|
||||
|
||||
while(offset< end_offset) {
|
||||
|
@ -4427,7 +4427,7 @@ dissect_ansi_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
|
|||
break;
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void range_delete_callback(guint32 ssn)
|
||||
|
|
|
@ -86,7 +86,7 @@ OperationCode/private VAL_PTR = &ansi_tcap_private.d.OperationCode_private
|
|||
#.FN_BODY Invoke/parameter
|
||||
|
||||
if(find_tcap_subdissector(tvb, actx, tree))
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
|
||||
|
||||
#.FN_HDR Invoke
|
||||
|
@ -98,7 +98,7 @@ OperationCode/private VAL_PTR = &ansi_tcap_private.d.OperationCode_private
|
|||
|
||||
#.FN_BODY ReturnResult/parameter
|
||||
if(find_tcap_subdissector(tvb, actx, tree))
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
|
||||
#.FN_HDR ReturnResult
|
||||
ansi_tcap_private.d.pdu = 2;
|
||||
|
@ -108,7 +108,7 @@ OperationCode/private VAL_PTR = &ansi_tcap_private.d.OperationCode_private
|
|||
|
||||
#.FN_BODY ReturnError/parameter
|
||||
if(find_tcap_subdissector(tvb, actx, tree))
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
|
||||
#.FN_HDR ReturnError
|
||||
ansi_tcap_private.d.pdu = 3;
|
||||
|
@ -158,7 +158,7 @@ guint8 len;
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
if(next_tvb) {
|
||||
len = tvb_captured_length_remaining(next_tvb, 0);
|
||||
len = tvb_length_remaining(next_tvb, 0);
|
||||
if(len !=0){
|
||||
/* 0 octets for the Unidirectional,
|
||||
* 4 octets for Query, Response & Abort
|
||||
|
|
|
@ -947,7 +947,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
|
|||
case EAX_MODE_CIPHERTEXT_AUTH:
|
||||
/* mode is ciphertext with authentication */
|
||||
hasmac = TRUE;
|
||||
len2 = tvb_captured_length_remaining(tvb, offset);
|
||||
len2 = tvb_length_remaining(tvb, offset);
|
||||
if (len2 <= 0)
|
||||
return offset;
|
||||
encrypted = TRUE;
|
||||
|
@ -967,7 +967,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
|
|||
case EAX_MODE_CLEARTEXT_AUTH:
|
||||
/* mode is cleartext with authentication */
|
||||
hasmac = TRUE;
|
||||
len2 = tvb_captured_length_remaining(tvb, offset);
|
||||
len2 = tvb_length_remaining(tvb, offset);
|
||||
if (len2 <= 0)
|
||||
return offset;
|
||||
buffer = (guchar *)tvb_memdup(wmem_packet_scope(), tvb, offset, len2);
|
||||
|
@ -1072,7 +1072,7 @@ dissect_c1222_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
dissect_MESSAGE_PDU(tvb, pinfo, c1222_tree);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1108,7 +1108,7 @@ dissect_c1222(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
{
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, c1222_desegment, 5,
|
||||
get_c1222_message_len, dissect_c1222_common, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_register_c1222 -------------------------------------------*/
|
||||
|
|
|
@ -296,7 +296,7 @@ proto_tree *subtree;
|
|||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_camel_cause);
|
||||
|
||||
dissect_q931_cause_ie(parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), subtree, hf_camel_cause_indicator, &Cause_value, isup_parameter_type_value);
|
||||
dissect_q931_cause_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), subtree, hf_camel_cause_indicator, &Cause_value, isup_parameter_type_value);
|
||||
#.END
|
||||
|
||||
#----------------------------------------------------------------------------------------
|
||||
|
@ -312,7 +312,7 @@ proto_tree *subtree;
|
|||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_camel_RPcause);
|
||||
|
||||
dissect_RP_cause_ie(parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), subtree, hf_camel_RP_Cause, &Cause_value);
|
||||
dissect_RP_cause_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), subtree, hf_camel_RP_Cause, &Cause_value);
|
||||
#.END
|
||||
|
||||
#----------------------------------------------------------------------------------------
|
||||
|
@ -421,7 +421,7 @@ proto_tree *subtree;
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), tree);
|
||||
dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), tree);
|
||||
#.END
|
||||
|
||||
#----------------------------------------------------------------------------------------
|
||||
|
@ -466,7 +466,7 @@ proto_tree *subtree;
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_camel_AccessPointName);
|
||||
de_sm_apn(parameter_tvb, subtree, actx->pinfo, 0, tvb_captured_length(parameter_tvb), NULL, 0);
|
||||
de_sm_apn(parameter_tvb, subtree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
|
||||
#.END
|
||||
|
||||
#----------------------------------------------------------------------------------------
|
||||
|
@ -522,10 +522,10 @@ proto_tree *subtree;
|
|||
case 1: /* IETF */
|
||||
switch(PDPTypeNumber){
|
||||
case 0x21: /* IPv4 */
|
||||
proto_tree_add_item(subtree, hf_camel_PDPAddress_IPv4, parameter_tvb, 0, tvb_captured_length(parameter_tvb), ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(subtree, hf_camel_PDPAddress_IPv4, parameter_tvb, 0, tvb_length(parameter_tvb), ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case 0x57: /* IPv6 */
|
||||
proto_tree_add_item(subtree, hf_camel_PDPAddress_IPv6, parameter_tvb, 0, tvb_captured_length(parameter_tvb), ENC_NA);
|
||||
proto_tree_add_item(subtree, hf_camel_PDPAddress_IPv6, parameter_tvb, 0, tvb_length(parameter_tvb), ENC_NA);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -629,7 +629,7 @@ proto_tree *subtree;
|
|||
|
||||
# V3 and V4 incompatibillity bug #1719
|
||||
#.FN_BODY CAMEL-AChBillingChargingCharacteristics/timeDurationCharging/audibleIndicator
|
||||
if (tvb_captured_length_remaining(tvb,offset) < 2)
|
||||
if (tvb_length_remaining(tvb,offset) < 2)
|
||||
offset = dissect_camel_BOOLEAN(TRUE, tvb, offset, actx , tree, hf_camel_audibleIndicatorTone);
|
||||
else
|
||||
%(DEFAULT_BODY)s
|
||||
|
@ -658,7 +658,7 @@ proto_tree *subtree;
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_camel_calledpartybcdnumber);
|
||||
de_cld_party_bcd_num(parameter_tvb, subtree, actx->pinfo, 0, tvb_captured_length(parameter_tvb), NULL, 0);
|
||||
de_cld_party_bcd_num(parameter_tvb, subtree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
|
||||
|
||||
#.END
|
||||
|
||||
|
|
|
@ -1104,7 +1104,7 @@ dissect_camel_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
|
|||
tap_queue_packet(camel_tap, pinfo, gp_camelsrt_info);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1142,7 +1142,7 @@ dissect_camel_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
|
|||
tap_queue_packet(camel_tap, pinfo, gp_camelsrt_info);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1179,7 +1179,7 @@ dissect_camel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
|
|||
tap_queue_packet(camel_tap, pinfo, gp_camelsrt_info);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_reg_handoff_camel ---------------------------------------*/
|
||||
|
|
|
@ -76,7 +76,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
return offset;
|
||||
}
|
||||
|
||||
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_captured_length (compr_tvb));
|
||||
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_length (compr_tvb));
|
||||
|
||||
if (next_tvb == NULL) {
|
||||
proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content,
|
||||
|
|
|
@ -12,5 +12,5 @@ ChargingMessageType
|
|||
#.FN_BODY ExtensionField/value
|
||||
|
||||
proto_tree_add_text(tree, tvb, offset, -1, "Extensions not dissected");
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
#.END
|
||||
|
|
|
@ -55,10 +55,10 @@ dissect_charging_ase(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *it;
|
||||
proto_tree *tr;
|
||||
|
||||
it=proto_tree_add_protocol_format(tree, proto_charging_ase, tvb, 0, tvb_captured_length(tvb), "Charging ASE");
|
||||
it=proto_tree_add_protocol_format(tree, proto_charging_ase, tvb, 0, tvb_length(tvb), "Charging ASE");
|
||||
tr=proto_item_add_subtree(it, ett_charging_ase);
|
||||
|
||||
if(tvb_captured_length(tvb)>0)
|
||||
if(tvb_length(tvb)>0)
|
||||
{
|
||||
dissect_charging_ase_ChargingMessageType_PDU(tvb , pinfo, tr, NULL);
|
||||
}
|
||||
|
|
|
@ -275,7 +275,7 @@ RejectProblem
|
|||
if(attributeform==ATTRIBUTE_GLOBAL_FORM){
|
||||
offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, actx->pinfo, tree, actx->private_data);
|
||||
} else if (dissector_try_uint(attribute_id_dissector_table, attribute_local_id, tvb, actx->pinfo, tree)) {
|
||||
offset=tvb_captured_length (tvb);
|
||||
offset=tvb_length (tvb);
|
||||
} else {
|
||||
offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ RejectProblem
|
|||
if(attributeform==ATTRIBUTE_GLOBAL_FORM){
|
||||
offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
|
||||
} else if (dissector_try_uint(attribute_id_dissector_table, attribute_local_id, tvb, actx->pinfo, tree)) {
|
||||
offset=tvb_captured_length (tvb);
|
||||
offset=tvb_length (tvb);
|
||||
} else {
|
||||
offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
;
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_register_cmip ----------------------------------------------*/
|
||||
|
|
|
@ -147,9 +147,9 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
|
|||
|
||||
switch(pdu_type){
|
||||
case CMP_TYPE_PKIMSG:
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_POLLREP:
|
||||
proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -175,14 +175,14 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
|
|||
proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
|
||||
offset += 4;
|
||||
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_FINALMSGREP:
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_ERRORMSGREP:
|
||||
/*XXX to be added*/
|
||||
|
@ -259,7 +259,7 @@ dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void
|
|||
tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, offset, get_cmp_pdu_len,
|
||||
dissect_cmp_tcp_pdu, data);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ RevocationInfoChoice/other otherRIC
|
|||
#.FN_BODY EncapsulatedContentInfo/eContent
|
||||
|
||||
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &content_tvb);
|
||||
proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_captured_length (content_tvb));
|
||||
proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_length (content_tvb));
|
||||
|
||||
call_ber_oid_callback(object_identifier_id, content_tvb, 0, actx->pinfo, top_tree ? top_tree : tree, NULL);
|
||||
|
||||
|
|
|
@ -96,8 +96,8 @@ cms_verify_msg_digest(proto_item *pi, tvbuff_t *content, const char *alg, tvbuff
|
|||
|
||||
sha1_starts(&sha1_ctx);
|
||||
|
||||
sha1_update(&sha1_ctx, tvb_get_ptr(content, 0, tvb_captured_length(content)),
|
||||
tvb_captured_length(content));
|
||||
sha1_update(&sha1_ctx, tvb_get_ptr(content, 0, tvb_length(content)),
|
||||
tvb_length(content));
|
||||
|
||||
sha1_finish(&sha1_ctx, digest_buf);
|
||||
|
||||
|
@ -107,8 +107,8 @@ cms_verify_msg_digest(proto_item *pi, tvbuff_t *content, const char *alg, tvbuff
|
|||
|
||||
md5_init(&md5_ctx);
|
||||
|
||||
md5_append(&md5_ctx, tvb_get_ptr(content, 0, tvb_captured_length(content)),
|
||||
tvb_captured_length(content));
|
||||
md5_append(&md5_ctx, tvb_get_ptr(content, 0, tvb_length(content)),
|
||||
tvb_length(content));
|
||||
|
||||
md5_finish(&md5_ctx, digest_buf);
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ dissect_credssp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
|||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||
|
||||
/* Look for SEQUENCE, CONTEXT 0, and INTEGER 2 */
|
||||
if(tvb_captured_length(tvb) > 7) {
|
||||
if(tvb_length(tvb) > 7) {
|
||||
offset = get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
|
||||
if((ber_class == BER_CLASS_UNI) && (tag == BER_UNI_TAG_SEQUENCE) && (pc == TRUE)) {
|
||||
offset = get_ber_length(tvb, offset, NULL, NULL);
|
||||
|
|
|
@ -290,7 +290,7 @@ OPERATION.&ResultType
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
if(out_tvb) {
|
||||
len = tvb_captured_length(out_tvb);
|
||||
len = tvb_length(out_tvb);
|
||||
/* now see if we can add a string representation */
|
||||
for(i=0; i<len; i++)
|
||||
if(!g_ascii_isprint(tvb_get_guint8(out_tvb, i)))
|
||||
|
|
|
@ -167,7 +167,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DISP PDU");
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
if(disp_dissector) {
|
||||
|
@ -183,7 +183,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet
|
|||
proto_item *item=NULL;
|
||||
proto_tree *next_tree=NULL;
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_captured_length_remaining(tvb, offset), "Dissector for parameter %s OID:%s not implemented. Contact Wireshark developers if you want this supported", base_string, binding_type ? binding_type : "<empty>");
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), "Dissector for parameter %s OID:%s not implemented. Contact Wireshark developers if you want this supported", base_string, binding_type ? binding_type : "<empty>");
|
||||
if (item) {
|
||||
next_tree = proto_item_add_subtree(item, ett_dop_unknown);
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
|
|||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DOP PDU");
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
if(dop_dissector) {
|
||||
|
@ -225,7 +225,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
|
|||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
|
|||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, -1,"Unsupported DSP PDU");
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
if(dsp_dissector) {
|
||||
|
@ -255,7 +255,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
|
|||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -122,13 +122,13 @@ ess_dissect_attribute_flags (tvbuff_t *tvb, asn1_ctx_t *actx)
|
|||
guint i;
|
||||
|
||||
tree = proto_item_add_subtree (actx->created_item, ett_Category_attributes);
|
||||
value = (guint8 *)tvb_memdup (wmem_packet_scope(), tvb, 0, tvb_captured_length (tvb));
|
||||
value = (guint8 *)tvb_memdup (wmem_packet_scope(), tvb, 0, tvb_length (tvb));
|
||||
|
||||
for (i = 0; i < num_ess_category_attributes; i++) {
|
||||
ess_category_attributes_t *u = &(ess_category_attributes[i]);
|
||||
|
||||
if ((strcmp (u->oid, object_identifier_id) == 0) &&
|
||||
((u->lacv / 8) < tvb_captured_length (tvb)) &&
|
||||
((u->lacv / 8) < tvb_length (tvb)) &&
|
||||
(value[u->lacv / 8] & (1 << (7 - (u->lacv % 8)))))
|
||||
{
|
||||
proto_tree_add_string_format (tree, hf_ess_Category_attribute, tvb,
|
||||
|
|
|
@ -67,7 +67,7 @@ static gint ett_ftam = -1;
|
|||
static void
|
||||
dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
|
||||
{
|
||||
proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_captured_length_remaining(tvb, 0), ENC_ASCII|ENC_NA);
|
||||
proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_ASCII|ENC_NA);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -76,7 +76,7 @@ dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
|
|||
static void
|
||||
dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
|
||||
{
|
||||
proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_captured_length_remaining(tvb, 0), ENC_NA);
|
||||
proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), ENC_NA);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -22,7 +22,7 @@ GOOSEpdu
|
|||
nstime_t ts;
|
||||
gchar * ptime;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
|
||||
if(len != 8)
|
||||
{
|
||||
|
|
|
@ -233,7 +233,7 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
|
|||
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree, NULL);
|
||||
}else{
|
||||
call_dissector(data_handle, tvb, actx->pinfo, tree);
|
||||
offset = tvb_captured_length_remaining(tvb,offset);
|
||||
offset = tvb_length_remaining(tvb,offset);
|
||||
}
|
||||
|
||||
#.FN_PARS AccessNetworkProtocolId
|
||||
|
@ -261,7 +261,7 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
|
|||
|
||||
if (!parameter_tvb)
|
||||
return offset;
|
||||
if(tvb_captured_length(parameter_tvb)==0)
|
||||
if(tvb_length(parameter_tvb)==0)
|
||||
return offset;
|
||||
|
||||
digit_str = unpack_digits(parameter_tvb, 0);
|
||||
|
@ -506,7 +506,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
length = tvb_ensure_captured_length_remaining(parameter_tvb,0);
|
||||
length = tvb_ensure_length_remaining(parameter_tvb,0);
|
||||
switch(sms_encoding){
|
||||
case SMS_ENCODING_7BIT:
|
||||
case SMS_ENCODING_7BIT_LANG:
|
||||
|
@ -596,10 +596,10 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
|
|||
octet = tvb_get_guint8(parameter_tvb,0);
|
||||
switch(octet){
|
||||
case 0x04: /* IPv4 */
|
||||
proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_captured_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case 0x50: /* IPv4 */
|
||||
proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_captured_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(subtree, hf_gsm_map_GSNAddress_IPv4, parameter_tvb, 1, tvb_length_remaining(parameter_tvb, 1), ENC_BIG_ENDIAN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -639,7 +639,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
|
|||
return offset;
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation);
|
||||
be_chan_type(parameter_tvb, subtree, actx->pinfo, 0, tvb_captured_length_remaining(tvb,0), NULL, 0);
|
||||
be_chan_type(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0);
|
||||
|
||||
#.FN_BODY RANAP-ServiceHandover VAL_PTR = ¶meter_tvb
|
||||
tvbuff_t *parameter_tvb;
|
||||
|
@ -846,7 +846,7 @@ if (!actx->value_ptr)
|
|||
return offset;
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GlobalCellId);
|
||||
be_cell_id_aux(parameter_tvb, subtree, actx->pinfo, 0, tvb_captured_length_remaining(tvb,0), NULL, 0, 0);
|
||||
be_cell_id_aux(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0, 0);
|
||||
|
||||
#.FN_BODY Ext-GeographicalInformation VAL_PTR = ¶meter_tvb
|
||||
tvbuff_t *parameter_tvb;
|
||||
|
@ -880,7 +880,7 @@ if (!actx->value_ptr)
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
length = tvb_captured_length(parameter_tvb);
|
||||
length = tvb_length(parameter_tvb);
|
||||
name_len = tvb_get_guint8(parameter_tvb, 0);
|
||||
apn_str = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 1, length - 1, ENC_ASCII|ENC_NA);
|
||||
if (name_len < length-1) {
|
||||
|
|
|
@ -322,7 +322,7 @@ unpack_digits(tvbuff_t *tvb, int offset) {
|
|||
int i=0;
|
||||
char *digit_str;
|
||||
|
||||
length = tvb_captured_length(tvb);
|
||||
length = tvb_length(tvb);
|
||||
if (length < offset)
|
||||
return "";
|
||||
digit_str = (char *)wmem_alloc(wmem_packet_scope(), (length - offset)*2+1);
|
||||
|
@ -826,7 +826,7 @@ dissect_gsm_map_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|||
proto_tree_add_item(tree, hf_gsm_map_nature_of_number, tvb, 0,1,ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_gsm_map_number_plan, tvb, 0,1,ENC_BIG_ENDIAN);
|
||||
|
||||
if(tvb_captured_length(tvb)==1)
|
||||
if(tvb_length(tvb)==1)
|
||||
return;
|
||||
|
||||
digit_str = unpack_digits(tvb, 1);
|
||||
|
@ -1369,7 +1369,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
|
|||
proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData,
|
||||
tvb, offset, -1, "Unknown invokeData %d", opcode);
|
||||
}
|
||||
offset+= tvb_captured_length_remaining(tvb,offset);
|
||||
offset+= tvb_length_remaining(tvb,offset);
|
||||
break;
|
||||
}
|
||||
return offset;
|
||||
|
@ -1679,7 +1679,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
|
|||
proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData,
|
||||
tvb, offset, -1, "Unknown returnResultData %d", opcode);
|
||||
}
|
||||
offset+= tvb_captured_length_remaining(tvb,offset);
|
||||
offset+= tvb_length_remaining(tvb,offset);
|
||||
break;
|
||||
}
|
||||
return offset;
|
||||
|
@ -1842,7 +1842,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,
|
|||
proto_tree_add_expert_format(tree, actx->pinfo, &ei_gsm_map_unknown_invokeData,
|
||||
tvb, offset, -1, "Unknown returnErrorData %d", opcode);
|
||||
}
|
||||
offset+= tvb_captured_length_remaining(tvb,offset);
|
||||
offset+= tvb_length_remaining(tvb,offset);
|
||||
break;
|
||||
}
|
||||
return offset;
|
||||
|
@ -2235,7 +2235,7 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void
|
|||
tap_queue_packet(gsm_map_tap, pinfo, &tap_rec);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
const value_string ssCode_vals[] = {
|
||||
|
|
|
@ -270,7 +270,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
codec_str[0] = '\0';
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
if (value_tvb && tvb_captured_length(value_tvb)) {
|
||||
if (value_tvb && tvb_length(value_tvb)) {
|
||||
dissect_h245_FastStart_OLC(value_tvb, %(ACTX)s->pinfo, tree, codec_str);
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
%(DEFAULT_BODY)s
|
||||
if (h225_pi && h225_pi->is_destinationInfo == TRUE) {
|
||||
if (value_tvb) {
|
||||
len = tvb_captured_length(value_tvb);
|
||||
len = tvb_length(value_tvb);
|
||||
/* XXX - should this be allocated as an ephemeral string? */
|
||||
if (len > sizeof h225_pi->dialedDigits - 1)
|
||||
len = sizeof h225_pi->dialedDigits - 1;
|
||||
|
@ -556,7 +556,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
|
|||
tvbuff_t *h4501_tvb = NULL;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
if (h4501_tvb && tvb_captured_length(h4501_tvb)) {
|
||||
if (h4501_tvb && tvb_length(h4501_tvb)) {
|
||||
call_dissector(h4501_handle, h4501_tvb, %(ACTX)s->pinfo, tree);
|
||||
}
|
||||
#.END
|
||||
|
@ -625,7 +625,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode
|
|||
tvbuff_t *next_tvb = NULL;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
if (next_tvb && tvb_captured_length(next_tvb)) {
|
||||
if (next_tvb && tvb_length(next_tvb)) {
|
||||
call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
|
||||
}
|
||||
#.END
|
||||
|
|
|
@ -159,7 +159,7 @@ dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
it=proto_tree_add_protocol_format(tree, proto_h225, tvb, 0, tvb_captured_length(tvb), PSNAME" CS");
|
||||
it=proto_tree_add_protocol_format(tree, proto_h225, tvb, 0, tvb_length(tvb), PSNAME" CS");
|
||||
tr=proto_item_add_subtree(it, ett_h225);
|
||||
|
||||
offset = dissect_H323_UserInformation_PDU(tvb, pinfo, tr, NULL);
|
||||
|
@ -194,7 +194,7 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
|
||||
it=proto_tree_add_protocol_format(tree, proto_h225, tvb, offset, tvb_captured_length(tvb), PSNAME" RAS");
|
||||
it=proto_tree_add_protocol_format(tree, proto_h225, tvb, offset, tvb_length(tvb), PSNAME" RAS");
|
||||
tr=proto_item_add_subtree(it, ett_h225);
|
||||
|
||||
offset = dissect_RasMessage_PDU(tvb, pinfo, tr, NULL);
|
||||
|
|
|
@ -981,7 +981,7 @@ NonStandardIdentifier/h221NonStandard/manufacturerCode VAL_PTR = &manufacturerC
|
|||
tvbuff_t *next_tvb = NULL;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
if (next_tvb && tvb_captured_length(next_tvb)) {
|
||||
if (next_tvb && tvb_length(next_tvb)) {
|
||||
call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
|
||||
}
|
||||
#.END
|
||||
|
@ -994,7 +994,7 @@ NonStandardIdentifier/h221NonStandard/manufacturerCode VAL_PTR = &manufacturerC
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
if (next_tvb && tvb_captured_length(next_tvb)) {
|
||||
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");
|
||||
|
|
|
@ -425,11 +425,11 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
|
||||
it=proto_tree_add_protocol_format(parent_tree, proto_h245, tvb, 0, tvb_captured_length(tvb), PSNAME);
|
||||
it=proto_tree_add_protocol_format(parent_tree, proto_h245, tvb, 0, tvb_length(tvb), PSNAME);
|
||||
tr=proto_item_add_subtree(it, ett_h245);
|
||||
|
||||
/* assume that whilst there is more tvb data, there are more h245 commands */
|
||||
while ( tvb_captured_length_remaining( tvb, offset>>3 )>0 ){
|
||||
while ( tvb_length_remaining( tvb, offset>>3 )>0 ){
|
||||
CLEANUP_PUSH(reset_h245_pi, NULL);
|
||||
h245_pi=wmem_new(wmem_packet_scope(), h245_packet_info);
|
||||
init_h245_packet_info(h245_pi);
|
||||
|
|
|
@ -338,7 +338,7 @@ AuditReplyV1/auditResult audit_result
|
|||
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
|
||||
|
||||
if (new_tvb) {
|
||||
curr_info.term->len = tvb_captured_length(new_tvb);
|
||||
curr_info.term->len = tvb_length(new_tvb);
|
||||
curr_info.term->type = 0; /* unknown */
|
||||
|
||||
if (h248_term_handle) {
|
||||
|
@ -396,7 +396,7 @@ AuditReplyV1/auditResult audit_result
|
|||
|
||||
#.FN_BODY ValueV1
|
||||
/* check tvb to verify all values ascii or not. If so, output string, else hex */
|
||||
len=tvb_captured_length_remaining(tvb, offset);
|
||||
len=tvb_length_remaining(tvb, offset);
|
||||
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 {
|
||||
|
|
|
@ -805,7 +805,7 @@ static int dissect_h248_trx_id(gboolean implicit_tag, packet_info *pinfo, proto_
|
|||
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
|
||||
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, NULL);
|
||||
} else {
|
||||
len=tvb_captured_length_remaining(tvb, offset);
|
||||
len=tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
|
||||
|
@ -843,7 +843,7 @@ static int dissect_h248_ctx_id(gboolean implicit_tag, packet_info *pinfo, proto_
|
|||
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
|
||||
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, NULL);
|
||||
} else {
|
||||
len=tvb_captured_length_remaining(tvb, offset);
|
||||
len=tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1237,7 +1237,7 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
|
|||
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
|
||||
pi = actx->created_item;
|
||||
|
||||
switch(tvb_captured_length(next_tvb)) {
|
||||
switch(tvb_length(next_tvb)) {
|
||||
case 4: param_id = tvb_get_ntohl(next_tvb,0); break;
|
||||
case 3: param_id = tvb_get_ntoh24(next_tvb,0); break;
|
||||
case 2: param_id = tvb_get_ntohs(next_tvb,0); break;
|
||||
|
@ -1310,7 +1310,7 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *
|
|||
pi = actx->created_item;
|
||||
|
||||
if (next_tvb) {
|
||||
switch(tvb_captured_length(next_tvb)) {
|
||||
switch(tvb_length(next_tvb)) {
|
||||
case 4: param_id = tvb_get_ntohl(next_tvb,0); break;
|
||||
case 3: param_id = tvb_get_ntoh24(next_tvb,0); break;
|
||||
case 2: param_id = tvb_get_ntohs(next_tvb,0); break;
|
||||
|
@ -1389,7 +1389,7 @@ static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int off
|
|||
if (new_tvb) {
|
||||
/* this field is either 2 or 4 bytes so just read it into an integer */
|
||||
val=0;
|
||||
len=tvb_captured_length(new_tvb);
|
||||
len=tvb_length(new_tvb);
|
||||
for(i=0;i<len;i++){
|
||||
val= (val<<8)|tvb_get_guint8(new_tvb, i);
|
||||
}
|
||||
|
@ -1439,7 +1439,7 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
dissect with the "megaco" dissector in Wireshark. (Both
|
||||
encodings are MEGACO (RFC 3015) and both are H.248.)
|
||||
*/
|
||||
if(tvb_captured_length(tvb)>=6){
|
||||
if(tvb_length(tvb)>=6){
|
||||
if(!tvb_strneql(tvb, 0, "MEGACO", 6)){
|
||||
static dissector_handle_t megaco_handle=NULL;
|
||||
if(!megaco_handle){
|
||||
|
|
|
@ -93,7 +93,7 @@ LCTPDU
|
|||
tvbuff_t *next_tvb = NULL;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
if (next_tvb && tvb_captured_length(next_tvb)) {
|
||||
if (next_tvb && tvb_length(next_tvb)) {
|
||||
call_dissector((rdc_pdu_handle)?rdc_pdu_handle:data_handle, next_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
|
||||
}
|
||||
info_is_set = TRUE;
|
||||
|
@ -103,7 +103,7 @@ LCTPDU
|
|||
tvbuff_t *next_tvb = NULL;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
if (next_tvb && tvb_captured_length(next_tvb)) {
|
||||
if (next_tvb && tvb_length(next_tvb)) {
|
||||
call_dissector((rdc_device_list_handle)?rdc_device_list_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
|
||||
}
|
||||
#.END
|
||||
|
|
|
@ -145,12 +145,12 @@ dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rctx->apdu_depth), " %s", p);
|
||||
}
|
||||
|
||||
if (op_ptr->arg_pdu && (tvb_captured_length_remaining(tvb, offset) > 0))
|
||||
if (op_ptr->arg_pdu && (tvb_length_remaining(tvb, offset) > 0))
|
||||
offset = op_ptr->arg_pdu(tvb, pinfo, tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(tree, tvb, offset, -1, "UNSUPPORTED ARGUMENT TYPE (H.450)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -190,12 +190,12 @@ dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rctx->apdu_depth), " %s", p);
|
||||
}
|
||||
|
||||
if (op_ptr->res_pdu && (tvb_captured_length_remaining(tvb, offset) > 0))
|
||||
if (op_ptr->res_pdu && (tvb_length_remaining(tvb, offset) > 0))
|
||||
offset = op_ptr->res_pdu(tvb, pinfo, tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(tree, tvb, offset, -1, "UNSUPPORTED RESULT TYPE (H.450)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -235,12 +235,12 @@ dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rctx->apdu_depth), " %s", p);
|
||||
}
|
||||
|
||||
if (err_ptr->err_pdu && (tvb_captured_length_remaining(tvb, offset) > 0))
|
||||
if (err_ptr->err_pdu && (tvb_length_remaining(tvb, offset) > 0))
|
||||
offset = err_ptr->err_pdu(tvb, pinfo, tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(tree, tvb, offset, -1, "UNSUPPORTED ERROR TYPE (H.450)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -61,7 +61,7 @@ dissect_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
|||
|
||||
if (q931_ie_handle) {
|
||||
call_dissector(q931_ie_handle, tvb, pinfo, tree);
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ dissect_ras(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
|||
|
||||
if (h225_ras_handle) {
|
||||
call_dissector(h225_ras_handle, tvb, pinfo, tree);
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
|
|
@ -78,14 +78,14 @@ static int
|
|||
dissect_h501_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
dissect_tpkt_encap(tvb, pinfo, tree, FALSE, h501_pdu_handle);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_h501_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
dissect_tpkt_encap(tvb, pinfo, tree, h501_desegment_tcp, h501_pdu_handle);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_register_h501 ----------------------------------------------*/
|
||||
|
|
|
@ -83,46 +83,46 @@ void proto_reg_handoff_hnbap(void);
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(hnbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(hnbap_ies_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(hnbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(hnbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
#if 0
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureCode) return 0;
|
||||
return (dissector_try_string(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureCode) return 0;
|
||||
return (dissector_try_string(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureCode) return 0;
|
||||
return (dissector_try_string(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(hnbap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(hnbap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? 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(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(hnbap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -230,7 +230,7 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
|
|||
dissect_idmp_IDM_PDU(FALSE, tvb, offset, &asn1_ctx, tree, hf_idmp_PDU);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static guint get_idmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
|
||||
|
@ -245,7 +245,7 @@ static guint get_idmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
|
|||
static int dissect_idmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data)
|
||||
{
|
||||
tcp_dissect_pdus(tvb, pinfo, parent_tree, idmp_desegment, 0, get_idmp_pdu_len, dissect_idmp, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void idmp_reassemble_init (void)
|
||||
|
|
|
@ -82,7 +82,7 @@ dissect_ilp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
{
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, ilp_desegment, ILP_HEADER_SIZE,
|
||||
get_ilp_pdu_len, dissect_ILP_PDU_PDU, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
void proto_reg_handoff_ilp(void);
|
||||
|
|
|
@ -217,7 +217,7 @@ static const inap_err_t inap_err_tab[] = {
|
|||
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree, NULL);
|
||||
}else{
|
||||
call_dissector(data_handle, tvb, actx->pinfo, tree);
|
||||
offset = tvb_captured_length_remaining(tvb,offset);
|
||||
offset = tvb_length_remaining(tvb,offset);
|
||||
}
|
||||
|
||||
|
||||
|
@ -252,7 +252,7 @@ dissect_isup_called_party_number_parameter(parameter_tvb, tree, NULL);
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), tree);
|
||||
dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), tree);
|
||||
|
||||
#.FN_BODY RedirectionInformation VAL_PTR = ¶meter_tvb
|
||||
|
||||
|
@ -297,7 +297,7 @@ dissect_isup_called_party_number_parameter(parameter_tvb, tree, NULL);
|
|||
return offset;
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_inap_HighLayerCompatibility);
|
||||
dissect_q931_high_layer_compat_ie(parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), subtree);
|
||||
dissect_q931_high_layer_compat_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), subtree);
|
||||
|
||||
#.TYPE_ATTR
|
||||
CallingPartysCategory TYPE = FT_UINT16 DISPLAY = BASE_DEC|BASE_EXT_STRING STRINGS = &isup_calling_partys_category_value_ext
|
||||
|
|
|
@ -161,7 +161,7 @@ dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
if (!op_ptr)
|
||||
return offset;
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_isdn_sup, tvb, offset, tvb_captured_length(tvb), ENC_NA);
|
||||
ti = proto_tree_add_item(tree, proto_isdn_sup, tvb, offset, tvb_length(tvb), ENC_NA);
|
||||
isdn_sup_tree = proto_item_add_subtree(ti, ett_isdn_sup);
|
||||
|
||||
proto_tree_add_uint(isdn_sup_tree, hf_isdn_sup_operation, tvb, 0, 0, opcode);
|
||||
|
@ -176,9 +176,9 @@ dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
if (op_ptr->arg_pdu)
|
||||
offset = op_ptr->arg_pdu(tvb, pinfo, isdn_sup_tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(isdn_sup_tree, tvb, offset, -1, "UNSUPPORTED ARGUMENT TYPE (ETSI Sup)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -210,7 +210,7 @@ dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
if (!op_ptr)
|
||||
return offset;
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_isdn_sup, tvb, offset, tvb_captured_length(tvb), ENC_NA);
|
||||
ti = proto_tree_add_item(tree, proto_isdn_sup, tvb, offset, tvb_length(tvb), ENC_NA);
|
||||
isdn_sup_tree = proto_item_add_subtree(ti, ett_isdn_sup);
|
||||
|
||||
proto_tree_add_uint(isdn_sup_tree, hf_isdn_sup_operation, tvb, 0, 0, opcode);
|
||||
|
@ -225,9 +225,9 @@ dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
if (op_ptr->res_pdu)
|
||||
offset = op_ptr->res_pdu(tvb, pinfo, isdn_sup_tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(isdn_sup_tree, tvb, offset, -1, "UNSUPPORTED RESULT TYPE (ETSI sup)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -260,7 +260,7 @@ dissect_isdn_sup_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
if (!err_ptr)
|
||||
return offset;
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_isdn_sup, tvb, offset, tvb_captured_length(tvb), ENC_NA);
|
||||
ti = proto_tree_add_item(tree, proto_isdn_sup, tvb, offset, tvb_length(tvb), ENC_NA);
|
||||
isdn_sup_tree = proto_item_add_subtree(ti, ett_isdn_sup);
|
||||
|
||||
proto_tree_add_uint(isdn_sup_tree, hf_isdn_sup_error, tvb, 0, 0, errcode);
|
||||
|
@ -275,9 +275,9 @@ dissect_isdn_sup_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
if (err_ptr->err_pdu)
|
||||
offset = err_ptr->err_pdu(tvb, pinfo, isdn_sup_tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(isdn_sup_tree, tvb, offset, -1, "UNSUPPORTED ERROR TYPE (ETSI sup)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -308,7 +308,7 @@ guint32 msgtype;
|
|||
#.FN_BODY EncryptionKey/keyvalue
|
||||
kerberos_private_data_t *private_data = kerberos_get_private_data(actx);
|
||||
|
||||
private_data->key.keylength = tvb_captured_length_remaining(tvb, offset);
|
||||
private_data->key.keylength = tvb_length_remaining(tvb, offset);
|
||||
private_data->key.keyvalue = tvb_get_ptr(tvb, offset, private_data->key.keylength);
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
|
|
|
@ -358,7 +358,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|||
enc_key_t *ek;
|
||||
krb5_data data = {0,0,NULL};
|
||||
krb5_keytab_entry key;
|
||||
int length = tvb_captured_length(cryptotvb);
|
||||
int length = tvb_length(cryptotvb);
|
||||
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
|
||||
|
||||
/* don't do anything if we are not attempting to decrypt data */
|
||||
|
@ -367,7 +367,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* make sure we have all the data we need */
|
||||
if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
|
||||
if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -496,7 +496,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|||
krb5_error_code ret;
|
||||
krb5_data data;
|
||||
enc_key_t *ek;
|
||||
int length = tvb_captured_length(cryptotvb);
|
||||
int length = tvb_length(cryptotvb);
|
||||
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
|
||||
|
||||
/* don't do anything if we are not attempting to decrypt data */
|
||||
|
@ -505,7 +505,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* make sure we have all the data we need */
|
||||
if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
|
||||
if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -680,7 +680,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|||
GSList *ske;
|
||||
service_key_t *sk;
|
||||
struct des3_ctx ctx;
|
||||
int length = tvb_captured_length(cryptotvb);
|
||||
int length = tvb_length(cryptotvb);
|
||||
const guint8 *cryptotext = tvb_get_ptr(cryptotvb, 0, length);
|
||||
|
||||
|
||||
|
@ -690,7 +690,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|||
}
|
||||
|
||||
/* make sure we have all the data we need */
|
||||
if (tvb_captured_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
|
||||
if (tvb_length(cryptotvb) < tvb_reported_length(cryptotvb)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1318,7 +1318,7 @@ dissect_krb5_decrypt_ticket_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offse
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
|
||||
* 7.5.1
|
||||
|
@ -1349,7 +1349,7 @@ dissect_krb5_decrypt_authenticator_data (gboolean imp_tag _U_, tvbuff_t *tvb, in
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
|
||||
* 7.5.1
|
||||
|
@ -1386,7 +1386,7 @@ dissect_krb5_decrypt_KDC_REP_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offs
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
|
||||
* 7.5.1
|
||||
|
@ -1428,7 +1428,7 @@ dissect_krb5_decrypt_PA_ENC_TIMESTAMP (gboolean imp_tag _U_, tvbuff_t *tvb, int
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
|
||||
* 7.5.1
|
||||
|
@ -1460,7 +1460,7 @@ dissect_krb5_decrypt_AP_REP_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offse
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* draft-ietf-krb-wg-kerberos-clarifications-05.txt :
|
||||
* 7.5.1
|
||||
|
@ -1491,7 +1491,7 @@ dissect_krb5_decrypt_PRIV_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offset,
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* RFC4120 :
|
||||
* EncKrbPrivPart encrypted with usage
|
||||
|
@ -1522,7 +1522,7 @@ dissect_krb5_decrypt_CRED_data (gboolean imp_tag _U_, tvbuff_t *tvb, int offset,
|
|||
tvbuff_t *next_tvb;
|
||||
|
||||
next_tvb=tvb_new_subset_remaining(tvb, offset);
|
||||
length=tvb_captured_length_remaining(tvb, offset);
|
||||
length=tvb_length_remaining(tvb, offset);
|
||||
|
||||
/* RFC4120 :
|
||||
* EncKrbCredPart encrypted with usage
|
||||
|
@ -1575,14 +1575,14 @@ dissect_krb5_rfc1964_checksum(asn1_ctx_t *actx _U_, proto_tree *tree, tvbuff_t *
|
|||
|
||||
/* the next fields are optional so we have to check that we have
|
||||
* more data in our buffers */
|
||||
if(tvb_captured_length_remaining(tvb, offset)<2){
|
||||
if(tvb_length_remaining(tvb, offset)<2){
|
||||
return offset;
|
||||
}
|
||||
/* dlgopt identifier */
|
||||
proto_tree_add_item(tree, hf_krb_gssapi_dlgopt, tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
if(tvb_captured_length_remaining(tvb, offset)<2){
|
||||
if(tvb_length_remaining(tvb, offset)<2){
|
||||
return offset;
|
||||
}
|
||||
/* dlglen identifier */
|
||||
|
@ -1590,8 +1590,8 @@ dissect_krb5_rfc1964_checksum(asn1_ctx_t *actx _U_, proto_tree *tree, tvbuff_t *
|
|||
proto_tree_add_item(tree, hf_krb_gssapi_dlglen, tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
if(dlglen!=tvb_captured_length_remaining(tvb, offset)){
|
||||
proto_tree_add_text(tree, tvb, 0, 0, "Error: DlgLen:%d is not the same as number of bytes remaining:%d", dlglen, tvb_captured_length_remaining(tvb, offset));
|
||||
if(dlglen!=tvb_length_remaining(tvb, offset)){
|
||||
proto_tree_add_text(tree, tvb, 0, 0, "Error: DlgLen:%d is not the same as number of bytes remaining:%d", dlglen, tvb_length_remaining(tvb, offset));
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -1814,7 +1814,7 @@ dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
All krb5 commands start with an APPL tag and thus is >=0x60
|
||||
so if first byte is <=16 just blindly assume it is krb4 then
|
||||
*/
|
||||
if(tvb_captured_length(tvb) >= 1 && tvb_get_guint8(tvb, 0)<=0x10){
|
||||
if(tvb_length(tvb) >= 1 && tvb_get_guint8(tvb, 0)<=0x10){
|
||||
if(krb4_handle){
|
||||
gboolean res;
|
||||
|
||||
|
@ -1865,7 +1865,7 @@ dissect_kerberos_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
|
|||
col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1876,7 +1876,7 @@ dissect_kerberos_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
|
|||
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, krb_desegment, 4, get_krb_pdu_len,
|
||||
dissect_kerberos_tcp_pdu, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_register_kerberos -------------------------------------------*/
|
||||
|
@ -1996,7 +1996,7 @@ static int wrap_dissect_gss_kerb(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
dissect_kerberos_main(auth_tvb, pinfo, tree, FALSE, NULL);
|
||||
|
||||
return tvb_captured_length_remaining(tvb, offset);
|
||||
return tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
tvbuff_t *parameter_tvb=NULL;
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
3, 3, FALSE, ¶meter_tvb);
|
||||
if(tvb_captured_length(tvb)==0)
|
||||
if(tvb_length(tvb)==0)
|
||||
return offset;
|
||||
|
||||
if (!parameter_tvb)
|
||||
|
|
|
@ -197,28 +197,28 @@ static const value_string lcsap_gnss_pos_usage_vals[] = {
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lcsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lcsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lcsap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lcsap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lcsap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lcsap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lcsap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lcsap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lcsap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lcsap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy"
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
|
||||
object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
|
||||
name = oid_resolved_from_string(object_identifier_id);
|
||||
|
||||
if(name){
|
||||
|
@ -194,7 +194,7 @@ char *mechanism = NULL;
|
|||
* different type and/or mechanism.
|
||||
*/
|
||||
if(!actx->pinfo->fd->flags.visited) {
|
||||
mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
|
||||
mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
|
||||
ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */
|
||||
/*
|
||||
* If the mechanism in this request is an empty string (which is
|
||||
|
@ -232,7 +232,7 @@ gint32 tag;
|
|||
* All SPNEGO PDUs are of class CONSTRUCTED while
|
||||
* GSS PDUs are class APPLICATION
|
||||
*/
|
||||
if (parameter_tvb && (tvb_captured_length(parameter_tvb) > 0))
|
||||
if (parameter_tvb && (tvb_length(parameter_tvb) > 0))
|
||||
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
|
||||
}
|
||||
/*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (ber_class==BER_CLASS_APP))) {*/
|
||||
|
@ -240,7 +240,7 @@ gint32 tag;
|
|||
/*
|
||||
* This is a raw GSS-API token.
|
||||
*/
|
||||
if (parameter_tvb && (tvb_captured_length(parameter_tvb) > 0)) {
|
||||
if (parameter_tvb && (tvb_length(parameter_tvb) > 0)) {
|
||||
call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree);
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ ldap_conv_info_t *ldap_info;
|
|||
* which might not be wrapped in GSS-SPNEGO but be a raw
|
||||
* NTLMSSP blob
|
||||
*/
|
||||
if ( (tvb_captured_length(parameter_tvb)>=7)
|
||||
if ( (tvb_length(parameter_tvb)>=7)
|
||||
&& (!tvb_memeql(parameter_tvb, 0, "NTLMSSP", 7))){
|
||||
call_dissector(ntlmssp_handle, parameter_tvb, actx->pinfo, tree);
|
||||
break;
|
||||
|
@ -304,14 +304,14 @@ ldap_conv_info_t *ldap_info;
|
|||
/*
|
||||
* This is a GSS-API token.
|
||||
*/
|
||||
if(parameter_tvb && (tvb_captured_length(parameter_tvb) > 0))
|
||||
if(parameter_tvb && (tvb_length(parameter_tvb) > 0))
|
||||
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
|
||||
} else if (ldap_info->auth_mech != NULL &&
|
||||
strcmp(ldap_info->auth_mech, "GSSAPI") == 0) {
|
||||
/*
|
||||
* This is a GSS-API token.
|
||||
*/
|
||||
if(parameter_tvb && (tvb_captured_length(parameter_tvb) > 0))
|
||||
if(parameter_tvb && (tvb_length(parameter_tvb) > 0))
|
||||
call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree);
|
||||
}
|
||||
break;
|
||||
|
@ -330,7 +330,7 @@ ldap_conv_info_t *ldap_info;
|
|||
ldap_do_protocolop(actx->pinfo);
|
||||
|
||||
if(parameter_tvb)
|
||||
ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_captured_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA);
|
||||
ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA);
|
||||
|
||||
if(hf_index == hf_ldap_baseObject) {
|
||||
/* this is search - put it on the scanline */
|
||||
|
@ -469,7 +469,7 @@ ldap_conv_info_t *ldap_info;
|
|||
|
||||
/* first check if we have a custom attribute type configured */
|
||||
if ((hf_id = get_hf_for_header (attr_type)) != NULL)
|
||||
proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_captured_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
|
||||
proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
|
||||
|
||||
/* if we have an attribute type that isn't binary see if there is a better dissector */
|
||||
else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) {
|
||||
|
@ -478,14 +478,14 @@ ldap_conv_info_t *ldap_info;
|
|||
/* do the default thing */
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
len = tvb_captured_length_remaining(next_tvb, 0);
|
||||
len = tvb_length_remaining(next_tvb, 0);
|
||||
|
||||
for(i = 0; i < len; i++)
|
||||
if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i)))
|
||||
break;
|
||||
|
||||
if(i == len) {
|
||||
string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_captured_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
|
||||
string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
|
||||
proto_item_set_text(actx->created_item, "AttributeValue: %%s", string);
|
||||
}
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ ldap_conv_info_t *ldap_info;
|
|||
|
||||
and_filter_string=NULL;
|
||||
if(tree){
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "and: ");
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "and: ");
|
||||
tr=proto_item_add_subtree(it, ett_ldap_T_and);
|
||||
tree = tr;
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ ldap_conv_info_t *ldap_info;
|
|||
|
||||
or_filter_string=NULL;
|
||||
if(tree){
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "or: ");
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "or: ");
|
||||
tr=proto_item_add_subtree(it, ett_ldap_T_or);
|
||||
tree = tr;
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
substring_item_any=NULL;
|
||||
substring_item_final=NULL;
|
||||
if(tree){
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "substring: ");
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "substring: ");
|
||||
tr=proto_item_add_subtree(it, ett_ldap_SubstringFilter);
|
||||
tree = tr;
|
||||
}
|
||||
|
@ -692,7 +692,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
}
|
||||
|
||||
if(tree){
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_captured_length_remaining(tvb, offset), "Filter: ");
|
||||
it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "Filter: ");
|
||||
tr=proto_item_add_subtree(it, ett_ldap_Filter);
|
||||
tree = tr;
|
||||
}
|
||||
|
@ -705,14 +705,14 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
ldap_do_protocolop(actx->pinfo);
|
||||
|
||||
call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree);
|
||||
offset+=tvb_captured_length_remaining(tvb, offset);
|
||||
offset+=tvb_length_remaining(tvb, offset);
|
||||
|
||||
#.FN_BODY AuthenticationChoice/ntlmsspAuth
|
||||
/* make sure the protocol op comes first */
|
||||
ldap_do_protocolop(actx->pinfo);
|
||||
|
||||
call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree);
|
||||
offset+=tvb_captured_length_remaining(tvb, offset);
|
||||
offset+=tvb_length_remaining(tvb, offset);
|
||||
|
||||
#.FN_BODY BindResponse/_untag/matchedDN
|
||||
tvbuff_t *new_tvb=NULL;
|
||||
|
@ -720,7 +720,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
|
||||
|
||||
if( new_tvb
|
||||
&& (tvb_captured_length(new_tvb)>=7)
|
||||
&& (tvb_length(new_tvb)>=7)
|
||||
&& (!tvb_memeql(new_tvb, 0, "NTLMSSP", 7))){
|
||||
|
||||
/* make sure the protocol op comes first */
|
||||
|
@ -787,7 +787,7 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &ber_class, &pc, &tag);
|
||||
otheroffset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
|
||||
} else {
|
||||
gint32 remaining=tvb_captured_length_remaining(tvb, offset);
|
||||
gint32 remaining=tvb_length_remaining(tvb, offset);
|
||||
len=remaining>0 ? remaining : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -604,7 +604,7 @@ dissect_ldap_AssertionValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, as
|
|||
offset=get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
|
||||
offset=get_ber_length(tvb, offset, &len, &ind);
|
||||
} else {
|
||||
len=tvb_captured_length_remaining(tvb,offset);
|
||||
len=tvb_length_remaining(tvb,offset);
|
||||
}
|
||||
|
||||
if(len==0){
|
||||
|
@ -914,7 +914,7 @@ dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
one_more_pdu:
|
||||
|
||||
length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
|
||||
length_remaining = tvb_ensure_length_remaining(tvb, offset);
|
||||
|
||||
if (length_remaining < 6) return;
|
||||
|
||||
|
@ -984,7 +984,7 @@ one_more_pdu:
|
|||
/* If this was a sasl blob there might be another PDU following in the
|
||||
* same blob
|
||||
*/
|
||||
if(tvb_captured_length_remaining(tvb, offset)>=6){
|
||||
if(tvb_length_remaining(tvb, offset)>=6){
|
||||
tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
offset = 0;
|
||||
|
||||
|
@ -1067,7 +1067,7 @@ static void
|
|||
}
|
||||
}
|
||||
|
||||
length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
|
||||
length_remaining = tvb_ensure_length_remaining(tvb, offset);
|
||||
|
||||
/* It might still be a packet containing a SASL security layer
|
||||
* but it's just that we never saw the BIND packet.
|
||||
|
@ -1191,7 +1191,7 @@ static void
|
|||
* the token, from which we compute the offset in the tvbuff at
|
||||
* which the plaintext data, i.e. the LDAP message, begins.
|
||||
*/
|
||||
tmp_length = tvb_captured_length_remaining(sasl_tvb, 4);
|
||||
tmp_length = tvb_length_remaining(sasl_tvb, 4);
|
||||
if ((guint)tmp_length > sasl_len)
|
||||
tmp_length = sasl_len;
|
||||
gssapi_tvb = tvb_new_subset(sasl_tvb, 4, tmp_length, sasl_len);
|
||||
|
@ -1443,7 +1443,7 @@ static void dissect_NetLogon_PDU(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
|
|||
|
||||
|
||||
/* Get the length of the buffer */
|
||||
len=tvb_captured_length_remaining(tvb,offset);
|
||||
len=tvb_length_remaining(tvb,offset);
|
||||
|
||||
/* check the len if it is to small return */
|
||||
if (len < 10) return;
|
||||
|
@ -1462,7 +1462,7 @@ static void dissect_NetLogon_PDU(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
|
|||
switch(itype){
|
||||
|
||||
case LOGON_SAM_LOGON_RESPONSE:
|
||||
bc = tvb_captured_length_remaining(tvb, offset);
|
||||
bc = tvb_length_remaining(tvb, offset);
|
||||
/* logon server name */
|
||||
fn = get_unicode_or_ascii_string(tvb,&offset,TRUE,&fn_len,FALSE,FALSE,&bc);
|
||||
proto_tree_add_string(tree, hf_mscldap_nb_hostname, tvb,offset, fn_len, fn);
|
||||
|
@ -1642,7 +1642,7 @@ static int
|
|||
dissect_sasl_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_ldap_pdu(tvb, pinfo, tree, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static guint
|
||||
|
@ -1664,7 +1664,7 @@ static int
|
|||
dissect_normal_ldap_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_ldap_pdu(tvb, pinfo, tree, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1678,7 +1678,7 @@ dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|||
* proto_tree_add_oid() instead.
|
||||
*/
|
||||
|
||||
oid=tvb_get_string_enc(wmem_packet_scope(), tvb, 0, tvb_captured_length(tvb), ENC_UTF_8|ENC_NA);
|
||||
oid=tvb_get_string_enc(wmem_packet_scope(), tvb, 0, tvb_length(tvb), ENC_UTF_8|ENC_NA);
|
||||
if(!oid){
|
||||
return;
|
||||
}
|
||||
|
@ -1686,9 +1686,9 @@ dissect_ldap_oid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|||
oidname=oid_resolved_from_string(oid);
|
||||
|
||||
if(oidname){
|
||||
proto_tree_add_text(tree, tvb, 0, tvb_captured_length(tvb), "OID: %s (%s)",oid,oidname);
|
||||
proto_tree_add_text(tree, tvb, 0, tvb_length(tvb), "OID: %s (%s)",oid,oidname);
|
||||
} else {
|
||||
proto_tree_add_text(tree, tvb, 0, tvb_captured_length(tvb), "OID: %s",oid);
|
||||
proto_tree_add_text(tree, tvb, 0, tvb_length(tvb), "OID: %s",oid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1770,7 +1770,7 @@ struct access_mask_info ldap_access_mask_info = {
|
|||
static void
|
||||
dissect_ldap_nt_sec_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
dissect_nt_sec_desc(tvb, 0, pinfo, tree, NULL, TRUE, tvb_captured_length(tvb), &ldap_access_mask_info);
|
||||
dissect_nt_sec_desc(tvb, 0, pinfo, tree, NULL, TRUE, tvb_length(tvb), &ldap_access_mask_info);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1856,7 +1856,7 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
|
|||
}
|
||||
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, ldap_desegment, 4, get_sasl_ldap_pdu_len, dissect_sasl_ldap_pdu, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
|
||||
this_was_not_sasl:
|
||||
/* check if it is a normal BER encoded LDAP packet
|
||||
|
@ -1936,16 +1936,16 @@ this_was_not_normal_ldap:
|
|||
dissector_add_uint("tcp.port", tcp_port, ldap_handle);
|
||||
|
||||
/* we are done */
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
/* Ok it might be a strange case of SASL still
|
||||
* It has been seen with Exchange setup to MS AD
|
||||
* when Exchange pretend that there is SASL but in fact data are still
|
||||
* in clear*/
|
||||
if ((sasl_len + 4) == (guint32)tvb_captured_length_remaining(tvb, 0))
|
||||
if ((sasl_len + 4) == (guint32)tvb_length_remaining(tvb, 0))
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, ldap_desegment, 4, get_sasl_ldap_pdu_len, dissect_sasl_ldap_pdu, data);
|
||||
end:
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -70,22 +70,22 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lppa_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lppa_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lppa_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lppa_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lppa_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lppa_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(lppa_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(lppa_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
/*--- proto_register_lppa -------------------------------------------*/
|
||||
|
|
|
@ -138,7 +138,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_captured_length(parameter_tvb);
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
proto_tree_add_item(tree, hf_m3ap_IPAddress, parameter_tvb, 0, tvb_len, ENC_NA);
|
||||
#.END
|
||||
|
||||
|
@ -152,7 +152,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_captured_length(parameter_tvb);
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
|
||||
time_str = tvb_ntp_fmt_ts(parameter_tvb, 0);
|
||||
proto_tree_add_string(tree, hf_m3ap_Absolute_Time_ofMBMS_Data_value, parameter_tvb, 0, tvb_len, time_str);
|
||||
|
@ -167,7 +167,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_captured_length(parameter_tvb);
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
|
||||
dissect_gtpv2_mbms_service_area(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
#.END
|
||||
|
@ -182,7 +182,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_captured_length(parameter_tvb);
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
|
||||
proto_item_append_text(actx->created_item, " ");
|
||||
dissect_gtpv2_mbms_session_duration(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
|
@ -197,7 +197,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
tvb_len = tvb_captured_length(parameter_tvb);
|
||||
tvb_len = tvb_length(parameter_tvb);
|
||||
dissect_gtpv2_mbms_time_to_data_xfer(parameter_tvb, actx->pinfo, tree, actx->created_item, tvb_len, 0, 0);
|
||||
#.END
|
||||
|
||||
|
|
|
@ -93,27 +93,27 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(m3ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(m3ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(m3ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(m3ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(m3ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(m3ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(m3ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(m3ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(m3ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(m3ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
|
|||
gchar * ptime;
|
||||
nstime_t ts;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
|
||||
if(len == 4)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
|
|||
nstime_t ts;
|
||||
gchar * ptime;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
|
||||
if(len != 8)
|
||||
{
|
||||
|
|
|
@ -627,7 +627,7 @@ actx->pinfo->link_dir=P2P_DIR_UL;
|
|||
# TransportLayerAddress ::= BIT STRING (SIZE (1..160, ...))
|
||||
# Assume 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_nbap_TransportLayerAddress);
|
||||
if (tvb_len==4){
|
||||
/* IPv4 */
|
||||
|
@ -720,7 +720,7 @@ hsdsch_macdflow_ids[num_items-1] = hsdsch_macdflow_id;
|
|||
# -- the UDP port field is included in the first octet of the Binding ID.
|
||||
BindingID_port = tvb_get_ntohs(parameter_tvb,0);
|
||||
|
||||
if(tvb_captured_length(parameter_tvb)==2){
|
||||
if(tvb_length(parameter_tvb)==2){
|
||||
proto_item_append_text(actx->created_item, " (%%u)",BindingID_port);
|
||||
}
|
||||
|
||||
|
|
|
@ -323,30 +323,30 @@ static void add_hsdsch_bind(packet_info * pinfo);
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(nbap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(nbap_ies_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(nbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(nbap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureID) return 0;
|
||||
return (dissector_try_string(nbap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(nbap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureID) return 0;
|
||||
return (dissector_try_string(nbap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(nbap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureID) return 0;
|
||||
return (dissector_try_string(nbap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(nbap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
static void add_hsdsch_bind(packet_info *pinfo){
|
||||
address null_addr;
|
||||
|
|
|
@ -537,12 +537,12 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
if(actx->external.indirect_ref_present) {
|
||||
proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_StandardExtension_vals, "standard-extension %%d"));
|
||||
if (dissector_try_uint(p1_extension_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
} else {
|
||||
proto_item *item = NULL;
|
||||
proto_tree *next_tree = NULL;
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_captured_length_remaining(tvb, offset),
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset),
|
||||
"Dissector for standard-extension %%d not implemented. Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
|
||||
next_tree = proto_item_add_subtree(item, ett_p1_unknown_standard_extension);
|
||||
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
|
||||
|
@ -576,12 +576,12 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
|
||||
proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_ExtensionAttributeType_vals, "extension-attribute-type %%d"));
|
||||
if (dissector_try_uint(p1_extension_attribute_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset =tvb_captured_length(tvb);
|
||||
offset =tvb_length(tvb);
|
||||
} else {
|
||||
proto_item *item = NULL;
|
||||
proto_tree *next_tree = NULL;
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_captured_length_remaining(tvb, offset),
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset),
|
||||
"Dissector for extension-attribute-type %%d not implemented. Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
|
||||
next_tree = proto_item_add_subtree(item, ett_p1_unknown_extension_attribute_type);
|
||||
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
|
||||
|
@ -669,7 +669,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
|
||||
/* we can do this now constructed octet strings are supported */
|
||||
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &next_tvb);
|
||||
proto_item_set_text(actx->created_item, "content (%%u bytes)", tvb_captured_length (next_tvb));
|
||||
proto_item_set_text(actx->created_item, "content (%%u bytes)", tvb_length (next_tvb));
|
||||
|
||||
if (next_tvb) {
|
||||
if (ctx && ctx->content_type_id) {
|
||||
|
@ -679,7 +679,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
proto_tree *next_tree = NULL;
|
||||
|
||||
proto_tree_add_expert(actx->subtree.top_tree ? actx->subtree.top_tree : tree, actx->pinfo, &ei_p1_unknown_built_in_content_type,
|
||||
next_tvb, 0, tvb_captured_length_remaining(tvb, offset));
|
||||
next_tvb, 0, tvb_length_remaining(tvb, offset));
|
||||
if (item) {
|
||||
next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
|
||||
}
|
||||
|
@ -699,10 +699,10 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
if (ctx && ctx->do_address) {
|
||||
proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(mtaname, 0, tvb_captured_length(mtaname)));
|
||||
proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
|
||||
} else {
|
||||
if (mtaname) {
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_captured_length(mtaname)));
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1054,10 +1054,10 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
|
||||
if(id) {
|
||||
if (ctx && ctx->do_address)
|
||||
proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(id, 0, tvb_captured_length(id)));
|
||||
proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(id, 0, tvb_length(id)));
|
||||
|
||||
if (hf_index == hf_p1_subject_identifier)
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(id, 0, tvb_captured_length(id)));
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(id, 0, tvb_length(id)));
|
||||
}
|
||||
|
||||
#.FN_BODY MTSIdentifier
|
||||
|
@ -1126,7 +1126,7 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
if(arrival && ctx && ctx->do_address)
|
||||
proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(arrival, 0, tvb_captured_length(arrival)));
|
||||
proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(arrival, 0, tvb_length(arrival)));
|
||||
|
||||
#.FN_PARS RoutingAction
|
||||
VAL_PTR = &action
|
||||
|
@ -1174,12 +1174,12 @@ MessageToken B "2.6.1.7.36" "id-hat-forwarded-token"
|
|||
|
||||
proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_TokenDataType_vals, "tokendata-type %%d"));
|
||||
if (dissector_try_uint(p1_tokendata_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
} else {
|
||||
proto_item *item = NULL;
|
||||
proto_tree *next_tree = NULL;
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_captured_length_remaining(tvb, offset),
|
||||
item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset),
|
||||
"Dissector for tokendata-type %%d not implemented. Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
|
||||
next_tree = proto_item_add_subtree(item, ett_p1_unknown_tokendata_type);
|
||||
offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
|
||||
|
|
|
@ -114,7 +114,7 @@ static void do_address(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx)
|
|||
wmem_strbuf_append(ctx->oraddress, addr);
|
||||
}
|
||||
if (tvb_string) {
|
||||
wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
|
||||
wmem_strbuf_append(ctx->oraddress, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ static void do_address_str(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* a
|
|||
do_address(addr, tvb_string, actx);
|
||||
|
||||
if (ctx && ctx->do_address && ddatype && tvb_string)
|
||||
wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
|
||||
wmem_strbuf_append(ddatype, tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
|
||||
}
|
||||
|
||||
static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx_t* actx, proto_tree* tree)
|
||||
|
@ -140,7 +140,7 @@ static void do_address_str_tree(const char* addr, tvbuff_t* tvb_string, asn1_ctx
|
|||
|
||||
if (ctx && ctx->do_address && tvb_string && ddatype) {
|
||||
if (wmem_strbuf_get_len(ddatype) > 0) {
|
||||
proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_captured_length(tvb_string)));
|
||||
proto_item_append_text (tree, " (%s=%s)", wmem_strbuf_get_str(ddatype), tvb_format_text(tvb_string, 0, tvb_length(tvb_string)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* dat
|
|||
break;
|
||||
default:
|
||||
proto_tree_add_text(tree, tvb, offset, -1,"Unsupported P1 PDU");
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_INFO, p1_op_name);
|
||||
|
@ -286,7 +286,7 @@ dissect_p1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* dat
|
|||
}
|
||||
}
|
||||
p1_initialize_content_globals (&asn1_ctx, NULL, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ IpnSecurityResponse B "2.6.1.18.1" "id-sec-security-common-fields"
|
|||
%(DEFAULT_BODY)s
|
||||
|
||||
if(subject)
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", tvb_format_text(subject, 0, tvb_captured_length(subject)));
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", tvb_format_text(subject, 0, tvb_length(subject)));
|
||||
|
||||
#.FN_PARS CharacterSetRegistration
|
||||
VAL_PTR=&crs
|
||||
|
|
|
@ -97,32 +97,32 @@ static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(pcap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(pcap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(pcap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(pcap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(pcap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(pcap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(pcap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(pcap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(pcap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(pcap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(pcap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(pcap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -112,7 +112,7 @@ generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter,
|
|||
|
||||
cur_keylen = 0;
|
||||
|
||||
salt_size = tvb_captured_length(salt_tvb);
|
||||
salt_size = tvb_length(salt_tvb);
|
||||
salt_p = (char *)tvb_memdup(wmem_packet_scope(), salt_tvb, 0, salt_size);
|
||||
|
||||
if (pw == NULL)
|
||||
|
@ -313,7 +313,7 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted
|
|||
}
|
||||
}
|
||||
|
||||
datalen = tvb_captured_length(encrypted_tvb);
|
||||
datalen = tvb_length(encrypted_tvb);
|
||||
clear_data = (char *)g_malloc(datalen);
|
||||
|
||||
err = gcry_cipher_decrypt (cipher, clear_data, datalen, (char *)tvb_memdup(wmem_packet_scope(), encrypted_tvb, 0, datalen), datalen);
|
||||
|
|
|
@ -72,7 +72,7 @@ ASIdentifiers B "1.3.6.1.5.5.7.1.8" "id-pe-autonomousSysIds"
|
|||
return offset;
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_pkix1explicit_addressFamily);
|
||||
proto_tree_add_item(subtree, hf_pkix1explicit_addressFamily_afn, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
|
||||
if(tvb_captured_length(parameter_tvb)>2)
|
||||
if(tvb_length(parameter_tvb)>2)
|
||||
proto_tree_add_item(subtree, hf_pkix1explicit_addressFamily_safi, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
|
||||
/* dissect the packet */
|
||||
dissect_UD_type_PDU(tvb, pinfo, clpres_tree);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/* we can't make any additional checking here */
|
||||
|
@ -351,7 +351,7 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
proto_tree_add_text(parent_tree, tvb, offset,
|
||||
tvb_reported_length_remaining(tvb,offset),"User data");
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
while (tvb_reported_length_remaining(tvb, offset) > 0){
|
||||
|
@ -363,7 +363,7 @@ dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -67,12 +67,12 @@ Invoke/argument TYPE = FT_BYTES DISPLAY = BASE_NONE
|
|||
#.FN_BODY Invoke/argument
|
||||
gint len;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
if (len)
|
||||
proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_NA);
|
||||
arg_next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
#.END
|
||||
|
||||
#.INCLUDE ../ros/ros-inv.cnf
|
||||
|
@ -85,12 +85,12 @@ ReturnResult/result/result TYPE = FT_BYTES DISPLAY = BASE_NONE
|
|||
#.FN_BODY ReturnResult/result/result
|
||||
gint len;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
if (len)
|
||||
proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_NA);
|
||||
res_next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
|
||||
#.END
|
||||
|
||||
|
@ -105,12 +105,12 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_NONE
|
|||
|
||||
gint len;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
if (len)
|
||||
proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_NA);
|
||||
err_next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
#.END
|
||||
|
||||
#.INCLUDE ../ros/ros-err.cnf
|
||||
|
|
|
@ -256,7 +256,7 @@ dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
proto_tree_add_item(ie_tree, hf_q932_ie_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(ie_tree, hf_q932_ie_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
if (tvb_captured_length_remaining(tvb, offset) <= 0)
|
||||
if (tvb_length_remaining(tvb, offset) <= 0)
|
||||
return;
|
||||
switch (ie_type) {
|
||||
case Q932_IE_FACILITY :
|
||||
|
|
|
@ -400,7 +400,7 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
return offset;
|
||||
service = get_service(opcode);
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_captured_length(tvb), ENC_NA);
|
||||
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), ENC_NA);
|
||||
qsig_tree = proto_item_add_subtree(ti, ett_qsig);
|
||||
|
||||
proto_tree_add_uint(qsig_tree, hf_qsig_operation, tvb, 0, 0, opcode);
|
||||
|
@ -419,9 +419,9 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
if (op_ptr->arg_pdu)
|
||||
offset = op_ptr->arg_pdu(tvb, pinfo, qsig_tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(qsig_tree, tvb, offset, -1, "UNSUPPORTED ARGUMENT TYPE (QSIG)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -454,7 +454,7 @@ dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
return offset;
|
||||
service = get_service(opcode);
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_captured_length(tvb), ENC_NA);
|
||||
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), ENC_NA);
|
||||
qsig_tree = proto_item_add_subtree(ti, ett_qsig);
|
||||
|
||||
proto_tree_add_uint(qsig_tree, hf_qsig_operation, tvb, 0, 0, opcode);
|
||||
|
@ -473,9 +473,9 @@ dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
if (op_ptr->res_pdu)
|
||||
offset = op_ptr->res_pdu(tvb, pinfo, qsig_tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(qsig_tree, tvb, offset, -1, "UNSUPPORTED RESULT TYPE (QSIG)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -507,7 +507,7 @@ dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
if (!err_ptr)
|
||||
return offset;
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_captured_length(tvb), ENC_NA);
|
||||
ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), ENC_NA);
|
||||
qsig_tree = proto_item_add_subtree(ti, ett_qsig);
|
||||
|
||||
proto_tree_add_uint(qsig_tree, hf_qsig_error, tvb, 0, 0, errcode);
|
||||
|
@ -522,9 +522,9 @@ dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
if (err_ptr->err_pdu)
|
||||
offset = err_ptr->err_pdu(tvb, pinfo, qsig_tree, NULL);
|
||||
else
|
||||
if (tvb_captured_length_remaining(tvb, offset) > 0) {
|
||||
if (tvb_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_text(qsig_tree, tvb, offset, -1, "UNSUPPORTED ERROR TYPE (QSIG)");
|
||||
offset += tvb_captured_length_remaining(tvb, offset);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
return offset;
|
||||
|
@ -569,7 +569,7 @@ dissect_qsig_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int codeset
|
|||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
proto_tree_add_item(ie_tree, hf_qsig_ie_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
if (tvb_captured_length_remaining(tvb, offset) <= 0)
|
||||
if (tvb_length_remaining(tvb, offset) <= 0)
|
||||
return;
|
||||
switch ((codeset << 8) | ie_type) {
|
||||
case CS4 | QSIG_IE_TRANSIT_COUNTER :
|
||||
|
|
|
@ -148,14 +148,14 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE
|
|||
proto_item *item=NULL;
|
||||
proto_tree *next_tree=NULL;
|
||||
|
||||
item=proto_tree_add_text(tree, next_tvb, 0, tvb_captured_length_remaining(tvb, offset), "QSIG: Dissector for extension with OID:%%s not implemented.", extension_oid);
|
||||
item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "QSIG: Dissector for extension with OID:%%s not implemented.", extension_oid);
|
||||
if(item){
|
||||
next_tree=proto_item_add_subtree(item, ett_qsig_unknown_extension);
|
||||
}
|
||||
dissect_unknown_ber(actx->pinfo, next_tvb, offset, next_tree);
|
||||
}
|
||||
|
||||
offset+=tvb_captured_length_remaining(tvb, offset);
|
||||
offset+=tvb_length_remaining(tvb, offset);
|
||||
#.END
|
||||
|
||||
#.FN_BODY AuthAlgorithm/param
|
||||
|
@ -168,7 +168,7 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
data_tree = proto_item_add_subtree(%(ACTX)s->created_item, ett_cnq_PSS1InformationElement);
|
||||
if (out_tvb && (tvb_captured_length(out_tvb) > 0) && q931_ie_handle)
|
||||
if (out_tvb && (tvb_length(out_tvb) > 0) && q931_ie_handle)
|
||||
call_dissector(q931_ie_handle, out_tvb, %(ACTX)s->pinfo, data_tree);
|
||||
#.END
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -91,35 +91,35 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(rnsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(rnsap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(rnsap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(rnsap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_PrivateIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (call_ber_oid_callback(obj_id, tvb, 0, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (call_ber_oid_callback(obj_id, tvb, 0, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureID) return 0;
|
||||
return (dissector_try_string(rnsap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(rnsap_proc_imsg_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureID) return 0;
|
||||
return (dissector_try_string(rnsap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(rnsap_proc_sout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
if (!ProcedureID) return 0;
|
||||
return (dissector_try_string(rnsap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_string(rnsap_proc_uout_dissector_table, ProcedureID, tvb, pinfo, tree, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -210,7 +210,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p
|
|||
|
||||
if(!ros_try_string(oid, next_tvb, pinfo, tree, session) &&
|
||||
!dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree, session)){
|
||||
proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_captured_length_remaining(tvb, offset), "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
|
||||
proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
|
||||
proto_tree *next_tree=proto_item_add_subtree(item, ett_ros_unknown);
|
||||
|
||||
expert_add_info_format(pinfo, item, &ei_ros_dissector_oid_not_implemented,
|
||||
|
@ -222,7 +222,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p
|
|||
* into new_dissector_t we have to do this kludge with
|
||||
* manually step past the content in the ANY type.
|
||||
*/
|
||||
offset+=tvb_captured_length_remaining(tvb, offset);
|
||||
offset+=tvb_length_remaining(tvb, offset);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da
|
|||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -527,7 +527,7 @@ fp_info *fpinf ;
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
bits_remaining = 8*tvb_captured_length(tvb) - offset;
|
||||
bits_remaining = 8*tvb_length(tvb) - offset;
|
||||
whole_octets_remaining = bits_remaining / 8;
|
||||
|
||||
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
|
||||
|
@ -542,7 +542,7 @@ fp_info *fpinf ;
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
bits_remaining = 8*tvb_captured_length(tvb) - offset;
|
||||
bits_remaining = 8*tvb_length(tvb) - offset;
|
||||
whole_octets_remaining = bits_remaining / 8;
|
||||
|
||||
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
|
||||
|
@ -582,7 +582,7 @@ fp_info *fpinf ;
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
if (parameter_tvb){
|
||||
de_ms_cm_3(parameter_tvb, tree, actx->pinfo, 0, tvb_captured_length(parameter_tvb), NULL, 0);
|
||||
de_ms_cm_3(parameter_tvb, tree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
|
||||
}
|
||||
|
||||
#.FN_BODY GSM-MS-RadioAccessCapability VAL_PTR = ¶meter_tvb
|
||||
|
@ -590,7 +590,7 @@ fp_info *fpinf ;
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
if (parameter_tvb){
|
||||
de_gmm_ms_radio_acc_cap(parameter_tvb, tree, actx->pinfo, 0, tvb_captured_length(parameter_tvb), NULL, 0);
|
||||
de_gmm_ms_radio_acc_cap(parameter_tvb, tree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
|
||||
}
|
||||
|
||||
#.FN_BODY InterRATHandoverInfoWithInterRATCapabilities-r3-IEs/interRATHandoverInfo VAL_PTR = ¶meter_tvb
|
||||
|
@ -680,7 +680,7 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE
|
|||
proto_tree *subtree;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
length = tvb_captured_length(nas_sys_info_gsm_map_tvb);
|
||||
length = tvb_length(nas_sys_info_gsm_map_tvb);
|
||||
if (length) {
|
||||
if (actx->private_data) {
|
||||
switch (GPOINTER_TO_UINT(actx->private_data)-1) {
|
||||
|
|
|
@ -147,7 +147,7 @@ call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *
|
|||
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree, data)){
|
||||
proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_captured_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
|
||||
proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
|
||||
proto_tree *next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
|
||||
|
||||
expert_add_info_format(pinfo, item, &ei_rtse_dissector_oid_not_implemented,
|
||||
|
@ -159,7 +159,7 @@ call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *
|
|||
* into new_dissector_t we have to do this kludge with
|
||||
* manually step past the content in the ANY type.
|
||||
*/
|
||||
offset+=tvb_captured_length_remaining(tvb, offset);
|
||||
offset+=tvb_length_remaining(tvb, offset);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hf_rtse_segment_data, &data_tvb);
|
||||
|
||||
if (data_tvb) {
|
||||
fragment_length = tvb_captured_length_remaining (data_tvb, 0);
|
||||
fragment_length = tvb_length_remaining (data_tvb, 0);
|
||||
proto_item_append_text(asn1_ctx.created_item, " (%u byte%s)", fragment_length,
|
||||
plurality(fragment_length, "", "s"));
|
||||
frag_msg = fragment_add_seq_next (&rtse_reassembly_table,
|
||||
|
@ -260,7 +260,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
pinfo->fragmented = TRUE;
|
||||
data_handled = TRUE;
|
||||
} else {
|
||||
fragment_length = tvb_captured_length_remaining (tvb, offset);
|
||||
fragment_length = tvb_length_remaining (tvb, offset);
|
||||
}
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]",
|
||||
|
@ -274,7 +274,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
/* Return other than 0 to indicate that we handled this packet */
|
||||
return 1;
|
||||
} else {
|
||||
offset = tvb_captured_length (tvb);
|
||||
offset = tvb_length (tvb);
|
||||
}
|
||||
pinfo->fragmented = FALSE;
|
||||
data_handled = TRUE;
|
||||
|
@ -296,7 +296,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
|
|||
}
|
||||
|
||||
top_tree = NULL;
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void rtse_reassemble_init (void)
|
||||
|
|
|
@ -115,7 +115,7 @@ RTSE-apdus
|
|||
tvbuff_t *string = NULL;
|
||||
%(DEFAULT_BODY)s
|
||||
if(open_request && string)
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_captured_length(string)));
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
|
||||
|
||||
#.FN_PARS CommonReference
|
||||
VAL_PTR=&string
|
||||
|
@ -123,7 +123,7 @@ RTSE-apdus
|
|||
tvbuff_t *string = NULL;
|
||||
%(DEFAULT_BODY)s
|
||||
if(open_request && string)
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_captured_length(string)));
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
|
||||
|
||||
#.END
|
||||
|
||||
|
@ -131,7 +131,7 @@ RTSE-apdus
|
|||
tvbuff_t *string = NULL;
|
||||
%(DEFAULT_BODY)s
|
||||
if(open_request && string)
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_captured_length(string)));
|
||||
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
|
||||
|
||||
#.FN_BODY RTTPapdu VAL_PTR=&priority
|
||||
int priority = -1;
|
||||
|
|
|
@ -87,27 +87,27 @@ void proto_reg_handoff_rua(void);
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(rua_ies_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(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? 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(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -94,7 +94,7 @@ ProtocolIE-Single-Container
|
|||
#.FN_BODY RANAP-Message VAL_PTR = &ranap_message_tvb
|
||||
tvbuff_t *ranap_message_tvb=NULL;
|
||||
%(DEFAULT_BODY)s
|
||||
if ((tvb_captured_length(ranap_message_tvb)>0)&&(ranap_handle)) { /* RUA has a RANAP-PDU */
|
||||
if ((tvb_length(ranap_message_tvb)>0)&&(ranap_handle)) { /* RUA has a RANAP-PDU */
|
||||
col_set_str(actx->pinfo->cinfo, COL_INFO,
|
||||
"(RUA) "); /* Set info to (RUA) to make room for RANAP */
|
||||
col_set_fence(actx->pinfo->cinfo, COL_INFO);
|
||||
|
|
|
@ -131,38 +131,38 @@ static int dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU(tvbuff_t *tvb,
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
/* Currently not used
|
||||
static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
*/
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(s1ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(s1ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
3, 3, FALSE, ¶meter_tvb);
|
||||
if(tvb_captured_length(tvb)==0)
|
||||
if(tvb_length(tvb)==0)
|
||||
return offset;
|
||||
|
||||
if (!parameter_tvb)
|
||||
|
@ -213,7 +213,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
|
||||
length = tvb_captured_length(parameter_tvb);
|
||||
length = tvb_length(parameter_tvb);
|
||||
|
||||
is_ascii = TRUE;
|
||||
for (p_offset=0; p_offset < length; p_offset++){
|
||||
|
@ -234,7 +234,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
if ((tvb_captured_length(parameter_tvb)>0)&&(nas_eps_handle))
|
||||
if ((tvb_length(parameter_tvb)>0)&&(nas_eps_handle))
|
||||
call_dissector(nas_eps_handle,parameter_tvb,%(ACTX)s->pinfo, tree);
|
||||
|
||||
#.FN_BODY LPPa-PDU VAL_PTR = ¶meter_tvb
|
||||
|
@ -243,7 +243,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
if ((tvb_captured_length(parameter_tvb)>0)&&(lppa_handle))
|
||||
if ((tvb_length(parameter_tvb)>0)&&(lppa_handle))
|
||||
call_dissector(lppa_handle, parameter_tvb, %(ACTX)s->pinfo, tree);
|
||||
|
||||
#.FN_BODY TransportLayerAddress VAL_PTR = ¶meter_tvb
|
||||
|
@ -259,7 +259,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
# a) 32 bits in case of IPv4 address according to [6]; and
|
||||
# b) 128 bits in case of IPv6 address according to [5].
|
||||
/* 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_s1ap_TransportLayerAddress);
|
||||
if (tvb_len==4){
|
||||
/* IPv4 */
|
||||
|
@ -338,7 +338,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
Source BSS to Target BSS
|
||||
Transparent Container 48.018
|
||||
*/
|
||||
de_bssgp_source_BSS_to_target_BSS_transp_cont(parameter_tvb, subtree, actx->pinfo, 0, tvb_captured_length(parameter_tvb), NULL, 0);
|
||||
de_bssgp_source_BSS_to_target_BSS_transp_cont(parameter_tvb, subtree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
|
||||
break;
|
||||
case 3:
|
||||
/* utrantolte */
|
||||
|
@ -392,7 +392,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
|
|||
Target BSS to Source BSS
|
||||
Transparent Container 48.018
|
||||
*/
|
||||
de_bssgp_target_BSS_to_source_BSS_transp_cont(parameter_tvb, subtree, actx->pinfo, 0, tvb_captured_length(parameter_tvb), NULL, 0);
|
||||
de_bssgp_target_BSS_to_source_BSS_transp_cont(parameter_tvb, subtree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
|
@ -496,7 +496,7 @@ if (g_s1ap_dissect_container) {
|
|||
return offset;
|
||||
|
||||
subtree = proto_item_add_subtree(actx->created_item, ett_s1ap_RIMInformation);
|
||||
if ((tvb_captured_length(parameter_tvb)>0)&&(bssgp_handle)){
|
||||
if ((tvb_length(parameter_tvb)>0)&&(bssgp_handle)){
|
||||
col_set_fence(%(ACTX)s->pinfo->cinfo, COL_INFO);
|
||||
call_dissector(bssgp_handle,parameter_tvb,%(ACTX)s->pinfo, subtree);
|
||||
}
|
||||
|
|
|
@ -95,27 +95,27 @@ static void dissect_sabp_cb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sabp_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sabp_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sabp_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sabp_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sabp_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sabp_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sabp_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sabp_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sabp_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sabp_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,7 +152,7 @@ dissect_sabp_cb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
cb_inf_msg_len = tvb_get_guint8(tvb,offset+82);
|
||||
page_tvb = tvb_new_subset_length(tvb, offset, cb_inf_msg_len);
|
||||
unpacked_tvb = dissect_cbs_data(sms_encoding, page_tvb, subtree, pinfo, 0);
|
||||
len = tvb_captured_length(unpacked_tvb);
|
||||
len = tvb_length(unpacked_tvb);
|
||||
if (unpacked_tvb != NULL){
|
||||
if (tree != NULL){
|
||||
proto_tree *cbs_page_subtree = proto_item_add_subtree(cbs_page_item, ett_sabp_cbs_page_content);
|
||||
|
@ -209,7 +209,7 @@ dissect_sabp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
sabp_tree = proto_item_add_subtree(sabp_item, ett_sabp);
|
||||
|
||||
dissect_SABP_PDU_PDU(tvb, pinfo, sabp_tree, NULL);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/* Note a little bit of a hack assumes length max takes two bytes and that the length starts at byte 4 */
|
||||
|
@ -218,7 +218,7 @@ dissect_sabp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
|
|||
{
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, gbl_sabp_desegment, 5,
|
||||
get_sabp_pdu_len, dissect_sabp, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*--- proto_register_sabp -------------------------------------------*/
|
||||
|
|
|
@ -92,38 +92,38 @@ static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, p
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
/* Currently not used
|
||||
static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
*/
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(sbc_ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(sbc_ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ ProtocolIE-Field/value ie_field_value
|
|||
|
||||
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
|
||||
3, 3, FALSE, ¶meter_tvb);
|
||||
if(tvb_captured_length(tvb)==0)
|
||||
if(tvb_length(tvb)==0)
|
||||
return offset;
|
||||
|
||||
if (!parameter_tvb)
|
||||
|
|
|
@ -357,7 +357,7 @@ dissect_snmp_variable_string(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
|
|||
|
||||
proto_tree_add_item(tree, hf_snmp_var_bind_str, tvb, 0, -1, ENC_ASCII|ENC_NA);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1512,8 +1512,8 @@ get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb)
|
|||
|
||||
if (! ( user_tvb && engine_tvb ) ) return NULL;
|
||||
|
||||
given_username_len = tvb_captured_length(user_tvb);
|
||||
given_engine_len = tvb_captured_length(engine_tvb);
|
||||
given_username_len = tvb_length(user_tvb);
|
||||
given_engine_len = tvb_length(engine_tvb);
|
||||
if (! ( given_engine_len && given_username_len ) ) return NULL;
|
||||
given_username = (guint8*)tvb_memdup(wmem_packet_scope(),user_tvb,0,-1);
|
||||
given_engine = (guint8*)tvb_memdup(wmem_packet_scope(),engine_tvb,0,-1);
|
||||
|
@ -1563,14 +1563,14 @@ snmp_usm_auth_md5(snmp_usm_params_t* p, guint8** calc_auth_p, guint* calc_auth_l
|
|||
}
|
||||
|
||||
|
||||
auth_len = tvb_captured_length_remaining(p->auth_tvb,0);
|
||||
auth_len = tvb_length_remaining(p->auth_tvb,0);
|
||||
|
||||
if (auth_len != 12) {
|
||||
*error = "Authenticator length wrong";
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
msg_len = tvb_captured_length_remaining(p->msg_tvb,0);
|
||||
msg_len = tvb_length_remaining(p->msg_tvb,0);
|
||||
if (msg_len <= 0) {
|
||||
*error = "Not enough data remaining";
|
||||
return FALSE;
|
||||
|
@ -1627,7 +1627,7 @@ snmp_usm_auth_sha1(snmp_usm_params_t* p _U_, guint8** calc_auth_p, guint* calc_a
|
|||
}
|
||||
|
||||
|
||||
auth_len = tvb_captured_length_remaining(p->auth_tvb,0);
|
||||
auth_len = tvb_length_remaining(p->auth_tvb,0);
|
||||
|
||||
|
||||
if (auth_len != 12) {
|
||||
|
@ -1635,7 +1635,7 @@ snmp_usm_auth_sha1(snmp_usm_params_t* p _U_, guint8** calc_auth_p, guint* calc_a
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
msg_len = tvb_captured_length_remaining(p->msg_tvb,0);
|
||||
msg_len = tvb_length_remaining(p->msg_tvb,0);
|
||||
if (msg_len <= 0) {
|
||||
*error = "Not enough data remaining";
|
||||
return FALSE;
|
||||
|
@ -1681,7 +1681,7 @@ snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encryptedData _U_, gchar c
|
|||
guint i;
|
||||
|
||||
|
||||
salt_len = tvb_captured_length_remaining(p->priv_tvb,0);
|
||||
salt_len = tvb_length_remaining(p->priv_tvb,0);
|
||||
|
||||
if (salt_len != 8) {
|
||||
*error = "decryptionError: msgPrivacyParameters length != 8";
|
||||
|
@ -1697,7 +1697,7 @@ snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encryptedData _U_, gchar c
|
|||
iv[i] = pre_iv[i] ^ salt[i];
|
||||
}
|
||||
|
||||
cryptgrm_len = tvb_captured_length_remaining(encryptedData,0);
|
||||
cryptgrm_len = tvb_length_remaining(encryptedData,0);
|
||||
|
||||
if ((cryptgrm_len <= 0) || (cryptgrm_len % 8)) {
|
||||
*error = "decryptionError: the length of the encrypted data is not a mutiple of 8 octets";
|
||||
|
@ -1754,7 +1754,7 @@ snmp_usm_priv_aes_common(snmp_usm_params_t* p, tvbuff_t* encryptedData, gchar co
|
|||
guint8* cryptgrm;
|
||||
tvbuff_t* clear_tvb;
|
||||
|
||||
priv_len = tvb_captured_length_remaining(p->priv_tvb,0);
|
||||
priv_len = tvb_length_remaining(p->priv_tvb,0);
|
||||
|
||||
if (priv_len != 8) {
|
||||
*error = "decryptionError: msgPrivacyParameters length != 8";
|
||||
|
@ -1771,7 +1771,7 @@ snmp_usm_priv_aes_common(snmp_usm_params_t* p, tvbuff_t* encryptedData, gchar co
|
|||
iv[7] = (p->time & 0x000000ff);
|
||||
tvb_memcpy(p->priv_tvb,&(iv[8]),0,8);
|
||||
|
||||
cryptgrm_len = tvb_captured_length_remaining(encryptedData,0);
|
||||
cryptgrm_len = tvb_length_remaining(encryptedData,0);
|
||||
if (cryptgrm_len <= 0) {
|
||||
*error = "Not enough data remaining";
|
||||
return NULL;
|
||||
|
@ -1925,7 +1925,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
* have that routine deal with ASN.1, and just use
|
||||
* "tcp_dissect_pdus()"?)
|
||||
*/
|
||||
length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
|
||||
length_remaining = tvb_ensure_length_remaining(tvb, offset);
|
||||
|
||||
/* NOTE: we have to parse the message piece by piece, since the
|
||||
* capture length may be less than the message length: a 'global'
|
||||
|
|
|
@ -90,7 +90,7 @@ gint pdu_type=-1;
|
|||
&usm_p.engine_tvb);
|
||||
if (usm_p.engine_tvb) {
|
||||
proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid);
|
||||
dissect_snmp_engineid(engine_tree, usm_p.engine_tvb, 0, tvb_captured_length_remaining(usm_p.engine_tvb,0));
|
||||
dissect_snmp_engineid(engine_tree, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0));
|
||||
}
|
||||
|
||||
#.FN_BODY SnmpEngineID
|
||||
|
@ -100,7 +100,7 @@ gint pdu_type=-1;
|
|||
¶m_tvb);
|
||||
if (param_tvb) {
|
||||
proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid);
|
||||
dissect_snmp_engineid(engine_tree, param_tvb, 0, tvb_captured_length_remaining(param_tvb,0));
|
||||
dissect_snmp_engineid(engine_tree, param_tvb, 0, tvb_length_remaining(param_tvb,0));
|
||||
}
|
||||
|
||||
#.FN_PARS UsmSecurityParameters/msgUserName
|
||||
|
|
|
@ -464,7 +464,7 @@ decrypt_arcfour(packet_info *pinfo,
|
|||
int conf_flag;
|
||||
int padlen = 0;
|
||||
|
||||
datalen = tvb_captured_length(pinfo->gssapi_encrypted_tvb);
|
||||
datalen = tvb_length(pinfo->gssapi_encrypted_tvb);
|
||||
|
||||
if(tvb_get_ntohs(pinfo->gssapi_wrap_tvb, 4)==0x1000){
|
||||
conf_flag=1;
|
||||
|
@ -577,7 +577,7 @@ decrypt_gssapi_krb_arcfour_wrap(proto_tree *tree, packet_info *pinfo, tvbuff_t *
|
|||
guint8 *cryptocopy=NULL; /* workaround for pre-0.6.1 heimdal bug */
|
||||
guint8 *output_message_buffer;
|
||||
|
||||
length=tvb_captured_length(pinfo->gssapi_encrypted_tvb);
|
||||
length=tvb_length(pinfo->gssapi_encrypted_tvb);
|
||||
original_data=tvb_get_ptr(pinfo->gssapi_encrypted_tvb, 0, length);
|
||||
|
||||
/* dont do anything if we are not attempting to decrypt data */
|
||||
|
@ -692,14 +692,14 @@ decrypt_gssapi_krb_cfx_wrap(proto_tree *tree _U_,
|
|||
return;
|
||||
}
|
||||
|
||||
datalen = tvb_captured_length(checksum_tvb) + tvb_captured_length(encrypted_tvb);
|
||||
datalen = tvb_length(checksum_tvb) + tvb_length(encrypted_tvb);
|
||||
|
||||
rotated = (guint8 *)wmem_alloc(pinfo->pool, datalen);
|
||||
|
||||
tvb_memcpy(checksum_tvb, rotated,
|
||||
0, tvb_captured_length(checksum_tvb));
|
||||
tvb_memcpy(encrypted_tvb, rotated + tvb_captured_length(checksum_tvb),
|
||||
0, tvb_captured_length(encrypted_tvb));
|
||||
0, tvb_length(checksum_tvb));
|
||||
tvb_memcpy(encrypted_tvb, rotated + tvb_length(checksum_tvb),
|
||||
0, tvb_length(encrypted_tvb));
|
||||
|
||||
if (is_dce) {
|
||||
rrc += ec;
|
||||
|
@ -717,13 +717,13 @@ decrypt_gssapi_krb_cfx_wrap(proto_tree *tree _U_,
|
|||
if (output) {
|
||||
guint8 *outdata;
|
||||
|
||||
outdata = (guint8 *)g_memdup(output, tvb_captured_length(encrypted_tvb));
|
||||
outdata = (guint8 *)g_memdup(output, tvb_length(encrypted_tvb));
|
||||
g_free(output);
|
||||
|
||||
pinfo->gssapi_decrypted_tvb=tvb_new_child_real_data(encrypted_tvb,
|
||||
outdata,
|
||||
tvb_captured_length(encrypted_tvb),
|
||||
tvb_captured_length(encrypted_tvb));
|
||||
tvb_length(encrypted_tvb),
|
||||
tvb_length(encrypted_tvb));
|
||||
add_new_data_source(pinfo, pinfo->gssapi_decrypted_tvb, "Decrypted GSS-Krb5");
|
||||
tvb_set_free_cb(pinfo->gssapi_decrypted_tvb, g_free);
|
||||
return;
|
||||
|
@ -822,7 +822,7 @@ dissect_spnego_krb5_wrap_base(tvbuff_t *tvb, int offset, packet_info *pinfo
|
|||
if(!pinfo->gssapi_encrypted_tvb){
|
||||
int len;
|
||||
len=tvb_reported_length_remaining(tvb,offset);
|
||||
if(len>tvb_captured_length_remaining(tvb, offset)){
|
||||
if(len>tvb_length_remaining(tvb, offset)){
|
||||
/* no point in trying to decrypt,
|
||||
we dont have the full pdu.
|
||||
*/
|
||||
|
@ -916,7 +916,7 @@ dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U
|
|||
* so we need to test here if there are more bytes in our tvb or not.
|
||||
* -- ronnie
|
||||
*/
|
||||
if (tvb_captured_length_remaining(tvb, offset)) {
|
||||
if (tvb_length_remaining(tvb, offset)) {
|
||||
if (sgn_alg == KRB_SGN_ALG_HMAC) {
|
||||
proto_tree_add_item(tree, hf_spnego_krb5_confounder, tvb, offset, 8,
|
||||
ENC_NA);
|
||||
|
@ -1067,7 +1067,7 @@ dissect_spnego_krb5_cfx_wrap_base(tvbuff_t *tvb, int offset, packet_info *pinfo
|
|||
if(!pinfo->gssapi_encrypted_tvb){
|
||||
int len;
|
||||
len=tvb_reported_length_remaining(tvb,offset);
|
||||
if(len>tvb_captured_length_remaining(tvb, offset)){
|
||||
if(len>tvb_length_remaining(tvb, offset)){
|
||||
/* no point in trying to decrypt,
|
||||
we dont have the full pdu.
|
||||
*/
|
||||
|
@ -1155,7 +1155,7 @@ dissect_spnego_krb5_cfx_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinf
|
|||
|
||||
/* Checksum of plaintext padded data */
|
||||
|
||||
checksum_size = tvb_captured_length_remaining(tvb, offset);
|
||||
checksum_size = tvb_length_remaining(tvb, offset);
|
||||
|
||||
proto_tree_add_item(tree, hf_spnego_krb5_sgn_cksum, tvb, offset,
|
||||
checksum_size, ENC_NA);
|
||||
|
|
|
@ -91,11 +91,11 @@ NegotiationToken
|
|||
len = call_dissector(next_level_value_lcl->wrap_handle, token_tvb, actx->pinfo,
|
||||
subtree);
|
||||
if (len == 0)
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
else
|
||||
offset = offset + len;
|
||||
} else
|
||||
offset = tvb_captured_length(tvb);
|
||||
offset = tvb_length(tvb);
|
||||
|
||||
#.FN_BODY MechTypeList
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ dissect_PhsMeas1(gboolean implicit_tag, packet_info *pinfo, proto_tree *tree, tv
|
|||
offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
|
||||
offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, NULL);
|
||||
} else {
|
||||
len=tvb_captured_length_remaining(tvb, offset);
|
||||
len=tvb_length_remaining(tvb, offset);
|
||||
}
|
||||
|
||||
if (tree) {
|
||||
|
|
|
@ -28,7 +28,7 @@ SampledValues
|
|||
nstime_t ts;
|
||||
gchar * ptime;
|
||||
|
||||
len = tvb_captured_length_remaining(tvb, offset);
|
||||
len = tvb_length_remaining(tvb, offset);
|
||||
|
||||
if(len != 8)
|
||||
{
|
||||
|
|
|
@ -131,13 +131,13 @@ dissect_t124_new(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.124");
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
item = proto_tree_add_item(parent_tree, proto_t124, tvb, 0, tvb_captured_length(tvb), ENC_NA);
|
||||
item = proto_tree_add_item(parent_tree, proto_t124, tvb, 0, tvb_length(tvb), ENC_NA);
|
||||
tree = proto_item_add_subtree(item, ett_t124);
|
||||
|
||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
|
||||
dissect_t124_ConnectData(tvb, 0, &asn1_ctx, tree, hf_t124_ConnectData);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -133,7 +133,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult
|
|||
/* Not sure why - but lets ignore the length. */
|
||||
/* We assume the OCTET STRING is all of the remaining bytes */
|
||||
|
||||
if(tvb_captured_length(next_tvb) == 42) {
|
||||
if(tvb_length(next_tvb) == 42) {
|
||||
/* this is perhaps a naive ... */
|
||||
next_tvb = tvb_new_subset_remaining(tvb, (old_offset>>3)+1);
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult
|
|||
|
||||
if(next_tvb) {
|
||||
|
||||
ns = tvb_get_string_enc(NULL, t124NSIdentifier, 0, tvb_captured_length(t124NSIdentifier), ENC_ASCII|ENC_NA);
|
||||
ns = tvb_get_string_enc(NULL, t124NSIdentifier, 0, tvb_length(t124NSIdentifier), ENC_ASCII|ENC_NA);
|
||||
if(ns != NULL) {
|
||||
dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree, NULL);
|
||||
g_free(ns);
|
||||
|
|
|
@ -72,7 +72,7 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "T.125");
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_captured_length(tvb), ENC_NA);
|
||||
item = proto_tree_add_item(parent_tree, proto_t125, tvb, 0, tvb_length(tvb), ENC_NA);
|
||||
tree = proto_item_add_subtree(item, ett_t125);
|
||||
|
||||
get_ber_identifier(tvb, 0, &ber_class, &pc, &tag);
|
||||
|
@ -84,7 +84,7 @@ dissect_t125(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *d
|
|||
dissect_DomainMCSPDU_PDU(tvb, pinfo, tree);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -540,7 +540,7 @@ dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset = dissect_UDPTLPacket_PDU(tvb, pinfo, tr, NULL);
|
||||
|
||||
if (tvb_captured_length_remaining(tvb,offset)>0){
|
||||
if (tvb_length_remaining(tvb,offset)>0){
|
||||
if (tr){
|
||||
proto_tree_add_text(tr, tvb, offset, tvb_reported_length_remaining(tvb, offset),
|
||||
"[MALFORMED PACKET or wrong preference settings]");
|
||||
|
@ -579,13 +579,13 @@ dissect_t38_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
col_append_str(pinfo->cinfo, COL_INFO, "TCP: IFPPacket");
|
||||
|
||||
while(tvb_captured_length_remaining(tvb,offset)>0)
|
||||
while(tvb_length_remaining(tvb,offset)>0)
|
||||
{
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
offset += dissect_IFPPacket_PDU(next_tvb, pinfo, tr, NULL);
|
||||
ifp_packet_number++;
|
||||
|
||||
if(tvb_captured_length_remaining(tvb,offset)>0){
|
||||
if(tvb_length_remaining(tvb,offset)>0){
|
||||
if(t38_tpkt_usage == T38_TPKT_ALWAYS){
|
||||
if(tr){
|
||||
proto_tree_add_text(tr, tvb, offset, tvb_reported_length_remaining(tvb, offset),
|
||||
|
|
|
@ -154,7 +154,7 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
guint32 value_len;
|
||||
|
||||
%(DEFAULT_BODY)s
|
||||
value_len = tvb_captured_length(value_tvb);
|
||||
value_len = tvb_length(value_tvb);
|
||||
|
||||
#.FN_FTR Data-Field/_item/field-data
|
||||
if (primary_part){
|
||||
|
|
|
@ -136,7 +136,7 @@ offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_t
|
|||
¶meter_tvb);
|
||||
|
||||
if (parameter_tvb){
|
||||
len = tvb_captured_length_remaining(parameter_tvb, 0);
|
||||
len = tvb_length_remaining(parameter_tvb, 0);
|
||||
switch(len) {
|
||||
case 1:
|
||||
gp_tcapsrt_info->src_tid=tvb_get_guint8(parameter_tvb, 0);
|
||||
|
@ -177,7 +177,7 @@ offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_t
|
|||
¶meter_tvb);
|
||||
|
||||
if (parameter_tvb){
|
||||
len = tvb_captured_length_remaining(parameter_tvb, 0);
|
||||
len = tvb_length_remaining(parameter_tvb, 0);
|
||||
switch(len) {
|
||||
case 1:
|
||||
gp_tcapsrt_info->dst_tid=tvb_get_guint8(parameter_tvb, 0);
|
||||
|
|
|
@ -227,7 +227,7 @@ void tetra_dissect_pdu(int channel_type, int dir, tvbuff_t *pdu, proto_tree *tre
|
|||
guint8 p;
|
||||
|
||||
tetra_sub_item = proto_tree_add_item(tree, hf_tetra_pdu,
|
||||
pdu, 0, tvb_captured_length(pdu), ENC_NA);
|
||||
pdu, 0, tvb_length(pdu), ENC_NA);
|
||||
|
||||
tetra_sub_tree = proto_item_add_subtree(tetra_sub_item, ett_tetra);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ dissect_ulp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
{
|
||||
tcp_dissect_pdus(tvb, pinfo, tree, ulp_desegment, ULP_HEADER_SIZE,
|
||||
get_ulp_pdu_len, dissect_ULP_PDU_PDU, data);
|
||||
return tvb_captured_length(tvb);
|
||||
return tvb_length(tvb);
|
||||
}
|
||||
|
||||
void proto_reg_handoff_ulp(void);
|
||||
|
|
|
@ -89,27 +89,27 @@ void proto_reg_handoff_x2ap(void);
|
|||
|
||||
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(x2ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(x2ap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(x2ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(x2ap_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(x2ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(x2ap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(x2ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(x2ap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||
{
|
||||
return (dissector_try_uint(x2ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0;
|
||||
return (dissector_try_uint(x2ap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_length(tvb) : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -78,7 +78,7 @@ ProtocolIE-ContainerPairList
|
|||
|
||||
%(DEFAULT_BODY)s
|
||||
|
||||
if(tvb_captured_length(tvb)==0)
|
||||
if(tvb_length(tvb)==0)
|
||||
return offset;
|
||||
|
||||
if (!parameter_tvb)
|
||||
|
@ -115,7 +115,7 @@ ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(x2ap_Prot
|
|||
if (!parameter_tvb)
|
||||
return offset;
|
||||
/* 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_x2ap_TransportLayerAddress);
|
||||
if (tvb_len==4){
|
||||
/* IPv4 */
|
||||
|
|
|
@ -242,7 +242,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
|
|||
|
||||
if(out_tvb) {
|
||||
/* it was a string - format it */
|
||||
value = tvb_format_text(out_tvb, 0, tvb_captured_length(out_tvb));
|
||||
value = tvb_format_text(out_tvb, 0, tvb_length(out_tvb));
|
||||
|
||||
if(last_rdn) {
|
||||
g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
|
||||
|
|
|
@ -385,7 +385,7 @@ XDayOf/fifth fifth_dayof
|
|||
offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
|
||||
offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
|
||||
} else {
|
||||
gint32 remaining=tvb_captured_length_remaining(tvb, offset);
|
||||
gint32 remaining=tvb_length_remaining(tvb, offset);
|
||||
len=remaining>0 ? remaining : 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue