ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] E212 Mobile network code is not caculatedcorrectly?

From: "Zhang, Long (Roger)" <zhangl@xxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Jan 2009 14:34:22 +0800
Pascal,

Thanks!

Roger

> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx
> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Pascal
Quantin
> Sent: Friday, January 09, 2009 2:32 PM
> To: Developer support list for Wireshark
> Subject: Re: [Wireshark-dev] E212 Mobile network code is not
> caculatedcorrectly?
> 
> 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
> >
>
________________________________________________________________________
__
> _
> 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