aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-openvpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-openvpn.c')
-rw-r--r--epan/dissectors/packet-openvpn.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-openvpn.c b/epan/dissectors/packet-openvpn.c
index c8268ef1c2..83f975ab82 100644
--- a/epan/dissectors/packet-openvpn.c
+++ b/epan/dissectors/packet-openvpn.c
@@ -247,7 +247,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
proto_tree_add_item(openvpn_tree, hf_openvpn_hmac, tvb, offset, tls_auth_hmac_size, ENC_NA);
offset += tls_auth_hmac_size;
- if (tvb_length_remaining(tvb, offset) >= 8) {
+ if (tvb_captured_length_remaining(tvb, offset) >= 8) {
proto_tree_add_item(openvpn_tree, hf_openvpn_pid, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -258,7 +258,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
}
}
- if (tvb_length_remaining(tvb, offset) >= 1) {
+ if (tvb_captured_length_remaining(tvb, offset) >= 1) {
/* read P_ACK packet-id array length */
gint pid_arraylength = tvb_get_guint8(tvb, offset);
gint i;
@@ -274,7 +274,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
offset += 4;
}
- if (tvb_length_remaining(tvb, offset) >= 8) {
+ if (tvb_captured_length_remaining(tvb, offset) >= 8) {
proto_tree_add_item(openvpn_tree, hf_openvpn_rsessionid, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
}
@@ -284,7 +284,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
/* if we have a P_CONTROL packet */
if (openvpn_opcode != P_ACK_V1) {
/* read Message Packet-ID */
- if (tvb_length_remaining(tvb, offset) >= 4) {
+ if (tvb_captured_length_remaining(tvb, offset) >= 4) {
msg_mpid = tvb_get_bits32(tvb, offset*8, 32, ENC_BIG_ENDIAN);
proto_tree_add_item(openvpn_tree, hf_openvpn_mpid, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
@@ -293,20 +293,20 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
}
/* if we have more data left, determine what to do */
- msg_length_remaining = tvb_length_remaining(tvb, offset);
+ msg_length_remaining = tvb_captured_length_remaining(tvb, offset);
if (msg_length_remaining == 0) {
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
if (openvpn_opcode != P_CONTROL_V1) {
proto_tree *data_tree;
ti2 = proto_tree_add_text(openvpn_tree, tvb, offset, -1, "Data (%d bytes)",
- tvb_length_remaining(tvb, offset));
+ tvb_captured_length_remaining(tvb, offset));
data_tree = proto_item_add_subtree(ti2, ett_openvpn_data);
proto_tree_add_item(data_tree, hf_openvpn_data, tvb, offset, -1, ENC_NA);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/* Try to reassemble */
@@ -341,7 +341,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
if ((frag_msg == NULL) || (frag_msg->next != NULL)) {
proto_tree *data_tree;
ti2 = proto_tree_add_text(openvpn_tree, tvb, offset, -1, "Message fragment (%d bytes)",
- tvb_length_remaining(tvb, offset));
+ tvb_captured_length_remaining(tvb, offset));
data_tree = proto_item_add_subtree(ti2, ett_openvpn_data);
proto_tree_add_item(data_tree, hf_openvpn_fragment_bytes, tvb, offset, -1, ENC_NA);
@@ -376,7 +376,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp
call_dissector(ssl_handle, new_tvb, pinfo, parent_tree);
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static guint
@@ -409,7 +409,7 @@ dissect_openvpn_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
since the length is the first thing in an openvpn packet we choose 2 */
get_msg_length, /* fptr for function to get the packetlength of current frame */
dissect_openvpn_msg_tcp, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static int