aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipars.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-ipars.c
parent3557ac4ec688b86ec7819005a3a181600e056251 (diff)
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-ipars.c')
-rw-r--r--epan/dissectors/packet-ipars.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-ipars.c b/epan/dissectors/packet-ipars.c
index e421ce0a17..4de1f45ad6 100644
--- a/epan/dissectors/packet-ipars.c
+++ b/epan/dissectors/packet-ipars.c
@@ -63,21 +63,21 @@ dissect_ipars(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IPARS");
- if (tvb_captured_length_remaining(tvb, 0) >= 2 ) {
+ if (tvb_length_remaining(tvb, 0) >= 2 ) {
ia = tvb_get_guint8(tvb, 0) & 0x3f;
ta = tvb_get_guint8(tvb, 1) & 0x3f;
if (ia == S1 && ta == S2) { /* if the first two bytes are S1/S2 skip over them */
offset = 2;
}
}
- if (tvb_captured_length_remaining(tvb, offset) >= 1) ia = tvb_get_guint8(tvb, offset + 0);
- if (tvb_captured_length_remaining(tvb, offset) >= 2) ta = tvb_get_guint8(tvb, offset + 1);
+ if (tvb_length_remaining(tvb, offset) >= 1) ia = tvb_get_guint8(tvb, offset + 0);
+ if (tvb_length_remaining(tvb, offset) >= 2) ta = tvb_get_guint8(tvb, offset + 1);
if (ia == 0x83 || ia == 0x43 || ia == GA) { /* if it's an FPGA or 'corresponsdance code' 'go ahead'... */
- if (tvb_captured_length_remaining(tvb, offset) > 2) { /* if the msg is long, it must have been a 'poll' */
+ if (tvb_length_remaining(tvb, offset) > 2) { /* if the msg is long, it must have been a 'poll' */
col_add_fstr(pinfo->cinfo, COL_INFO, "Poll IA: %2.2X", ta);
} else { /* if it's short, then it was a 'no traffic' response */
- if (tvb_captured_length_remaining(tvb, offset) >= 2 ) {
+ if (tvb_length_remaining(tvb, offset) >= 2 ) {
col_add_fstr(pinfo->cinfo, COL_INFO, "GoAhead NextIA (0x%2.2X)", ta);
} else {
col_set_str(pinfo->cinfo, COL_INFO, "GoAhead NextIA");
@@ -89,8 +89,8 @@ dissect_ipars(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
if (ta == 0x20) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Reset IA: %2.2X", ia); /* the TA character was the 'reset' command */
}
- if (tvb_captured_length_remaining(tvb, offset) >= 3) cmd = tvb_get_guint8(tvb, offset + 2) & 0x3f; /* get the first two bytes of the data message */
- if (tvb_captured_length_remaining(tvb, offset) >= 4) la = tvb_get_guint8(tvb, offset + 3) & 0x3f;
+ if (tvb_length_remaining(tvb, offset) >= 3) cmd = tvb_get_guint8(tvb, offset + 2) & 0x3f; /* get the first two bytes of the data message */
+ if (tvb_length_remaining(tvb, offset) >= 4) la = tvb_get_guint8(tvb, offset + 3) & 0x3f;
if (cmd == 0x1f && la == 0x38) {
col_add_fstr(pinfo->cinfo, COL_INFO, "Please Resend - IA: %2.2X TA: %2.2X", ia, ta); /* light the resend indicator */
} else if (cmd == 0x2a && la == 0x05) {
@@ -101,7 +101,7 @@ dissect_ipars(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
}
if (tree) {
- bytes = tvb_captured_length_remaining(tvb, 0);
+ bytes = tvb_length_remaining(tvb, 0);
if (bytes > 0) {
proto_tree *ipars_tree;
proto_item *ti;