summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rohc.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-06-19 17:18:16 +0000
committerMichael Mann <mmann78@netscape.net>2014-06-19 18:25:59 +0000
commit14824e6adf07a1c3cfb6537ce8723d873ecd0d0f (patch)
treebdf1b52ecffe7825d719f34fb4be63c8a60bd1b4 /epan/dissectors/packet-rohc.c
parent3557ac4ec688b86ec7819005a3a181600e056251 (diff)
downloadwireshark-14824e6adf07a1c3cfb6537ce8723d873ecd0d0f.tar.gz
Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-rohc.c')
-rw-r--r--epan/dissectors/packet-rohc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c
index 737306e10b..7579a535b6 100644
--- a/epan/dissectors/packet-rohc.c
+++ b/epan/dissectors/packet-rohc.c
@@ -496,8 +496,8 @@ dissect_rohc_ext_format(tvbuff_t *tvb, proto_tree *tree, int offset, guint8 t, r
offset++;
} else {
proto_tree_add_text(tree, tvb, offset, -1, "extension 3[Not dissected yet]");
- if (tvb_captured_length_remaining(tvb, offset) > 0)
- offset += tvb_captured_length_remaining(tvb, offset);
+ if (tvb_length_remaining(tvb, offset) > 0)
+ offset += tvb_length_remaining(tvb, offset);
}
return offset;
}
@@ -1904,17 +1904,17 @@ dissect_rohc_ir_packet(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
switch(profile){
case ROHC_PROFILE_UNCOMPRESSED:
- if (tvb_captured_length_remaining(tvb, offset) > 0) {
+ if (tvb_length_remaining(tvb, offset) > 0) {
oct = tvb_get_guint8(tvb, offset);
if ( (oct&0xf0) == 0x60 ) {
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(ipv6_handle, next_tvb, pinfo, tree);
- offset += tvb_captured_length_remaining(tvb, offset);
+ offset += tvb_length_remaining(tvb, offset);
}
else if ( (oct&0xf0) == 0x40 ) {
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(ip_handle, next_tvb, pinfo, tree);
- offset += tvb_captured_length_remaining(tvb, offset);
+ offset += tvb_length_remaining(tvb, offset);
}
col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "ROHC <");
col_append_str(pinfo->cinfo, COL_PROTOCOL, ">");
@@ -2071,7 +2071,7 @@ dissect_rohc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
memset(&g_rohc_info, 0, sizeof(rohc_info));
}
- length = tvb_captured_length(tvb);
+ length = tvb_length(tvb);
/* If this is ROHC ethertype clear col */
if ( pinfo->src.type == AT_ETHER ){
@@ -2159,7 +2159,7 @@ start_over:
p_rohc_info->last_created_item = proto_tree_add_item(rohc_tree, hf_rohc_feedback, tvb, offset, 1, ENC_BIG_ENDIAN);
col_append_str(pinfo->cinfo, COL_INFO, "Error packet");
proto_tree_add_text(rohc_tree, tvb, offset, -1, "Error packet");
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}else{
col_append_str(pinfo->cinfo, COL_INFO, "Feedback ");
/* 4) If the first remaining octet starts with 11110, and an Add-CID
@@ -2212,7 +2212,7 @@ start_over:
goto start_over;
proto_item_set_len(p_rohc_info->last_created_item, offset-feedback_start);
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
}/*feedback */
/* 5) If the first remaining octet starts with 1111111, this is a segment:
@@ -2225,7 +2225,7 @@ start_over:
PROTO_ITEM_SET_GENERATED(item);
}
proto_tree_add_text(rohc_tree, tvb, offset, -1, "Segment [Desegmentation not implemented yet]");
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/* 6) Here, it is known that the rest is forward information (unless the
* header is damaged).
@@ -2235,24 +2235,24 @@ start_over:
offset = dissect_rohc_ir_packet(tvb, rohc_tree, pinfo, offset, cid, is_add_cid, p_rohc_info);
if(offset == -1){
/* Could not parse header */
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/*proto_tree_add_text(rohc_tree, tvb, offset, -1, "Data");*/
payload_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector_only(data_handle, payload_tvb, pinfo, rohc_tree, NULL);
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
if((oct&0xff) == 0xf8){
col_append_str(pinfo->cinfo, COL_INFO, "IR-DYN packet");
offset = dissect_rohc_ir_dyn_packet(tvb, rohc_tree, pinfo, offset, cid, is_add_cid, p_rohc_info);
if(offset == -1){
/* Could not parse header */
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/*proto_tree_add_text(rohc_tree, tvb, offset, -1, "Data");*/
payload_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector_only(data_handle, payload_tvb, pinfo, rohc_tree, NULL);
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
if (!pinfo->fd->flags.visited){
@@ -2287,7 +2287,7 @@ start_over:
guint8 *payload_data;
gint len;
get_self_describing_var_len_val(tvb, rohc_tree, offset+1, hf_rohc_large_cid, &val_len);
- len = tvb_captured_length_remaining(tvb, offset);
+ len = tvb_length_remaining(tvb, offset);
if (len >= val_len) {
len -= val_len;
payload_data = (guint8 *)wmem_alloc(pinfo->pool, len);
@@ -2311,7 +2311,7 @@ start_over:
}
col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "ROHC <");
col_append_str(pinfo->cinfo, COL_PROTOCOL, ">");
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
else if (((oct&0x80)==0x00) && (rohc_cid_context->profile==ROHC_PROFILE_RTP)) {
/* 5.7.1. Packet type 0: UO-0, R-0, R-0-CRC */
@@ -2345,7 +2345,7 @@ start_over:
payload_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector_only(data_handle, payload_tvb, pinfo, tree, NULL);
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/* Set up rohc_cid_hash which holds data for a CID