diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-23 11:24:48 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 18:25:52 +0000 |
commit | 8bc294c0d12e742d8c539177a683eff16653b31b (patch) | |
tree | 3a309f71e73889bbe39d1df18417c250fa6a686b /epan/dissectors | |
parent | d7b286c7941bb0adf0566844637ffcc245bf1db1 (diff) |
Replace more deprecated tvb_length calls
The return values of new-style dissectors always use the captured length, so
replace those automagically with sed.
Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a
Reviewed-on: https://code.wireshark.org/review/9065
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors')
57 files changed, 126 insertions, 126 deletions
diff --git a/epan/dissectors/packet-gnutella.c b/epan/dissectors/packet-gnutella.c index 35334d30f0..7a67f4b33b 100644 --- a/epan/dissectors/packet-gnutella.c +++ b/epan/dissectors/packet-gnutella.c @@ -507,7 +507,7 @@ static int dissect_gnutella_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -554,13 +554,13 @@ static int dissect_gnutella(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, -1, ENC_NA); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } } tcp_dissect_pdus(tvb, pinfo, tree, TRUE, GNUTELLA_HEADER_SIZE_OFFSET+4, get_gnutella_pdu_len, dissect_gnutella_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void proto_register_gnutella(void) { diff --git a/epan/dissectors/packet-gopher.c b/epan/dissectors/packet-gopher.c index bad581df2c..e1d4fbf60f 100644 --- a/epan/dissectors/packet-gopher.c +++ b/epan/dissectors/packet-gopher.c @@ -197,7 +197,7 @@ dissect_gopher(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ } /* Return the amount of data this dissector was able to dissect */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Preference callbacks */ diff --git a/epan/dissectors/packet-hazelcast.c b/epan/dissectors/packet-hazelcast.c index e54cd143b0..c5c08f22e4 100644 --- a/epan/dissectors/packet-hazelcast.c +++ b/epan/dissectors/packet-hazelcast.c @@ -424,7 +424,7 @@ static int dissect_hazelcast_message(tvbuff_t *tvb, packet_info *pinfo _U_, prot /*offset += valueLength;*/ } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* @@ -436,7 +436,7 @@ static int dissect_hazelcast_message(tvbuff_t *tvb, packet_info *pinfo _U_, prot static int dissect_hazelcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, hazelcast_desegment, 13, get_hazelcast_message_len, dissect_hazelcast_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void proto_register_hazelcast(void) { diff --git a/epan/dissectors/packet-hdfs.c b/epan/dissectors/packet-hdfs.c index e5b330473f..5c39387874 100644 --- a/epan/dissectors/packet-hdfs.c +++ b/epan/dissectors/packet-hdfs.c @@ -650,7 +650,7 @@ dissect_hdfs_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* } } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* determine PDU length of protocol */ @@ -680,7 +680,7 @@ dissect_hdfs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) } tcp_dissect_pdus(tvb, pinfo, tree, need_reassemble, frame_header_len, get_hdfs_message_len, dissect_hdfs_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* registers the protcol with the given names */ diff --git a/epan/dissectors/packet-hdfsdata.c b/epan/dissectors/packet-hdfsdata.c index e1a3e9f142..1c6762f71e 100644 --- a/epan/dissectors/packet-hdfsdata.c +++ b/epan/dissectors/packet-hdfsdata.c @@ -486,7 +486,7 @@ dissect_hdfsdata_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -523,7 +523,7 @@ dissect_hdfsdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data } tcp_dissect_pdus(tvb, pinfo, tree, need_reassemble, frame_header_len, get_hdfsdata_message_len, dissect_hdfsdata_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* registers the protcol with the given names */ diff --git a/epan/dissectors/packet-hsrp.c b/epan/dissectors/packet-hsrp.c index 8a47974ebc..bb36e4ac80 100644 --- a/epan/dissectors/packet-hsrp.c +++ b/epan/dissectors/packet-hsrp.c @@ -587,7 +587,7 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void proto_register_hsrp(void) diff --git a/epan/dissectors/packet-http-urlencoded.c b/epan/dissectors/packet-http-urlencoded.c index f8e2c659da..5485787b04 100644 --- a/epan/dissectors/packet-http-urlencoded.c +++ b/epan/dissectors/packet-http-urlencoded.c @@ -176,7 +176,7 @@ dissect_form_urlencoded(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi proto_item_set_len(ti, offset - start_offset); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-icep.c b/epan/dissectors/packet-icep.c index 34fe838b85..0706594c73 100644 --- a/epan/dissectors/packet-icep.c +++ b/epan/dissectors/packet-icep.c @@ -1018,7 +1018,7 @@ static int dissect_icep_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, expert_add_info_format(pinfo, msg_item, &ei_icep_message_type, "Unknown Message Type: 0x%02x", tvb_get_guint8(tvb, 8)); break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* entry point */ diff --git a/epan/dissectors/packet-iec104.c b/epan/dissectors/packet-iec104.c index 4a15d94692..abdbe98b61 100644 --- a/epan/dissectors/packet-iec104.c +++ b/epan/dissectors/packet-iec104.c @@ -1411,7 +1411,7 @@ static int dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre if (len < APDU_MIN_LEN) { expert_add_info_format(pinfo, ti, &ei_iec104_apdu_min_len, "APDU less than %d bytes", APDU_MIN_LEN); wmem_strbuf_append_printf(res, "<ERR ApduLen=%u bytes> ", len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } temp8 = tvb_get_guint8(tvb, Off + 2); @@ -1472,7 +1472,7 @@ static int dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre proto_tree_add_item(it104tree, hf_apcidata, tvb, 0, Off, ENC_NA); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int dissect_iec104reas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) @@ -1482,7 +1482,7 @@ static int dissect_iec104reas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre */ tcp_dissect_pdus(tvb, pinfo, tree, TRUE, APCI_LEN, get_iec104apdu_len, dissect_iec104apci, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* The protocol has two subprotocols: Register APCI */ diff --git a/epan/dissectors/packet-ifcp.c b/epan/dissectors/packet-ifcp.c index 3e1b074456..f1e42db957 100644 --- a/epan/dissectors/packet-ifcp.c +++ b/epan/dissectors/packet-ifcp.c @@ -447,7 +447,7 @@ dissect_ifcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi call_dissector(data_handle, next_tvb, pinfo, parent_tree); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint @@ -467,7 +467,7 @@ static int dissect_ifcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) { tcp_dissect_pdus(tvb, pinfo, parent_tree, ifcp_desegment, iFCP_MIN_HEADER_LEN, get_ifcp_pdu_len, dissect_ifcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-infiniband_sdp.c b/epan/dissectors/packet-infiniband_sdp.c index bd46bc3a0f..6c15b81e05 100644 --- a/epan/dissectors/packet-infiniband_sdp.c +++ b/epan/dissectors/packet-infiniband_sdp.c @@ -313,7 +313,7 @@ manual_override: col_append_fstr(pinfo->cinfo, COL_INFO, "(SDP %s)", rval_to_str(mid, mid_meanings, "Unknown")); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-ipdc.c b/epan/dissectors/packet-ipdc.c index 5a8a66b2ea..765f7a2fe0 100644 --- a/epan/dissectors/packet-ipdc.c +++ b/epan/dissectors/packet-ipdc.c @@ -933,7 +933,7 @@ dissect_ipdc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d } col_set_fence(pinfo->cinfo, COL_INFO); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -947,7 +947,7 @@ dissect_ipdc_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data { tcp_dissect_pdus(tvb, pinfo, tree, ipdc_desegment, 4, get_ipdc_pdu_len, dissect_ipdc_tcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-ipsec-tcp.c b/epan/dissectors/packet-ipsec-tcp.c index 579891f904..d89243e88d 100644 --- a/epan/dissectors/packet-ipsec-tcp.c +++ b/epan/dissectors/packet-ipsec-tcp.c @@ -160,7 +160,7 @@ dissect_tcpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data call_dissector(esp_handle, next_tvb, pinfo, tree); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static gboolean diff --git a/epan/dissectors/packet-isis-hello.c b/epan/dissectors/packet-isis-hello.c index e07f773264..f698c229af 100644 --- a/epan/dissectors/packet-isis-hello.c +++ b/epan/dissectors/packet-isis-hello.c @@ -1255,7 +1255,7 @@ dissect_isis_l1_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* isis_data_t* isis = (isis_data_t*)data; dissect_isis_hello(tvb, pinfo, tree, 0, clv_l1_hello_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -1264,7 +1264,7 @@ dissect_isis_l2_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* isis_data_t* isis = (isis_data_t*)data; dissect_isis_hello(tvb, pinfo, tree, 0, clv_l2_hello_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -1273,7 +1273,7 @@ dissect_isis_ptp_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void isis_data_t* isis = (isis_data_t*)data; dissect_isis_hello(tvb, pinfo, tree, 0, clv_ptp_hello_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* diff --git a/epan/dissectors/packet-isis-snp.c b/epan/dissectors/packet-isis-snp.c index 6267725122..85dedb1346 100644 --- a/epan/dissectors/packet-isis-snp.c +++ b/epan/dissectors/packet-isis-snp.c @@ -369,7 +369,7 @@ dissect_isis_l1_csnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* isis_data_t* isis = (isis_data_t*)data; dissect_isis_csnp(tvb, pinfo, tree, 0, clv_l1_csnp_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -378,7 +378,7 @@ dissect_isis_l2_csnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* isis_data_t* isis = (isis_data_t*)data; dissect_isis_csnp(tvb, pinfo, tree, 0, clv_l2_csnp_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void @@ -422,7 +422,7 @@ dissect_isis_l1_psnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* isis_data_t* isis = (isis_data_t*)data; dissect_isis_psnp(tvb, pinfo, tree, 0, clv_l1_psnp_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -431,7 +431,7 @@ dissect_isis_l2_psnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* isis_data_t* isis = (isis_data_t*)data; dissect_isis_psnp(tvb, pinfo, tree, 0, clv_l2_psnp_opts, isis->header_length, isis->system_id_len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-isns.c b/epan/dissectors/packet-isns.c index 5a0b9b7dc5..d7e469f399 100644 --- a/epan/dissectors/packet-isns.c +++ b/epan/dissectors/packet-isns.c @@ -645,7 +645,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data /* Fall Thru if there are attributes */ if (tvb_reported_length_remaining(tvb, offset) == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); /* Messages */ case ISNS_FUNC_DEVATTRREG: @@ -668,7 +668,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data /* we can only look at the attributes for the first PDU */ if(!(flags&ISNS_FLAGS_FIRST_PDU)){ proto_tree_add_expert(tt, pinfo, &ei_isns_not_first_pdu, tvb, offset, -1); - return tvb_length(tvb); + return tvb_captured_length(tvb); } packet_len = tvb_reported_length(tvb); @@ -678,7 +678,7 @@ dissect_isns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint diff --git a/epan/dissectors/packet-kdsp.c b/epan/dissectors/packet-kdsp.c index 5c256b6d27..115a0f7034 100644 --- a/epan/dissectors/packet-kdsp.c +++ b/epan/dissectors/packet-kdsp.c @@ -538,7 +538,7 @@ dissect_kdsp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* expert_add_info(pinfo, command_item, &ei_kdsp_cmdnum); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -546,7 +546,7 @@ dissect_kdsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, FRAME_HEADER_LEN, get_kdsp_message_len, dissect_kdsp_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-knet.c b/epan/dissectors/packet-knet.c index e343b6f623..677f0873c5 100644 --- a/epan/dissectors/packet-knet.c +++ b/epan/dissectors/packet-knet.c @@ -562,7 +562,7 @@ static int dissect_knet_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { dissect_knet(tvb, pinfo, tree, KNET_TCP_PACKET); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -572,7 +572,7 @@ dissect_knet_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data col_set_str(pinfo->cinfo, COL_PROTOCOL, "KNET"); tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 2, get_knet_pdu_len, dissect_knet_tcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /** diff --git a/epan/dissectors/packet-kpasswd.c b/epan/dissectors/packet-kpasswd.c index 0ca4a9908d..151a3d7585 100644 --- a/epan/dissectors/packet-kpasswd.c +++ b/epan/dissectors/packet-kpasswd.c @@ -252,7 +252,7 @@ dissect_kpasswd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi */ col_set_str(pinfo->cinfo, COL_INFO, "Continuation"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -262,7 +262,7 @@ dissect_kpasswd_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d col_clear(pinfo->cinfo, COL_INFO); tcp_dissect_pdus(tvb, pinfo, tree, kpasswd_desegment, 4, get_krb_pdu_len, dissect_kpasswd_tcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-l1-events.c b/epan/dissectors/packet-l1-events.c index 7424bd11bb..586573673a 100644 --- a/epan/dissectors/packet-l1-events.c +++ b/epan/dissectors/packet-l1-events.c @@ -91,7 +91,7 @@ dissect_l1_events(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-laplink.c b/epan/dissectors/packet-laplink.c index 54adbdeb43..d30fca4ba6 100644 --- a/epan/dissectors/packet-laplink.c +++ b/epan/dissectors/packet-laplink.c @@ -102,7 +102,7 @@ dissect_laplink_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d proto_tree_add_item(laplink_tree, hf_laplink_udp_name, tvb, offset, -1, ENC_ASCII|ENC_NA); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Code to actually dissect the packets - TCP aspects*/ @@ -141,7 +141,7 @@ dissect_laplink_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi } - return tvb_length(tvb); + return tvb_captured_length(tvb); /* If this protocol has a sub-dissector call it here, see section 1.8 */ } @@ -162,7 +162,7 @@ dissect_laplink_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d tcp_dissect_pdus(tvb, pinfo, tree, laplink_desegment, 6, get_laplink_pdu_len, dissect_laplink_tcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-ldp.c b/epan/dissectors/packet-ldp.c index e2fb81fbd5..6355b1da80 100644 --- a/epan/dissectors/packet-ldp.c +++ b/epan/dissectors/packet-ldp.c @@ -2885,7 +2885,7 @@ dissect_ldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) /* * XXX - return minimum of this and the length of the PDU? */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void @@ -3221,7 +3221,7 @@ dissect_ldp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data */ offset += plen + 4; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Register all the bits needed with the filtering engine */ diff --git a/epan/dissectors/packet-ldss.c b/epan/dissectors/packet-ldss.c index 7e5b4f06ec..3188d4fb51 100644 --- a/epan/dissectors/packet-ldss.c +++ b/epan/dissectors/packet-ldss.c @@ -434,7 +434,7 @@ dissect_ldss_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) highest_num_seen = pinfo->fd->num; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Transfers happen in response to broadcasts, they are always TCP and are @@ -777,7 +777,7 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void prepare_ldss_transfer_conv(transfer_info->broadcast); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static gboolean diff --git a/epan/dissectors/packet-llrp.c b/epan/dissectors/packet-llrp.c index 86c8a53da3..fe34ed748b 100644 --- a/epan/dissectors/packet-llrp.c +++ b/epan/dissectors/packet-llrp.c @@ -2697,7 +2697,7 @@ dissect_llrp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d if (try_val_to_str_ext(type, &message_types_ext)) dissect_llrp_message(tvb, pinfo, llrp_tree, type, offset); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Determine length of LLRP message */ @@ -2714,7 +2714,7 @@ dissect_llrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, LLRP_HEADER_LENGTH, get_llrp_message_len, dissect_llrp_packet, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-lltd.c b/epan/dissectors/packet-lltd.c index 040cb40286..be26950cd8 100644 --- a/epan/dissectors/packet-lltd.c +++ b/epan/dissectors/packet-lltd.c @@ -811,7 +811,7 @@ dissect_lltd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index bfee823059..522605d07e 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -758,7 +758,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) } else { expert_add_info_format(pinfo, msg_item, &ei_lmp_invalid_msg_type, "Invalid message type: %u", message_type); - return tvb_length(tvb); + return tvb_captured_length(tvb); } if (lmp_checksum_config) { @@ -806,7 +806,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) } else { expert_add_info_format(pinfo, hidden_item, &ei_lmp_invalid_class, "Invalid class: %u", lmp_class); - return tvb_length(tvb); + return tvb_captured_length(tvb); } lmp_object_tree = proto_item_add_subtree(ti, lmp_class_to_subtree(lmp_class)); @@ -1878,7 +1878,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) } /* while */ } /* tree */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void lmp_prefs_applied (void) diff --git a/epan/dissectors/packet-lsc.c b/epan/dissectors/packet-lsc.c index db9a7dd020..979af7f82b 100644 --- a/epan/dissectors/packet-lsc.c +++ b/epan/dissectors/packet-lsc.c @@ -269,7 +269,7 @@ dissect_lsc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Decode LSC over UDP */ @@ -333,7 +333,7 @@ dissect_lsc_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, LSC_OPCODE_LEN, get_lsc_pdu_len, dissect_lsc_common, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Register the protocol with Wireshark */ diff --git a/epan/dissectors/packet-ltp.c b/epan/dissectors/packet-ltp.c index 9e62ec1ab9..71a54d31db 100644 --- a/epan/dissectors/packet-ltp.c +++ b/epan/dissectors/packet-ltp.c @@ -763,7 +763,7 @@ dissect_ltp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) } } /* Return the amount of data this dissector was able to dissect */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void diff --git a/epan/dissectors/packet-macsec.c b/epan/dissectors/packet-macsec.c index 41addbdfbe..a2986826b5 100644 --- a/epan/dissectors/packet-macsec.c +++ b/epan/dissectors/packet-macsec.c @@ -137,7 +137,7 @@ static int dissect_macsec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v icv_length, ENC_NA); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c index 187fa080e9..6bd436e5e2 100644 --- a/epan/dissectors/packet-mbtcp.c +++ b/epan/dissectors/packet-mbtcp.c @@ -533,7 +533,7 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0); p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, p_save_proto_data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Code to dissect Modbus RTU over TCP packets */ @@ -675,7 +675,7 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0); p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, p_save_proto_data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -704,7 +704,7 @@ get_mbrtu_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, { /* Modbus/TCP frames include a "length" word in each message; Modbus RTU over TCP does not, so don't attempt to get one */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -731,7 +731,7 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) tcp_dissect_pdus(tvb, pinfo, tree, mbtcp_desegment, 6, get_mbtcp_pdu_len, dissect_mbtcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Code to dissect Modbus RTU over TCP messages */ @@ -752,7 +752,7 @@ dissect_mbrtu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) tcp_dissect_pdus(tvb, pinfo, tree, mbrtu_desegment, 6, get_mbrtu_pdu_len, dissect_mbrtu_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -1399,7 +1399,7 @@ dissect_modbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-memcache.c b/epan/dissectors/packet-memcache.c index b969d3c47d..7d30d14d53 100644 --- a/epan/dissectors/packet-memcache.c +++ b/epan/dissectors/packet-memcache.c @@ -606,7 +606,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat val_to_str_const (status, status_vals, "Unknown"), status); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Obtain the content length by peeping into the header. @@ -1916,7 +1916,7 @@ dissect_memcache_tcp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissect_memcache_text (tvb, pinfo, tree); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Dissect udp packets based on the type of protocol (text/binary) */ @@ -1934,7 +1934,7 @@ dissect_memcache_udp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissect_memcache_message (tvb, 0, pinfo, tree); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Registration functions; register memcache protocol, diff --git a/epan/dissectors/packet-mojito.c b/epan/dissectors/packet-mojito.c index 9a2d33966f..693ecf3e87 100644 --- a/epan/dissectors/packet-mojito.c +++ b/epan/dissectors/packet-mojito.c @@ -687,7 +687,7 @@ dissect_mojito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static gboolean dissect_mojito_heuristic (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) diff --git a/epan/dissectors/packet-moldudp.c b/epan/dissectors/packet-moldudp.c index 60df1b9808..6bd3e71671 100644 --- a/epan/dissectors/packet-moldudp.c +++ b/epan/dissectors/packet-moldudp.c @@ -179,7 +179,7 @@ dissect_moldudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data } /* Return the amount of data this dissector was able to dissect */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-moldudp64.c b/epan/dissectors/packet-moldudp64.c index c26939a3ff..9b4898004b 100644 --- a/epan/dissectors/packet-moldudp64.c +++ b/epan/dissectors/packet-moldudp64.c @@ -193,7 +193,7 @@ dissect_moldudp64(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat } /* Return the amount of data this dissector was able to dissect */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-mongo.c b/epan/dissectors/packet-mongo.c index 1d9ecfeed9..63b2c2a5e7 100644 --- a/epan/dissectors/packet-mongo.c +++ b/epan/dissectors/packet-mongo.c @@ -647,7 +647,7 @@ dissect_mongo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat expert_add_info(pinfo, ti, &ei_mongo_unknown); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint get_mongo_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) @@ -666,7 +666,7 @@ static int dissect_mongo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, 1, 4, get_mongo_pdu_len, dissect_mongo_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-mpls-echo.c b/epan/dissectors/packet-mpls-echo.c index 95efc94296..5587e2af7f 100644 --- a/epan/dissectors/packet-mpls-echo.c +++ b/epan/dissectors/packet-mpls-echo.c @@ -1788,7 +1788,7 @@ dissect_mpls_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat rem -= len; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Register the protocol with Wireshark */ diff --git a/epan/dissectors/packet-mrcpv2.c b/epan/dissectors/packet-mrcpv2.c index 6547f60543..1c17698159 100644 --- a/epan/dissectors/packet-mrcpv2.c +++ b/epan/dissectors/packet-mrcpv2.c @@ -951,7 +951,7 @@ dissect_mrcpv2_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* Return the amount of data this dissector was able to dissect */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* get the length of the MRCP message */ diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c index bac386c866..5ef4d3dbde 100644 --- a/epan/dissectors/packet-msrp.c +++ b/epan/dissectors/packet-msrp.c @@ -720,7 +720,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ }/* if tree */ return message_end_offset; - /* return tvb_length(tvb); */ + /* return tvb_captured_length(tvb); */ /* If this protocol has a sub-dissector call it here, see section 1.8 */ } diff --git a/epan/dissectors/packet-nbd.c b/epan/dissectors/packet-nbd.c index caac7cd8ce..90f4e004bc 100644 --- a/epan/dissectors/packet-nbd.c +++ b/epan/dissectors/packet-nbd.c @@ -109,7 +109,7 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset, void *data _U pinfo->srcport, pinfo->destport, 0); if (conversation == NULL) { /* No, so just return the rest of the current packet */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* * Do we have a state structure for this conv @@ -117,7 +117,7 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset, void *data _U nbd_info = (nbd_conv_info_t *)conversation_get_proto_data(conversation, proto_nbd); if (!nbd_info) { /* No, so just return the rest of the current packet */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } if(!pinfo->fd->flags.visited){ /* @@ -131,7 +131,7 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset, void *data _U nbd_trans=(nbd_transaction_t *)wmem_tree_lookup32_array(nbd_info->unacked_pdus, hkey); if(!nbd_trans){ /* No, so just return the rest of the current packet */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } } else { /* @@ -148,7 +148,7 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset, void *data _U nbd_trans=(nbd_transaction_t *)wmem_tree_lookup32_array(nbd_info->acked_pdus, hkey); if(!nbd_trans){ /* No, so just return the rest of the current packet */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } } /* If this is a read response we must add the datalen to @@ -364,7 +364,7 @@ dissect_nbd_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static gboolean diff --git a/epan/dissectors/packet-nbipx.c b/epan/dissectors/packet-nbipx.c index a28745a228..2366fbd7e1 100644 --- a/epan/dissectors/packet-nbipx.c +++ b/epan/dissectors/packet-nbipx.c @@ -490,7 +490,7 @@ dissect_nbipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) dissect_netbios_payload(next_tvb, pinfo, tree); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void diff --git a/epan/dissectors/packet-nbt.c b/epan/dissectors/packet-nbt.c index edaccd61fe..7a707747c1 100644 --- a/epan/dissectors/packet-nbt.c +++ b/epan/dissectors/packet-nbt.c @@ -1513,7 +1513,7 @@ dissect_continuation_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(nbss_tree, hf_nbss_continuation_data, tvb, 0, -1, ENC_NA); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -1736,7 +1736,7 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) */ pinfo->desegment_offset = offset; pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT; - return tvb_length(tvb); + return tvb_captured_length(tvb); } } @@ -1786,7 +1786,7 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) */ pinfo->desegment_offset = offset; pinfo->desegment_len = plen - length_remaining; - return tvb_length(tvb); + return tvb_captured_length(tvb); } } @@ -1804,7 +1804,7 @@ dissect_nbss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) offset += plen; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index e9b2f463f8..832251732d 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -1146,7 +1146,7 @@ static int dissect_ncp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { dissect_ncp_common(tvb, pinfo, tree, TRUE); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -1154,7 +1154,7 @@ dissect_ncp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, ncp_desegment, 8, get_ncp_pdu_len, dissect_ncp_tcp_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index d947c2068f..3b97ae6612 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -3173,7 +3173,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* proto_tree_add_item(ndmp_tree, hf_ndmp_fragment_data, tvb, 4, -1, ENC_NA); pinfo->fragmented = save_fragmented; - return tvb_length(tvb); + return tvb_captured_length(tvb); } } else @@ -3187,7 +3187,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* if (size < 24) { /* too short to be NDMP */ pinfo->fragmented = save_fragmented; - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* @@ -3197,7 +3197,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* if (!check_ndmp_hdr(new_tvb)) { pinfo->fragmented = save_fragmented; - return tvb_length(tvb); + return tvb_captured_length(tvb); } nh.seq = tvb_get_ntohl(new_tvb, offset); @@ -3293,7 +3293,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* pinfo->fragmented = save_fragmented; col_set_writable(pinfo->cinfo, save_writable); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint @@ -3390,7 +3390,7 @@ dissect_ndmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) tcp_dissect_pdus(tvb, pinfo, tree, ndmp_desegment, 4, get_ndmp_pdu_len, dissect_ndmp_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Called when doing a heuristic check; @@ -3409,7 +3409,7 @@ dissect_ndmp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat tcp_dissect_pdus(tvb, pinfo, tree, ndmp_desegment, 28, get_ndmp_pdu_len, dissect_ndmp_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index d043063f83..78d98f11a2 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -4279,7 +4279,7 @@ dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data ndps_tree = proto_item_add_subtree(ti, ett_ndps); dissect_ndps(tvb, pinfo, ndps_tree); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* @@ -4444,7 +4444,7 @@ static int dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len, dissect_ndps_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -4466,7 +4466,7 @@ dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data ndps_tree = proto_item_add_subtree(ti, ett_ndps); ndps_defrag(tvb, pinfo, ndps_tree, (spx_info*)data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int diff --git a/epan/dissectors/packet-netsync.c b/epan/dissectors/packet-netsync.c index 42786f10c0..20a422e92b 100644 --- a/epan/dissectors/packet-netsync.c +++ b/epan/dissectors/packet-netsync.c @@ -440,7 +440,7 @@ dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d col_set_str(pinfo->cinfo, COL_PROTOCOL, "Netsync"); if (tree == NULL) - return tvb_length(tvb); + return tvb_captured_length(tvb); while (tvb_reported_length_remaining(tvb, offset) > 0) { ti = proto_tree_add_item(tree, proto_netsync, tvb, offset, -1, ENC_NA); @@ -546,7 +546,7 @@ dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d proto_item_set_len(netsync_tree, 1+1+size_bytes+size+4); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int @@ -554,7 +554,7 @@ dissect_netsync(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, netsync_desegment, 7, get_netsync_pdu_len, dissect_netsync_pdu, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-oicq.c b/epan/dissectors/packet-oicq.c index 827bab1941..dc918cd2a5 100644 --- a/epan/dissectors/packet-oicq.c +++ b/epan/dissectors/packet-oicq.c @@ -155,7 +155,7 @@ dissect_oicq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-olsr.c b/epan/dissectors/packet-olsr.c index 8133031e4c..ddbc401e1d 100644 --- a/epan/dissectors/packet-olsr.c +++ b/epan/dissectors/packet-olsr.c @@ -675,7 +675,7 @@ static int dissect_olsr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi offset = message_end; } /* end while for message alive */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* end Dissecting */ /*-----------Register the Dissector for OLSR--------------*/ diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c index 9ac66ece2b..2dcd75de43 100644 --- a/epan/dissectors/packet-omron-fins.c +++ b/epan/dissectors/packet-omron-fins.c @@ -1189,7 +1189,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if (cmd_str_idx == -1) { /* Unknown command-code */ expert_add_info(pinfo, ti, &ei_omron_command_code); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Handle special cases wherein the data length for a command and/or a response can be 0 */ @@ -1209,7 +1209,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if (reported_length_remaining != 0) { expert_add_info_format(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1225,14 +1225,14 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da { expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); break; case 0x0801: /* command data length = 0 or > 0 is OK; */ if (is_command) { if (reported_length_remaining == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1240,13 +1240,13 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da /* command data length = 0 or > 0 is OK; */ if (is_command) { if (reported_length_remaining == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* There's no response */ if (is_response) { expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1475,7 +1475,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if(memory_code_len == 0) { expert_add_info_format(pinfo, ti, &ei_oomron_command_memory_area_code, "Unknown Memory-Area-Code (%u)", memory_area_code); - return tvb_length(tvb); /* Bail out .... */ + return tvb_captured_length(tvb); /* Bail out .... */ } proto_tree_add_item(command_tree, hf_omron_data, tvb, offset, memory_code_len, ENC_NA); offset = offset + memory_code_len; @@ -3216,7 +3216,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da } /* if(tree) */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-openvpn.c b/epan/dissectors/packet-openvpn.c index e4f9d69876..7057109b2a 100644 --- a/epan/dissectors/packet-openvpn.c +++ b/epan/dissectors/packet-openvpn.c @@ -300,7 +300,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp msg_length_remaining = tvb_length_remaining(tvb, offset); if (msg_length_remaining == 0) { - return tvb_length(tvb); + return tvb_captured_length(tvb); } if (openvpn_opcode != P_CONTROL_V1) { @@ -310,7 +310,7 @@ dissect_openvpn_msg_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *openvp tvb_length_remaining(tvb, offset)); 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 */ @@ -380,7 +380,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 @@ -413,7 +413,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 diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c index 2609db7faa..62ec1ca659 100644 --- a/epan/dissectors/packet-openwire.c +++ b/epan/dissectors/packet-openwire.c @@ -1341,7 +1341,7 @@ dissect_openwire(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data { proto_tree_add_item(openwireroot_tree, hf_openwire_command, tvb, offset + 4, 1, ENC_BIG_ENDIAN); expert_add_info(pinfo, openwireroot_tree, &ei_openwire_tight_encoding_not_supported); - return tvb_length(tvb); + return tvb_captured_length(tvb); } caching = retrieve_caching(pinfo); @@ -1358,7 +1358,7 @@ dissect_openwire(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint @@ -1375,7 +1375,7 @@ static int dissect_openwire_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, openwire_desegment, 5, get_openwire_pdu_len, dissect_openwire, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c index c86ea56115..c6f98b69ac 100644 --- a/epan/dissectors/packet-pw-atm.c +++ b/epan/dissectors/packet-pw-atm.c @@ -1170,7 +1170,7 @@ dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, voi expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "Packet (size: %d) is too small to carry MPLS PW Control Word" ,(int)size); - return tvb_length(tvb); + return tvb_captured_length(tvb); } } @@ -1327,7 +1327,7 @@ dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, voi } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-qllc.c b/epan/dissectors/packet-qllc.c index 54d041412e..a6f6dcd292 100644 --- a/epan/dissectors/packet-qllc.c +++ b/epan/dissectors/packet-qllc.c @@ -90,7 +90,7 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) */ if (!(*q_bit_set)) { call_dissector(sna_handle, tvb, pinfo, tree); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Summary information */ @@ -144,7 +144,7 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) /* yes */ } - return tvb_length(tvb); + return tvb_captured_length(tvb); } void diff --git a/epan/dissectors/packet-scop.c b/epan/dissectors/packet-scop.c index 2aa35558a6..35748f37dd 100644 --- a/epan/dissectors/packet-scop.c +++ b/epan/dissectors/packet-scop.c @@ -203,7 +203,7 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* dissect_scop() */ /*FUNCTION:------------------------------------------------------ @@ -248,7 +248,7 @@ static int dissect_scop_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, SCOP_HEADER_LENGTH, get_scop_length, dissect_scop, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* dissect_scop_tcp */ diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c index ae2342f827..8b9d29c513 100644 --- a/epan/dissectors/packet-sflow.c +++ b/epan/dissectors/packet-sflow.c @@ -2345,7 +2345,7 @@ dissect_sflow_245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat offset = dissect_sflow_245_samples(tvb, pinfo, sflow_245_tree, offset, version); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Register the protocol with Wireshark */ diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c index 2a23dc9a1d..299df01f20 100644 --- a/epan/dissectors/packet-sigcomp.c +++ b/epan/dissectors/packet-sigcomp.c @@ -4797,7 +4797,7 @@ dissect_sigcomp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sigcomp_tr ti = proto_tree_add_text(sigcomp_tree, tvb, 0, -1,"Failed to Access state Wireshark UDVM diagnostic: %s.", val_to_str(result_code, result_code_vals,"Unknown (%u)")); PROTO_ITEM_SET_GENERATED(ti); - return tvb_length(tvb); + return tvb_captured_length(tvb); } udvm_tvb = tvb_new_child_real_data(tvb, buff,state_length+state_address,state_length+state_address); @@ -4969,7 +4969,7 @@ dissect_sigcomp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sigcomp_tr }/*if len==0 */ } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void diff --git a/epan/dissectors/packet-simulcrypt.c b/epan/dissectors/packet-simulcrypt.c index 509112a57c..2c11093858 100644 --- a/epan/dissectors/packet-simulcrypt.c +++ b/epan/dissectors/packet-simulcrypt.c @@ -701,7 +701,7 @@ dissect_simulcrypt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da { tcp_dissect_pdus(tvb, pinfo, tree, TRUE, FRAME_HEADER_LEN, get_simulcrypt_message_len, dissect_simulcrypt_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Informative tree structure is shown here: @@ -1284,7 +1284,7 @@ dissect_simulcrypt_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } /* end tree */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* this method is used to dissect TLV parameters */ diff --git a/epan/dissectors/packet-ymsg.c b/epan/dissectors/packet-ymsg.c index 09a002f1ab..314dbabcf2 100644 --- a/epan/dissectors/packet-ymsg.c +++ b/epan/dissectors/packet-ymsg.c @@ -468,7 +468,7 @@ dissect_ymsg_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data col_set_fence(pinfo->cinfo, COL_INFO); - return tvb_length(tvb); + return tvb_captured_length(tvb); } |