The problem here is that it is (for my understanding) too likely that  
the algorithms
breaks. Using a false value sometimes is pretty bad. If it is false  
all the time, a
user might think about it and select manually the correct one.
So I would prefer making the selection of the variant easier and more  
obvious. That
is why we put this into the protocol column. But I'm not that  
familiar with the GUI
stuff...
Best regards
Michael
On May 3, 2005, at 12:43 PM, Javier Acuña wrote:
Hi, on the top of my head, I was thinking of something like:
(assuming we're at the Service Info. Octet)
if( (tvb_get_guint8(offset + 7) >> 5) == 0
 && (tvb_get_guint8(offset + 9) >> &) == 0 )
format = ANSI;
else if (tvb_get_guint8(offset + 6) >> 4) == 0) format = ITU;
that is, going to some octet, and checking whether the spare bits  
are effectively spare (ie: zero) or not.
Of course this relies on the fact that spare bits are indeed  
enconded as zero, which I believe is the general recommendation.
Some special combination of CICs, OPCs and DPCs could make this  
method fails.
Another idea that comes to mind is going to the octet where the  
message type (IAM, etc...) is stored and check whether it's a  
message type octet or not
m_type = tvb_get_guint8(offset + 10)
switch (m_type) {... case IAM: format = ANSI; break;
case ACM: format = ANSI; break ... }
m_type = tvb_get_guint8(offset + 7)
switch (m_type) {... case some_message_type: format = ITU...}
Again, this could fail under some conditions.
Best Regards
Javier
________________________________________________________________
Mensaje enviado desde el Servicio Webmail del Dominio sixbell.cl
_____________________________
La informacion contenida en esta transmision es confidencial, y no  
puede ser usada por otras personas que su(s) destinatario(s). El  
uso no autorizado de la informacion contenida en esta transmision  
puede ser sancionado. Si ha recibido esta transmision por error,  
por favor destruyala y notifique al remitente telefonicamente, con  
cobro revertido o via e-mail.
The information contained in this transmission is privileged, and  
may not be used by any person other than its addressee(s).  
Unauthorized use of the information contained in this transmission  
may be punished  by law.  If received in error, please destroy and  
notify the sender by calling collect or by e-mail.
_____________________________