Wireshark-commits: [Wireshark-commits] master fd19f39: GSM/SMS: decouple error and reason fields in

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 13 Apr 2020 19:32:05 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fd19f39bf2b54ac61c1a8bf10fbb6b234e91091e
Submitter: "Pascal Quantin <pascal@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

fd19f39 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>
    

Actions performed:

    from  37c8671   GSUP: cosmetic: use upper case in short protocol name
     add  fd19f39   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(-)