Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Problem with ENC_BCD_DIGITS_0_9 odd/even

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Wed, 9 Dec 2020 15:43:30 +0000

Hi,

There is a problem with the BCD encoded numbers as they may be padded and unfortunately with Zero.

 

“Encoding scheme: BCD. Note: Filler H’0 (last digit) is used in case of the odd number of digits.”

 

In order to present this properly

It would be good to be able to pass an odd/even indicator, what would be the preferred bits to use?

#define ENC_BCD_ODD               0x10000000

#define ENC_BCD_EVEN              0x20000000

 

If(odd){

   proto_tree_add_item(subtree, hf_cs1plus_gen_digits, parameter_tvb, poffset, -1, ENC_KEYPAD_BC_TBCD| ENC_BCD_ODD );

else

   proto_tree_add_item(subtree, hf_cs1plus_gen_digits, parameter_tvb, poffset, -1, ENC_KEYPAD_BC_TBCD| ENC_BCD_EVEN);

 

Or some other solution?

 

Best regards

Anders

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature