Wireshark-commits: [Wireshark-commits] master-3.2 afc60c0: GSM/SMS: decouple error and reason field
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 17 May 2020 00:24:02 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=afc60c02519eb23ca7100eb6f725ca8a5a4a20cf
Submitter: "Guy Harris <gharris@xxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark

Commits:

afc60c0 by Vadim Yanitskiy (axilirator@xxxxxxxxx):

    GSM/SMS: decouple error and reason fields in TP-Status IE
    
    According to 3GPP TS 23.040, section 9.2.3.15, the TP-Status IE
    indicates the status of a previously submitted SMS-SUBMIT and
    certain SMS COMMANDS for which a Status-Report has been requested.
    
    Currently Wireshark dissects this IE as follows:
    
      TP-Status
          0... .... = Definition of bits 0-6: as follows
          .000 0000 = Error: Short message transaction completed (0)
          .000 0000 = Reason: Short message received by the SME (0)
    
    so it's not clear how exactly both Error and Reason are derived
    from 7 less-significant bits of the first (and the last) octet.
    
    As can be seen from the section 9.2.3.15, two less-significant
    bits of those 7 define the Error, while the remaining 5 bits
    define the Reason.
    
    With this change applied, dissected TP-Status IE looks as follows:
    
      TP-Status
          0... .... = Definition of bits 0-6: as follows
          .00. .... = Error: Short message transaction completed (0)
          ...0 0000 = Reason: Short message received by the SME (0)
    
    To achieve this, type of the 'dis_field_st_error_rvals' was changed
    from 'range_string' to 'value_string', and the range / string array
    'dis_field_st_reason_rvals' was split into 4 arrays corresponding
    to 4 possible Error values.
    
    Change-Id: I8418ae3532c5e4b0ad2c956c5cd8cd90767d2fd6
    Reviewed-on: https://code.wireshark.org/review/36828
    Reviewed-by: Pascal Quantin <pascal@xxxxxxxxxxxxx>
    (cherry picked from commit fd19f39bf2b54ac61c1a8bf10fbb6b234e91091e)
    Reviewed-on: https://code.wireshark.org/review/37222
    Reviewed-by: Guy Harris <gharris@xxxxxxxxx>
    

Actions performed:

    from  63b626f   GSM SMS: fix gsm_sms_tp_failure_cause_values array definition
     add  afc60c0   GSM/SMS: decouple error and reason fields in TP-Status IE


Summary of changes:
 epan/dissectors/packet-gsm_sms.c | 117 +++++++++++++++++++++++++--------------
 1 file changed, 75 insertions(+), 42 deletions(-)