Wireshark-dev: Re: [Wireshark-dev] E212 Mobile network code is not caculated correctly?
From: "Pascal Quantin" <pascal.quantin@xxxxxxxxx>
Date: Fri, 9 Jan 2009 07:32:28 +0100
Hi,

you are right and this was fixed in trunk by revision 24759 (
http://anonsvn.wireshark.org/viewvc?view=rev&revision=24759 ).

Regards,
Pascal.

2009/1/9 Zhang, Long (Roger) <zhangl@xxxxxxxxxxxxxxxxxx>:
> Hi,
>
>
>
> I am developing based on Wireshark 1.0.0.  I found the mnc in E212 may not
> be caculated correctly.  The mnc for 3 digits is calculated as "mnc += 10 *
> mnc + mnc3;". I think it should be "mnc = 10 * mnc + mnc3;".  From E212
> spec, I did not find algorithm to calculate mnc, but I think += is not
> correct. Is it a bug?
>
>
>
> epan/dissectors/packet-e212.c
>
>
>
> int
>
> dissect_e212_mcc_mnc(tvbuff_t *tvb, proto_tree *tree, int offset){
>
>
>
> ……
>
>
>
>         mcc = 100 * mcc1 + 10 * mcc2 + mcc3;
>
>         mnc = 10 * mnc1 + mnc2;
>
>         if (mnc3 != 0xf) {
>
>                 mnc += 10 * mnc + mnc3;
>
>         }
>
> ……
>
>         return offset;
>
> }
>
>
>
> Thanks,
>
> Roger
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
>