Project

General

Profile

Bug #4869 ยป 0001-WIP-rlcmac-Support-dissecting-LLC-frames-in-rlcmac-d.patch

pespin, 11/27/2020 04:53 PM

View differences:

epan/dissectors/packet-gsm_rlcmac.c
49 49

  
50 50
static dissector_handle_t lte_rrc_dl_dcch_handle = NULL;
51 51
static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL;
52
static dissector_handle_t llc_handle = NULL;
52 53

  
53 54
/* private typedefs */
54 55
typedef struct
......
8585 8586
        data_tvb = tvb_new_subset_length(tvb, octet_offset, blk_length - octet_offset);
8586 8587
        call_data_dissector(data_tvb, pinfo, subtree);
8587 8588
        octet_offset = blk_length;
8589
        /* TODO: here store data_tvb for later */
8588 8590
        break;
8589 8591

  
8590 8592
      case 63:
......
8611 8613
                                 "data segment: LI[%d]=%d indicates: (Last segment of) LLC frame (%d octets)",
8612 8614
                                 i, li, li);
8613 8615
        data_tvb = tvb_new_subset_length(tvb, octet_offset, li);
8614
        call_data_dissector(data_tvb, pinfo, subtree);
8616
        if(data_tvb) {
8617
            if (llc_handle) {
8618
                /* TODO: here used data_tvb previously stored and append current data_tvb to it. */
8619
                call_dissector(llc_handle, data_tvb, pinfo, subtree);
8620
            } else {
8621
                call_data_dissector(data_tvb, pinfo, subtree);
8622
            }
8623
        }
8615 8624
        octet_offset += li;
8616 8625
        break;
8617 8626
    }
......
8628 8637
                               "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");
8629 8638
      data_tvb = tvb_new_subset_length(tvb, octet_offset, blk_length - octet_offset);
8630 8639
      call_data_dissector(data_tvb, pinfo, subtree);
8640
      /* TODO: here store data_tvb for later */
8631 8641
     } else {
8632 8642
      proto_tree_add_bytes_item(tree, hf_padding, tvb, octet_offset, blk_length - octet_offset, ENC_BIG_ENDIAN, NULL, NULL, NULL);
8633 8643
     }
......
8730 8740
                                 "data segment: LI[%d]=%d indicates: (Last segment of) LLC frame (%d octets)",
8731 8741
                                 i, li, li);
8732 8742
        data_tvb = tvb_new_subset_length(tvb, octet_offset, li);
8733
        call_data_dissector(data_tvb, pinfo, subtree);
8743
        if(data_tvb) {
8744
            if (llc_handle) {
8745
                /* TODO: here used data_tvb previously stored and append current data_tvb to it. */
8746
                call_dissector(llc_handle, data_tvb, pinfo, subtree);
8747
            } else {
8748
                call_data_dissector(data_tvb, pinfo, subtree);
8749
            }
8750
        }
8734 8751
        octet_offset += li;
8735 8752
        break;
8736 8753
    }
......
18630 18647
{
18631 18648
  lte_rrc_dl_dcch_handle = find_dissector("lte_rrc.dl_dcch");
18632 18649
  rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd");
18650
  llc_handle = find_dissector("llcgprs");
18633 18651
}
18634 18652

  
18635 18653
/*
    (1-1/1)
    Add picture from clipboard (Maximum size: 48.8 MB)