aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-erldp.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-erldp.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-erldp.c')
-rw-r--r--epan/dissectors/packet-erldp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-erldp.c b/epan/dissectors/packet-erldp.c
index ce7f3f2fd3..a2f445981c 100644
--- a/epan/dissectors/packet-erldp.c
+++ b/epan/dissectors/packet-erldp.c
@@ -407,7 +407,7 @@ static gint dissect_etf_type(const gchar *label, packet_info *pinfo, tvbuff_t *t
static gboolean is_handshake(tvbuff_t *tvb, int offset) {
guint32 len = tvb_get_ntohs(tvb, offset);
guint8 tag = tvb_get_guint8(tvb, offset + 2);
- return ((len > 0) && strchr("nras", tag) && (len == (guint32)tvb_captured_length_remaining(tvb, offset + 2)));
+ return ((len > 0) && strchr("nras", tag) && (len == (guint32)tvb_length_remaining(tvb, offset + 2)));
}
/*--- dissect_erldp_handshake -------------------------------------------------*/
@@ -442,7 +442,7 @@ static void dissect_erldp_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_tree_add_item(tree, hf_erldp_challenge, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
- str_len = tvb_captured_length_remaining(tvb, offset);
+ str_len = tvb_length_remaining(tvb, offset);
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, str_len, ENC_ASCII);
proto_tree_add_item(tree, hf_erldp_name, tvb, offset, str_len, ENC_ASCII|ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", (is_challenge) ? "SEND_CHALLENGE" : "SEND_NAME", str);
@@ -463,7 +463,7 @@ static void dissect_erldp_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tre
break;
case 's' :
- str_len = tvb_captured_length_remaining(tvb, offset);
+ str_len = tvb_length_remaining(tvb, offset);
str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, str_len, ENC_ASCII);
proto_tree_add_item(tree, hf_erldp_status, tvb, offset, str_len, ENC_ASCII|ENC_NA);
col_add_fstr(pinfo->cinfo, COL_INFO, "SEND_STATUS %s", str);
@@ -487,7 +487,7 @@ static int dissect_erldp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
if (is_handshake(tvb, 0)) {
dissect_erldp_handshake(tvb, pinfo, erldp_tree);
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
offset = 0;
@@ -516,7 +516,7 @@ static int dissect_erldp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(ctl_op, VALS(erldp_ctlmsg_vals), "unknown ControlMessage operation (%d)"));
}
offset = dissect_etf_type("ControlMessage", pinfo, tvb, offset, erldp_tree);
- if (tvb_captured_length_remaining(tvb, offset) > 0)
+ if (tvb_length_remaining(tvb, offset) > 0)
dissect_etf_type("Message", pinfo, tvb, offset, erldp_tree);
break;
@@ -526,7 +526,7 @@ static int dissect_erldp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
col_set_str(pinfo->cinfo, COL_INFO, "unknown header format");
}
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/*--- get_erldp_pdu_len -------------------------------------------------*/
@@ -545,7 +545,7 @@ dissect_erldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) {
4, /* fixed-length part of the PDU */
get_erldp_pdu_len, /* routine to get the length of the PDU */
dissect_erldp_pdu, data); /* routine to dissect a PDU */
- return tvb_captured_length(tvb);
+ return tvb_length(tvb);
}
/*--- proto_register_erldp ----------------------------------------------*/