Project

General

Profile

0001-rlcmac-Identify-and-show-spare-bits-in-GPRS-data-blo.patch

pespin, 11/03/2020 08:10 PM

View differences:

epan/dissectors/packet-gsm_rlcmac.c
8612 8612
      col_append_str_uint(pinfo->cinfo, COL_INFO, "Len", octet_length - octet_offset, " ");
8613 8613
      subtree = proto_tree_add_subtree_format(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL,
8614 8614
                               "data segment: LI not present: \n The Upper Layer PDU in the current RLC data block either fills the current RLC data block precisely \nor continues in the following in-sequence RLC data block");
8615
    }
8616
    else
8617
    {
8618
      subtree = proto_tree_add_subtree(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL, "Padding Octets");
8619
    }
8620
    data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
8621
    call_data_dissector(data_tvb, pinfo, subtree);
8622
    octet_offset = octet_length;
8615
      data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
8616
      call_data_dissector(data_tvb, pinfo, subtree);
8617
     } else {
8618
      subtree = proto_tree_add_subtree(tree, tvb, octet_length, octet_length - octet_offset, ett_data_segments, NULL, "Padding Octets");
8619
     }
8623 8620
  }
8624
  return (octet_offset - initial_offset);
8621
  return (octet_length - initial_offset);
8625 8622
}
8626 8623

  
8627 8624
static guint16 dissect_egprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint initial_offset, guint8 octet_length, guint8 li_count, length_indicator_t *li_array)
......
9040 9037
    if (e)
9041 9038
    {
9042 9039
      /* dissect the data segments */
9043
      /*bit_offset += 8 * */ dissect_gprs_data_segments(tvb, pinfo, rlcmac_tree, bit_offset / 8, bit_length / 8,
9040
      guint8 blk_length = gsm_rlcmac_gprs_cs_to_block_length[(data->block_format & 0x0F) - 1];
9041
      if (blk_length > bit_length / 8)
9042
          blk_length = bit_length / 8; /* part of the block or spare bits missing */
9043
      bit_offset += 8 * dissect_gprs_data_segments(tvb, pinfo, rlcmac_tree, bit_offset / 8, blk_length,
9044 9044
                                                        li_count,
9045 9045
                                                        li_array);
9046
      if(bit_offset < bit_length)
9047
        proto_tree_add_bits_item(rlcmac_tree, hf_dl_ctrl_spare, tvb, bit_offset, bit_length - bit_offset, ENC_BIG_ENDIAN);
9046 9048
    }
9047 9049
    else
9048 9050
    {
......
9482 9484
    if (e)
9483 9485
    {
9484 9486
      /* dissect the data segments */
9485
      /*bit_offset += 8 * */ dissect_gprs_data_segments(tvb, pinfo, rlcmac_tree, bit_offset / 8, bit_length / 8,
9487
      guint8 blk_length = gsm_rlcmac_gprs_cs_to_block_length[(data->block_format & 0x0F) - 1];
9488
      if (blk_length > bit_length / 8)
9489
          blk_length = bit_length / 8; /* part of the block or spare bits missing */
9490
      bit_offset += 8 * dissect_gprs_data_segments(tvb, pinfo, rlcmac_tree, bit_offset / 8, blk_length,
9486 9491
                                                        li_count,
9487 9492
                                                        li_array);
9493
      if(bit_offset < bit_length)
9494
        proto_tree_add_bits_item(rlcmac_tree, hf_dl_ctrl_spare, tvb, bit_offset, bit_length - bit_offset, ENC_BIG_ENDIAN);
9488 9495
    }
9489 9496
    else
9490 9497
    {
9491
- 
Add picture from clipboard (Maximum size: 48.8 MB)