Ethereal-dev: Re: [Ethereal-dev] Re: Please advise....

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: Fri, 10 Sep 2004 18:57:48 +1000
I would personally object to any new dissectors using the old style
asn1.c functions
or definitions  which the following snippet seemingly use :

> asn1_tag_get(ASN1_SCK *asn1, guint *tag)
> {
>    int    ret;
>    guchar ch;
>
>    do {
>    ret = asn1_octet_decode (asn1, &ch);
>    if (ret != ASN1_ERR_NOERROR)


The new asn api is packet-ber/packet-per and using the ASN2ETH python compiler.

It would be a big mistake imho to add more dissectors using the old
obsolete API.


Please recode the dissector using the modern api.



On Fri, 10 Sep 2004 06:58:44 +0000, Sid Sid <ysidelnikov@xxxxxxxxxxx> wrote:
> Hi,
> 
> >>Herbert Falk wrote:
> >>I still have major concerns about packet-pres.c and packet-acse.c since
> >>they do not handle indefinite length encodings and I might need to
> >>re-write both modules in their entirety.
> Actually, pres and acse dissector can handle indefinite length.The schema is
> very simply.
> If asn1_length_decode function returns null(and it does it for indefinite
> length)  and  pdu has more bytes(more then 2)  program thinks that the real
> length is number of remain bytes.
> Have a look to the example from pres dissector:
> 
> rest_len = asn1_length_decode(...
> if(!rest_len)
> {
> // do we really haven't any more bytes ?
> if((rest_pdu_len = tvb_reported_length_remaining(tvb, offset)) )
> {
>  // we have but can't say how many from asn1 information.
> // use pdu len instead
> if(rest_pdu_len > 2)
>        {
>        rest_len = rest_pdu_len;
>        }
> }
> Probably, it's not better way and we should change asn1_length_decode
> function.
> 
> Anyway, I think it much better to change asn1.c module and(or) probably make
> some minor changes to pres/acse/ftam dissectors instead of re-write modules
> in their entirety.
> 
> Probably, if you will send me example of capture file with asn1 informations
> which have indefinite length I can help.
> Regards,
> Yuriy Sidelnikov.
> 
> >>I would like to discuss changing the ASN1.c module
> >
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
> 
> 
> 
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>