Wireshark-users: [Wireshark-users] A question about using tvb_get_string_enc() function

From: Nan Xiao <xiaonan830818@xxxxxxxxx>
Date: Tue, 16 Aug 2022 09:26:14 +0800
Hi Community,

Greetings from me!

I am checking packet-gsm_sms.c and come across following code (https://gitlab.com/wireshark/wireshark/-/blob/master/epan/dissectors/packet-gsm_sms.c#L651):

    ......
    addrstr = tvb_get_string_enc(pinfo->pool, tvb, offset, numdigocts, ENC_KEYPAD_ABC_TBCD|ENC_NA);
    ......
 The value of ENC_NA is 0x00000000, and the value of ENC_KEYPAD_ABC_TBCD is 0x00000046, so it seems the value of ENC_KEYPAD_ABC_TBCD|ENC_NA is still ENC_KEYPAD_ABC_TBCD, and ENC_NA is lost. I also checked tvb_get_string_enc (https://gitlab.com/wireshark/wireshark/-/blob/master/epan/tvbuff.c#L3060), and couldn't find any special process of ENC_NA. Could someone advise why ENC_NA is needed here? Or I misunderstood something? Thanks very much in advance!

Best Regards
Nan Xiao