aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAndersBroman <a.broman@bredband.net>2014-05-04 21:20:54 +0200
committerAnders Broman <a.broman58@gmail.com>2014-05-04 19:23:05 +0000
commit1d1730fc5625ae9c945a43e5909ebb18193ffb42 (patch)
tree3090c3aeab281f3ce8f8623735527ed319e57dd5 /epan
parente7a51d75ee5c986f66f3b2b01c98692a092c8017 (diff)
Update some soft-deprecated APIs.
Change-Id: I0e255e72dd4cd9a94a4f92af409c4b34c0a266ed Reviewed-on: https://code.wireshark.org/review/1491 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-3g-a11.c2
-rw-r--r--epan/dissectors/packet-openflow.c2
-rw-r--r--epan/dissectors/packet-openflow_v1.c2
-rw-r--r--epan/dissectors/packet-openflow_v4.c2
-rw-r--r--epan/dissectors/packet-openflow_v5.c2
-rw-r--r--epan/dissectors/packet-ppcap.c8
-rw-r--r--epan/dissectors/packet-sip.c8
7 files changed, 13 insertions, 13 deletions
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index 29558db577..bf3ea6c4df 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -2084,7 +2084,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
if (tvb_reported_length_remaining(tvb, offset) > 0)
dissect_a11_extensions(tvb, pinfo, offset, a11_tree);
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
} /* dissect_a11 */
/* Register the protocol with Wireshark */
diff --git a/epan/dissectors/packet-openflow.c b/epan/dissectors/packet-openflow.c
index c7294f46c3..d98b6b85fa 100644
--- a/epan/dissectors/packet-openflow.c
+++ b/epan/dissectors/packet-openflow.c
@@ -100,7 +100,7 @@ dissect_openflow_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
proto_tree_add_text(tree, tvb, offset, -1, "Unsuported version not dissected");
break;
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
#define OFP_HEADER_LEN 8
diff --git a/epan/dissectors/packet-openflow_v1.c b/epan/dissectors/packet-openflow_v1.c
index b41de1a46f..5836af9169 100644
--- a/epan/dissectors/packet-openflow_v1.c
+++ b/epan/dissectors/packet-openflow_v1.c
@@ -781,7 +781,7 @@ dissect_openflow_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
break;
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c
index 387b2adb0a..da70562c42 100644
--- a/epan/dissectors/packet-openflow_v4.c
+++ b/epan/dissectors/packet-openflow_v4.c
@@ -4688,7 +4688,7 @@ dissect_openflow_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
break;
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
/*
diff --git a/epan/dissectors/packet-openflow_v5.c b/epan/dissectors/packet-openflow_v5.c
index 413b977e15..609f0bbd9e 100644
--- a/epan/dissectors/packet-openflow_v5.c
+++ b/epan/dissectors/packet-openflow_v5.c
@@ -5994,7 +5994,7 @@ dissect_openflow_v5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
dissect_openflow_message_v5(tvb, pinfo, openflow_tree, 0);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c
index f1a852896f..ac9ef289bb 100644
--- a/epan/dissectors/packet-ppcap.c
+++ b/epan/dissectors/packet-ppcap.c
@@ -162,7 +162,7 @@ dissect_ppcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_ppcap, tvb, 0, -1, ENC_NA);
ppcap_tree = proto_item_add_subtree(ti, ett_ppcap);
- while (tvb_length_remaining(tvb, offset) > 0)
+ while (tvb_reported_length_remaining(tvb, offset) > 0)
{
msg_type = tvb_get_ntohs(tvb, offset);
ti1 = proto_tree_add_text(ppcap_tree, tvb, offset, 2, "%s",
@@ -223,7 +223,7 @@ dissect_ppcap_payload_type(tvbuff_t *tvb, proto_tree * ppcap_tree1, int offset,
msg_len = tvb_get_ntohs(tvb, offset);
proto_tree_add_item( ppcap_tree1, hf_ppcap_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
- string = tvb_get_string(wmem_packet_scope(), tvb, offset, msg_len);
+ string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, msg_len, ENC_UTF_8|ENC_NA);
if (strcmp(string,"mtp3") == 0) {
*payload_type = PPCAP_MTP3;
}else if (strcmp(string,"tcap") == 0) {
@@ -240,7 +240,7 @@ dissect_ppcap_payload_type(tvbuff_t *tvb, proto_tree * ppcap_tree1, int offset,
*payload_type = PPCAP_SCCP;
}
- proto_tree_add_item(ppcap_tree1, hf_ppcap_payload_type, tvb, offset, msg_len, ENC_BIG_ENDIAN|ENC_ASCII);
+ proto_tree_add_item(ppcap_tree1, hf_ppcap_payload_type, tvb, offset, msg_len, ENC_UTF_8|ENC_NA);
if (msg_len%4)
msg_len = msg_len+(4-(msg_len%4));
@@ -420,7 +420,7 @@ dissect_ppcap_destination_address(tvbuff_t *tvb, packet_info * pinfo, proto_tree
else if (key2 == 4)
{
char *string;
- string = tvb_get_string(wmem_packet_scope(), tvb, offset, msg_len);
+ string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, msg_len, ENC_UTF_8|ENC_NA);
proto_tree_add_string(ppcap_tree1, hf_ppcap_destination_nodeid, tvb, offset, msg_len, string);
TVB_SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, tvb, offset, msg_len);
COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst);
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index f2cb2c9e7a..2f4135ebb3 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -2247,7 +2247,7 @@ dissect_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
octet = tvb_get_guint8(tvb,0);
if ((octet & 0xf8) == 0xf8){
call_dissector(sigcomp_handle, tvb, pinfo, tree);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
len = dissect_sip_common(tvb, 0, pinfo, tree, FALSE, FALSE);
@@ -2485,13 +2485,13 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
/* XXX: Is adding to 'reqresp_tree as intended ? Changed from original 'sip_tree' */
proto_tree_add_text(reqresp_tree, tvb, offset, -1, "Continuation data");
}
- return tvb_length_remaining(tvb, offset);
+ return tvb_reported_length_remaining(tvb, offset);
}
offset = next_offset;
if (sip_tree) {
th = proto_tree_add_item(sip_tree, hf_sip_msg_hdr, tvb, offset,
- tvb_length_remaining(tvb, offset), ENC_UTF_8|ENC_NA);
+ tvb_reported_length_remaining(tvb, offset), ENC_UTF_8|ENC_NA);
proto_item_set_text(th, "Message Header");
hdr_tree = proto_item_add_subtree(th, ett_sip_hdr);
}
@@ -3370,7 +3370,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
offset = next_offset;
}/* End while */
- datalen = tvb_length_remaining(tvb, offset);
+ datalen = tvb_captured_length_remaining(tvb, offset);
reported_datalen = tvb_reported_length_remaining(tvb, offset);
if (content_length != -1) {
if (datalen > content_length)