Ethereal-dev: RE: [Ethereal-dev] Re: Please advise....
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