diff options
Diffstat (limited to 'epan/dissectors/packet-cip.c')
-rw-r--r-- | epan/dissectors/packet-cip.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c index 303ef7dce1..b2a045862d 100644 --- a/epan/dissectors/packet-cip.c +++ b/epan/dissectors/packet-cip.c @@ -4149,9 +4149,9 @@ dissect_cip_class_generic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v ti = proto_tree_add_item(tree, proto_cip_class_generic, tvb, 0, -1, ENC_NA); class_tree = proto_item_add_subtree( ti, ett_cip_class_generic ); - dissect_cip_generic_data( class_tree, tvb, 0, tvb_length(tvb), pinfo, ti ); + dissect_cip_generic_data( class_tree, tvb, 0, tvb_captured_length(tvb), pinfo, ti ); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void @@ -4384,7 +4384,7 @@ dissect_cip_generic_service_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t add_cip_service_to_info_column(pinfo, service, cip_sc_vals); /* Create service tree */ - cmd_data_item = proto_tree_add_text(tree, tvb, 0, tvb_length(tvb), "%s", + cmd_data_item = proto_tree_add_text(tree, tvb, 0, tvb_captured_length(tvb), "%s", val_to_str(service, cip_sc_vals , "Unknown Service (0x%02x)")); proto_item_append_text(cmd_data_item, " (Request)"); cmd_data_tree = proto_item_add_subtree( cmd_data_item, ett_cmd_data ); @@ -4465,7 +4465,7 @@ dissect_cip_generic_service_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void @@ -4725,7 +4725,7 @@ dissect_cip_generic_service_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t cip_req_info_t* preq_info; cip_simple_request_info_t req_data; int offset = 0, - item_length = tvb_length(tvb); + item_length = tvb_captured_length(tvb); guint8 service = tvb_get_guint8( tvb, offset ) & CIP_SC_MASK, add_stat_size = tvb_get_guint8( tvb, offset+3 ) * 2; @@ -4740,7 +4740,7 @@ dissect_cip_generic_service_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t else { /* PROTO_ITEM_SET_HIDDEN( ti ); */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } preq_info = (cip_req_info_t*)p_get_proto_data(wmem_file_scope(), pinfo, proto_cip, 0); @@ -4829,7 +4829,7 @@ dissect_cip_generic_service_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t break; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /************************************************ @@ -5505,9 +5505,9 @@ dissect_cip_class_cm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * ti = proto_tree_add_item(tree, proto_cip_class_cm, tvb, 0, -1, ENC_NA); class_tree = proto_item_add_subtree( ti, ett_cip_class_cm ); - dissect_cip_cm_data( class_tree, tvb, 0, tvb_length(tvb), pinfo ); + dissect_cip_cm_data( class_tree, tvb, 0, tvb_captured_length(tvb), pinfo ); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /************************************************ @@ -5589,7 +5589,7 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ case SC_MB_PASSTHROUGH: /* Passthrough response (Success) */ - if( tvb_length_remaining(tvb, offset) > 0 ) + if( tvb_captured_length_remaining(tvb, offset) > 0 ) { /* dissect the Modbus PDU */ next_tvb = tvb_new_subset_length( tvb, offset+4+add_stat_size, item_length-4-add_stat_size); @@ -5679,7 +5679,7 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_ case SC_MB_PASSTHROUGH: /* Passthrough Request */ - if( tvb_length_remaining(tvb, offset) > 0 ) + if( tvb_captured_length_remaining(tvb, offset) > 0 ) { /* dissect the Modbus PDU */ next_tvb = tvb_new_subset_length( tvb, offset+2+req_path_size, item_length-req_path_size-2); @@ -5716,9 +5716,9 @@ dissect_cip_class_mb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * ti = proto_tree_add_item(tree, proto_cip_class_mb, tvb, 0, -1, ENC_NA); class_tree = proto_item_add_subtree( ti, ett_cip_class_mb ); - dissect_cip_mb_data( class_tree, tvb, 0, tvb_length(tvb), pinfo ); + dissect_cip_mb_data( class_tree, tvb, 0, tvb_captured_length(tvb), pinfo ); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /************************************************ @@ -6067,9 +6067,9 @@ dissect_cip_class_cco(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void ti = proto_tree_add_item(tree, proto_cip_class_cco, tvb, 0, -1, ENC_NA); class_tree = proto_item_add_subtree( ti, ett_cip_class_cco ); - dissect_cip_cco_data( class_tree, tvb, 0, tvb_length(tvb), pinfo ); + dissect_cip_cco_data( class_tree, tvb, 0, tvb_captured_length(tvb), pinfo ); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static gboolean @@ -6379,7 +6379,7 @@ dissect_cip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) dissect_cip_data( tree, tvb, 0, pinfo, NULL ); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* |