Ethereal-dev: [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: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 09 Sep 2004 22:12:28 -0700
Herbert Falk wrote:

I have successfully integrated the IEC 61850 protocols with Ethereal. It is in limited use (trying to find bugs), but it looks fairly stable. I am now in the situation where I am preparing the modified modules for submission back to Ethereal. I am attaching a document that lets you understand where the modification have been made. 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.

I would like to discuss changing the ASN1.c module

You should discuss that with the ethereal-dev list, *NOT* just with me.

(Note that I suspect that at least some of us would like to deprecate asn1.c in favor of packet-ber.c.)

to make use of asn1_helper.c (at least the length decode function so that indefinite lengths can be handle by any ASN1 parser). I have figured out how to do this transparently except I also need to change the asn1_tag_get function to skip 0x00 0x00.

I haven't fully figured it out, but the replacement function would be something like:

asn1_tag_get(ASN1_SCK *asn1, guint *tag)
{
   int    ret;
   guchar ch;

   do {
   ret = asn1_octet_decode (asn1, &ch);
   if (ret != ASN1_ERR_NOERROR)
       return ret;
       *tag <<= 7;
       *tag |= ch & 0x7F;
   } while ((ch & 0x80) == 0x80);

/* added to skip indefinite length encodings   */
   if ( ret==0x0)
       ret =  asn1_tag_get(asn,tag);

   return ASN1_ERR_NOERROR;
}

I believe that this will work properly since I believe that no BER encoded tag can be 0x00. In the ASN1.h file 0x00 would be a universal ASN1_EOC which is the value of the termination of indefinite length encodings.

What do you think?

I am attaching a *.pdf that has information regarding what modules will be forthcoming to Ethereal. I need feedback from you in regards to what order you want the modules submitted (and point me to the appropriate submission proceedure).