Ethereal-dev: SV: [Ethereal-dev] little bug in packet-gsm_a.c or in packet-bssgp.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Thu, 11 Aug 2005 22:47:46 +0200

Checked in.

Brg

Anders

 

-----Ursprungligt meddelande-----
Från: ethereal-dev-bounces@xxxxxxxxxxxx [mailto:ethereal-dev-bounces@xxxxxxxxxxxx] För Rene Pilz
Skickat: den 8 augusti 2005 22:40
Till: Ethereal development
Ämne: Re: [Ethereal-dev] little bug in packet-gsm_a.c or in packet-bssgp.c

 

Hi

On Mon, 2005-08-08 at 03:19 -0700, Miklos Szurdi wrote:

 
Hi all
 
Does anyone know  which one of the following two is
correct? (because they display the same value
differently...i guess only one them can be okay...)
 
BSS GPRS Protocol/Cell Identifier/RAI
which is decoded in packet-bssgp.c in function:
 static char*
decode_rai(build_info_t *bi, proto_tree *parent_tree)
 
 
GSM DTAP/RAI 
which is decoded in packet-gsm_a.c in function:
 static guint8
de_gmm_rai(tvbuff_t *tvb, proto_tree *tree, guint32
offset, guint len, gchar *add_string) 
 

The MCC/MNC in de_gmm_rai is not correct decoded. I cannot create a patch file now. I will do it in a couple of days.

old:

mcc = tvb_get_guint8(tvb, curr_offset);

 
mcc |= (tvb_get_guint8(tvb, curr_offset+1)&0x0f)<<8;
mnc = tvb_get_guint8(tvb, curr_offset+2);
mnc |= (tvb_get_guint8(tvb, curr_offset+1)<<4)&0x0f00;
if ((mnc&0x0f00) == 0x0f00 )
    mnc&=0xff;

new:

mcc = (tvb_get_guint8(tvb, curr_offset) & 0x0f) <<8;
mcc |= (tvb_get_guint8(tvb, curr_offset) & 0xf0);
mcc |= (tvb_get_guint8(tvb, curr_offset+1) & 0x0f);
mnc = (tvb_get_guint8(tvb, curr_offset+2) & 0x0f) <<8;
mnc |= (tvb_get_guint8(tvb, curr_offset+2) & 0xf0);
mnc |= (tvb_get_guint8(tvb, curr_offset+1) & 0xf0) >>4;
if ((mnc&0x000f) == 0x000f) mnc>>4;

The exchange of the lines should fix it.

br

rene


 
 
BR
Miklos
 
 
            
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
 
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev
 
-- 
Dipl-Ing (FH) MSc. C.E René Pilz
ftw. Telekommunications Research Center Vienna http://www.ftw.at
Tech Gate Vienna, Donaucitystraße 1, A-1220 Wien
Mobile: +43 664 8269871 Office: +43 1 5052830-13  Fax: +43 1 5052830-99