Ethereal-dev: Re: [Ethereal-dev] BER implicit_tag

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

From: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Wed, 26 Jan 2005 13:56:51 +1100
the idea was to make some CMIP stuff decode properly.

the idea is that IF implitic_tag is set, then the identifier and
length is not checked at all
instead it is assume the value spans until the end of the tvb,   some
cases therefore need, to create a new sub tvb  that only spans the
length.

i.e.    CHOICE {
          [1] IMPLICIT integer foo;

then the identifier and length is read in the coice dissector,   and
since it was IMPLICIT
it creates a new tvb only containing as much data as length indicated.
then it calls the subdissector for integer/foo    since implicit_tag
is now set   instead of reading the identifier/length  it assumes the
length is  tvb_length_remaining()


it was the best i could come up with to handle some of the constructs for CMIP.

If you have a better approach, please have a go at it.
I can provide the cmip captures i had problems with for you to test with.




On Tue, 25 Jan 2005 16:00:32 +0100, Tomas Kukosa
<tomas.kukosa@xxxxxxxxxxx> wrote:
> Hi Ronnie,
>    I have found with delay that some my dissectors does not work properly.
> The reason is different behaviour of dissect_ber_sequence() if implicit_tag is TRUE.
> 
> What was your idea concernig implicit tag?
> My original idea was that BER identifier and length is decoded for implicit tag too but
> the tag is not checked.
> But after your changes BER identifier and length is not decoded anymore for implicit tag.
> 
> Could we clarify it?
> 
> Regards,
>    Tom
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>