Ethereal-dev: Re: [Ethereal-dev] How to display Octet String in ASN1 encoded packets

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

From: "Ronnie Sahlberg" <ronnie_sahlberg@xxxxxxxxxxxxxx>
Date: Thu, 6 May 2004 18:14:48 +1000
Please do not use the ans1.c API it is old obsolete and should be replaced.

The new API to use is in packet-ber.c
examples of which and how to use can be found in packet-kerberos.c



----- Original Message ----- 
From: Wei Li (Michael)
To: Ethereal development
Sent: Thursday, May 06, 2004 2:46 PM
Subject: [Ethereal-dev] How to display Octet String in ASN1 encoded packets


Hi,
  I was wondering how to display Octet String in ASN1-encoded packets. I
used the asn1_string_decode( ) method in asn1.c, but the octet string type
is not displaying well.
  How to display the original binary? For example, if the binary is "01 03
ce 00", I need to convert to "01.03.ce.00". I tried the accessors such as
tvb_get_guint8( ), tvb_get_ptr( ), but the resulting results are not what I
want.
  Thanks for help.
  Sincerely,
  Michael